Skip to content

Commit

Permalink
rpc update
Browse files Browse the repository at this point in the history
new rpc update working version
  • Loading branch information
EricChen-Lei committed Aug 29, 2023
1 parent 699a9fc commit fd9a778
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
9 changes: 7 additions & 2 deletions co-simulation/bundle/src/assembly/mosaic-bundle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,17 @@
<include>com.carrotsearch:hppc</include>
<!-- [END] GraphHopper dependencies -->

<!-- [START] XmlRpc dependencies -->
<include>org.apache.xmlrpc:xmlrpc-client</include>
<include>org.apache.xmlrpc:xmlrpc-common</include>
<include>org.apache.ws.commons.util:ws-commons-util</include>
<!-- [END] XmlRpc dependencies -->

<include>com.jcraft:jsch</include>
<include>com.google.protobuf:protobuf-java</include>
<include>org.xerial:sqlite-jdbc</include>
<include>org.java-websocket:Java-WebSocket</include>
<include>org.apache.xmlrpc:xmlrpc-client</include>
<include>org.apache.xmlrpc:xmlrpc</include>

</includes>
</dependencySet>
</dependencySets>
Expand Down
11 changes: 3 additions & 8 deletions co-simulation/fed/mosaic-carla/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,9 @@
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
<version>3.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-common</artifactId>
<version>3.1.1</version>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
<version>3.1.3</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,26 @@ public void run(){
config.setServerURL(new URL("http://127.0.0.1:8090/RPC2"));
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
Object[] params = new Object[]{new String("Hello world!")};
String result = (String) client.execute("test.echo", params);
System.out.println(result);
while(true)
{
Object[] params = new Object[]{new String("Test " + java.time.LocalDateTime.now())};
String result = (String) client.execute("test.echo", params);
System.out.println(result);
Thread.sleep(10000);
}
}
catch (XmlRpcException XmlException) {
System.out.println(XmlException);
catch (XmlRpcException XmlException)
{
XmlException.printStackTrace();
}
catch(MalformedURLException URLException)
{
System.out.println(URLException);
}
URLException.printStackTrace();
}
catch (InterruptedException InterruptedException)
{
InterruptedException.printStackTrace();
}

}
}

0 comments on commit fd9a778

Please sign in to comment.