This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Unabel to hit the webservice usind DII approach Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Unabel to hit the webservice usind DII approach" Watch "Unabel to hit the webservice usind DII approach" New topic
Author

Unabel to hit the webservice usind DII approach

jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54
Hi All,

I am trying to invoke webservices through DII approach and followed some samples which are provided.

Most of the samples provided passes String datatype as input and recieves the same datatype as output.

In my case I want to pass a request bean object and get back a response bean object.

I was able to invoke the wsdl using the classes provided in SAAJ api but not using rpc.Call class.



SampleInput and SampleOutput are the request response classes which has got only the getters and setters. When using the SAAJ classes these classes were not used.

When I execute the above snippet I faced a error as below,

javax.xml.rpc.JAXRPCException: failed to invoke operation 'getDefaultRechargeValues' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed to serialize class com.sample.SampleInputweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class com.sample.SampleInput class context=TypedClassContext{schemaType=['http://www.sample.com/sample/workflow/samplereqcs']:SampleInput}]StackTrace[

javax.xml.soap.SOAPException: failed to serialize class com.sample.SampleInputweblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class com.sample.SampleInput class context=TypedClassContext{schemaType=['http://www.sample.com/sample/workflow/samplereqcs']:SampleInput}
at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:339)
at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:304)
at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:651)
at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:209)
at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:146)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:473)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:459)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:569)
at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:422)
at com.sample.SampleDynamic.testService(SampleDynamic.java:112)
at com.sample.SampleDynamic.main(SampleDynamic.java:55)
Caused by: weblogic.xml.schema.binding.SerializationException: mapping lookup failure. class=class com.sample.SampleInput class context=TypedClassContext{schemaType=['http://www.sample.com/sample/workflow/samplereqcs']:SampleInput}


I am not sure where I have gone wrong.

Thanks
 
jQuery in Action, 2nd edition
 
subject: Unabel to hit the webservice usind DII approach
 
Similar Threads
javax.xml.rpc.JAXRPCException when using Call.invoke() to invoke a web-method using a dynamic client
Problem invoking web service using dynamic client with WSDL
how to invoke a webservice
Invoking webservice in one application through a dynamic client in other application
JAX-RPC Client invoking Document based web service