P
Piotrek
Hello all,
I'm a newb to java and all its properties, so please forgive the
ignorance.
I'm trying to compile a simple XmlRpcClient example using the apache
xmlrpc bin package and am having difficulty doing so successfully.
Would anyone care to help me out, please?
Here's the simple class:
<code>
import org.apache.xmlrpc.XmlRpcClient;
import java.util.Vector;
public class MyClient {
public static void main( String args[] ) throws Exception {
XmlRpcClient client = new XmlRpcClient( "http://localhost:
45000/" );
Vector params = new Vector();
params.addElement( "guest" );
Object result = client.execute( "show", params );
if ( result != null )
System.out.println( "Successfully showed guest
account." );
}
}
</code>
Here's the $CLASSPATH:
xmlrpc-server-3.1-javadoc.jar:/opt/xmlrpc-3.1/lib/xmlrpc-
server-3.1.jar:/opt/xmlrpc-3.1/lib/xmlrpc-common-3.1-sources.jar:/opt/
xmlrpc-3.1/lib/xmlrpc-common-3.1-javadoc.jar:/opt/xmlrpc-3.1/lib/
xmlrpc-common-3.1.jar:/opt/xmlrpc-3.1/lib/xmlrpc-client-3.1-
sources.jar:/opt/xmlrpc-3.1/lib/xmlrpc-client-3.1-javadoc.jar:/opt/
xmlrpc-3.1/lib/xmlrpc-client-3.1.jar:/opt/xmlrpc-3.1/lib/ws-commons-
util-1.0.2.jar:/opt/xmlrpc-3.1/lib/commons-logging-1.1.jar
Here's the error:
symbol : class XmlRpcClient
location: package org.apache.xmlrpc
import org.apache.xmlrpc.XmlRpcClient;
^
MyClient.java:8: cannot find symbol
symbol : class XmlRpcClient
location: class MyClient
XmlRpcClient client = new XmlRpcClient( "http://localhost:
45000/" );
^
MyClient.java:8: cannot find symbol
symbol : class XmlRpcClient
location: class MyClient
XmlRpcClient client = new XmlRpcClient( "http://localhost:
45000/" );
^
Note: MyClient.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
Any and all help will be much appreciated.
Thanks!
P
I'm a newb to java and all its properties, so please forgive the
ignorance.
I'm trying to compile a simple XmlRpcClient example using the apache
xmlrpc bin package and am having difficulty doing so successfully.
Would anyone care to help me out, please?
Here's the simple class:
<code>
import org.apache.xmlrpc.XmlRpcClient;
import java.util.Vector;
public class MyClient {
public static void main( String args[] ) throws Exception {
XmlRpcClient client = new XmlRpcClient( "http://localhost:
45000/" );
Vector params = new Vector();
params.addElement( "guest" );
Object result = client.execute( "show", params );
if ( result != null )
System.out.println( "Successfully showed guest
account." );
}
}
</code>
Here's the $CLASSPATH:
/opt/xmlrpc-3.1/lib/xmlrpc-server-3.1-sources.jar:/opt/xmlrpc-3.1/lib/echo $CLASSPATH
xmlrpc-server-3.1-javadoc.jar:/opt/xmlrpc-3.1/lib/xmlrpc-
server-3.1.jar:/opt/xmlrpc-3.1/lib/xmlrpc-common-3.1-sources.jar:/opt/
xmlrpc-3.1/lib/xmlrpc-common-3.1-javadoc.jar:/opt/xmlrpc-3.1/lib/
xmlrpc-common-3.1.jar:/opt/xmlrpc-3.1/lib/xmlrpc-client-3.1-
sources.jar:/opt/xmlrpc-3.1/lib/xmlrpc-client-3.1-javadoc.jar:/opt/
xmlrpc-3.1/lib/xmlrpc-client-3.1.jar:/opt/xmlrpc-3.1/lib/ws-commons-
util-1.0.2.jar:/opt/xmlrpc-3.1/lib/commons-logging-1.1.jar
Here's the error:
MyClient.java:1: cannot find symboljavac MyClient.java
symbol : class XmlRpcClient
location: package org.apache.xmlrpc
import org.apache.xmlrpc.XmlRpcClient;
^
MyClient.java:8: cannot find symbol
symbol : class XmlRpcClient
location: class MyClient
XmlRpcClient client = new XmlRpcClient( "http://localhost:
45000/" );
^
MyClient.java:8: cannot find symbol
symbol : class XmlRpcClient
location: class MyClient
XmlRpcClient client = new XmlRpcClient( "http://localhost:
45000/" );
^
Note: MyClient.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
Any and all help will be much appreciated.
Thanks!
P