Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling webservice using jax-rpc client

gaurav_jainJun 24 2009
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2009
Added on Jun 24 2009
0 comments
444 views