# Using packetstream with xmlrpc

**URL:** <https://forum.universal-robots.com/t/using-packetstream-with-xmlrpc/4586>\
**Category:** Robot Communication\
**Created:** [June 25, 2019, 9:31am UTC](https://forum.universal-robots.com/t/using-packetstream-with-xmlrpc/4586 "2019-06-25T09:31:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon56569996](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@anon56569996](https://forum.universal-robots.com/u/anon56569996)\
**Post date:** [June 25, 2019, 9:31am UTC](https://forum.universal-robots.com/t/using-packetstream-with-xmlrpc/4586/1 "2019-06-25T09:31:18Z")

</div>

Hello everybody,  
I will briefly explain my problem.

I a trying to setup a xmlrpc client using packetstream (and not http) protocol. My server is written in C++ and is using the pStream version, according to this library [http://xmlrpc-c.sourceforge.net/](http://xmlrpc-c.sourceforge.net/).  
I need to use remote procedure calls both in URscript directly and in Java.  
In Java I have created a class that set up the connection and handles the different functions that I need to use:

```
public XMLRPCInterface(String host, int port) {

    XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
    config.setEnabledForExceptions(true);

    try {
         config.setServerURL(new URL(host + ":" + port)); // NO HTTP SINCE WE ARE GOING TO USE UPSTREAM SERVER
    } catch (MalformedURLException e) {
         e.printStackTrace();
   }

   config.setConnectionTimeout(1000);
   client = new XmlRpcClient();
  client.setConfig(config);
}

```

With this code I get MalformedUrlException :no protocol 10.0.2.2:1237  
Cannot say if also in URscript part I have a problem since my program stops here, anyway I really think so.

I have found an other user claiming that using pstream server is possible and complaining about this kind of errors some years ago but unfortunately nobody found a solution.

Many thanks for your help

---

<div class="post-metadata">

**Author:** ![anon56569996](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@anon56569996](https://forum.universal-robots.com/u/anon56569996)\
**Post date:** [July 1, 2019, 8:42am UTC](https://forum.universal-robots.com/t/using-packetstream-with-xmlrpc/4586/2 "2019-07-01T08:42:19Z")

</div>

Any idea?  
I tested with http and abyss server and everything is working properly.
