Hi All,
I have developed a jax-rpc webservice client that is working fine as a stand-alone application.
But when I integrate it with another application that is deployed on weblogic application server, I am getting the following exception
java.lang.ClassCastException: weblogic.webservice.core.soap.SOAPMessageImpl cannot be cast to com.sun.xml.messaging.saaj.soap.MessageImpl
at com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
at com.example.CreateUserSoap_Stub.helloWorld(CreateUserSoap_Stub.java:117)
at com.example.Client.CreateProfile(Client.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
The code snippet is
System.out.println("*********In Create Profile Class*******"+username);
Stub stub = createProxy();
stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,"url");
stub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "username");
stub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, "password");
CreateUserSoap hello = (CreateUserSoap)stub;
System.out.println(hello.helloWorld());
I think it is conflicting with some jar file in weblogic.
If anyone has any idea how to resolve the same, please let me know.
Thanks
Gaurav