Hello everybody
I am investigating how to use cocoon as a webservice-server. But I can't
find out how to use(call) the webservices in Axis block samples. There
is only one example there and that is using Perl !!!
Can someone PLEASE post a simple Axis client code that works with those
examples services ? The problem is how to spesify the servicename. This
is what I have, but doesn't work. It gives me : "The AXIS engine could
not find a target service to invoke! targetService is null"
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class TestClient {
public static void main(String [] args) {
try {
String endpoint =
"http://localhost:8888/samples/blocks/axis/rpcrouter/Version";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName("getVersion");
String ret = (String) call.invoke( new Object[] { "Hello!" } );
System.out.println( ret );
} catch (Exception e) {
System.err.println(e.toString());
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]