Hi All,
I've written two clients (DII and static stub client) for my webservice.The DII client works fine but not able to write the static stub client.Here is the my static stub client code :
Stub stub = (Stub) (new CommerceItemService_Impl().getProductCollectionServicePort());
stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:8080/commerceItems/ProductCollection");
System.out.println(stub._getProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY));
ProductCollectionService service =(ProductCollectionService) stub;
service.testMethod();
Want to invoke the web-service method "testMethod()" ,but gives following error:
Exception in thread "main" java.lang.ClassCastException: org.jboss.axis.Message
at com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
at com.clientproject.commerceItems.client.stubs.ProductCollectionService_Stub.testMethod(ProductCollectionService_Stub.java:69)
at com.clientproject.commerceItems.client.stubs.StaticStubClient.main(StaticStubClient.java:20)
--
Sonal