OpenX Java API. How to get Advertiser?
<p>I have installed OpenX-2.8.10 on Web Server.</p>

<p>I'm using samples from it to connect to OpenX Server. I want to get Advertiser from server, and I have problem with it. I'm trying use AdvertiserService, but no success.</p>

<p>Code is here:</p>

<pre><code>public class Prototype {
    private final static String serverURL = "http://demo.pwi.ru";
    private final static String openadsDir = "/openx";
    private final static String logonService = "/www/api/v1/xmlrpc/LogonXmlRpcService.php";
    private final static String agencyService = "/www/api/v1/xmlrpc/AgencyXmlRpcService.php";
    private final static String username = "admin";
    private final static String password = "875698";
    private static Integer id = 1;

    public static void main(String[] args) {
        final XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();

        try {
            config.setServerURL(new URL(serverURL + openadsDir + logonService)); 
            XmlRpcClient client = new XmlRpcClient();
            client.setConfig(config);

            String sessionId = (String) client.execute("logon", new Object[]{username, password});
            System.out.println("User logged on with session Id: " + sessionId);

            AdvertiserService service = new AdvertiserService(client, sessionId);
            service.setSessionId(sessionId);

            System.out.println("AdvertiserService: " + service.getAdvertiser(id ));
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (XmlRpcException e) {
            e.printStackTrace();
        }
    }
}
</code></pre>

<p>Console says:</p>

<p>User logged on with session Id: phpads50addd559301e5.24695272
org.apache.xmlrpc.XmlRpcException: Failed to create input stream: demo.pwi.ru//phpads50addd559301e5.24695272//AdvertiserXmlRpcService.php
    at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.getInputStream(XmlRpcSunHttpTransport.java:65)
    at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:141)
    at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
    at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44)
    at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
    at org.openads.proxy.AbstractService.execute(AbstractService.java:111)
    at org.openads.proxy.AdvertiserService.execute(AdvertiserService.java:1)
    at org.openads.proxy.AdvertiserService.getAdvertiser(AdvertiserService.java:118)
    at org.openads.proxy.prototype.Prototype.main(Prototype.java:36)
Caused by: java.io.FileNotFoundException: demo.pwi.ru//phpads50addd559301e5.24695272//AdvertiserXmlRpcService.php
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.getInputStream(XmlRpcSunHttpTransport.java:63)
    ... 11 more
Caused by:
java.io.FileNotFoundException: demo.pwi.ru//phpads50addd559301e5.24695272//AdvertiserXmlRpcService.php
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.getInputStream(XmlRpcSunHttpTransport.java:63)
    at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:141)
    at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
    at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44)
    at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
    at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
    at org.openads.proxy.AbstractService.execute(AbstractService.java:111)
    at org.openads.proxy.AdvertiserService.execute(AdvertiserService.java:1)
    at org.openads.proxy.AdvertiserService.getAdvertiser(AdvertiserService.java:118)
    at org.openads.proxy.prototype.Prototype.main(Prototype.java:36)</p>
