This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Services and the fly likes problem while invoking jaxrpc web service from java client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem while invoking jaxrpc web service from java client" Watch "problem while invoking jaxrpc web service from java client" New topic
Author

problem while invoking jaxrpc web service from java client

Prema Durai
Greenhorn

Joined: Aug 27, 2009
Posts: 10
Hi,

I am trying to invoke a jaxrpc web service from a stand alone java class.
I use the interface to create proxy as:

ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(wsdl,SERVICE_QNAME);
RatingWorksheet_PortType myProxy =
(RatingWorksheet_PortType) service.getPort(
// new QName(nameSpaceUri, PORT_NAME),
PORT_QNAME,
RatingWorksheet_PortType.class);

I set the values as:
reqStdInfo.setRequestTmstmp(date);
reqStdInfo.setRequestTrackingNbr("");
reqType.setRequestStdInfo(reqStdInfo);

req.setIn(reqType);
resp = myProxy.getRatingWorkSheet(req);
System.out.println("out response"+resp.getOut());
where getRatingWorkSheet is the method i have to invoke.

I get the following error while invoking the method:

Aug 27, 2009 5:20:18 AM com.ibm.ws.ssl.config.SSLConfigManager
INFO: ssl.disable.url.hostname.verification.CWPKI0027I
Aug 27, 2009 5:20:18 AM com.ibm.ws.webservices.engine.SOAPPart _getWebServicesInputSource
SEVERE: WSWS3227E: Error: Exception:
WebServicesFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultString: java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
faultActor: null
faultDetail:

java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:281)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:925)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:840)
at com.ibm.ws.webservices.engine.SOAPPart._getWebServicesInputSource(SOAPPart.java:974)
at com.ibm.ws.webservices.engine.SOAPPart.getAsWebServicesInputSource(SOAPPart.java:598)
at com.ibm.ws.webservices.engine.Message.getContentType(Message.java:578)
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:542)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:929)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:722)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:673)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:495)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1729)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1680)
at com.ibm.ws.webservices.multiprotocol.AgnosticCall.invoke(AgnosticCall.java:236)
at com.ibm.ws.webservices.multiprotocol.base.DefaultlInvocationHandler.invokeOperation(DefaultlInvocationHandler.java:203)
at com.ibm.ws.webservices.multiprotocol.models.ModelInvocationHandler.invoke(ModelInvocationHandler.java:88)
at $Proxy0.getRatingWorkSheet(Unknown Source)
at com.hanover.www.RatingWorksheet.InvokeRatingWorksheet.main(InvokeRatingWorksheet.java:69)
Caused by: java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
at com.ibm.ws.webservices.engine.utils.MCUtils.interceptSerializationException(MCUtils.java:141)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPEnvelope.outputImpl(SOAPEnvelope.java:369)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.output(SOAPElement.java:2076)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:921)
... 20 more
Aug 27, 2009 5:20:18 AM com.ibm.ws.webservices.engine.PivotHandlerWrapper invoke
WARNING: WSWS3734W: Warning: Exception caught from invocation to com.ibm.ws.webservices.engine.transport.http.HTTPSender:
WebServicesFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultString: java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
faultActor: null
faultDetail:

java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:281)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:925)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:840)
at com.ibm.ws.webservices.engine.SOAPPart._getWebServicesInputSource(SOAPPart.java:974)
at com.ibm.ws.webservices.engine.SOAPPart.getAsWebServicesInputSource(SOAPPart.java:598)
at com.ibm.ws.webservices.engine.Message.getContentType(Message.java:578)
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:542)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:929)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:722)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:673)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:495)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1729)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1680)
at com.ibm.ws.webservices.multiprotocol.AgnosticCall.invoke(AgnosticCall.java:236)
at com.ibm.ws.webservices.multiprotocol.base.DefaultlInvocationHandler.invokeOperation(DefaultlInvocationHandler.java:203)
at com.ibm.ws.webservices.multiprotocol.models.ModelInvocationHandler.invoke(ModelInvocationHandler.java:88)
at $Proxy0.getRatingWorkSheet(Unknown Source)
at com.hanover.www.RatingWorksheet.InvokeRatingWorksheet.main(InvokeRatingWorksheet.java:69)
Caused by: java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
at com.ibm.ws.webservices.engine.utils.MCUtils.interceptSerializationException(MCUtils.java:141)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPEnvelope.outputImpl(SOAPEnvelope.java:369)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.output(SOAPElement.java:2076)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:921)
... 20 more
WebServicesFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultString: java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
faultActor: null
faultDetail:

java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:281)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:925)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:840)
at com.ibm.ws.webservices.engine.SOAPPart._getWebServicesInputSource(SOAPPart.java:974)
at com.ibm.ws.webservices.engine.SOAPPart.getAsWebServicesInputSource(SOAPPart.java:598)
at com.ibm.ws.webservices.engine.Message.getContentType(Message.java:578)
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:542)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:929)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:722)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:673)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:495)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1729)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1680)
at com.ibm.ws.webservices.multiprotocol.AgnosticCall.invoke(AgnosticCall.java:236)
at com.ibm.ws.webservices.multiprotocol.base.DefaultlInvocationHandler.invokeOperation(DefaultlInvocationHandler.java:203)
at com.ibm.ws.webservices.multiprotocol.models.ModelInvocationHandler.invoke(ModelInvocationHandler.java:88)
at $Proxy0.getRatingWorkSheet(Unknown Source)
at com.hanover.www.RatingWorksheet.InvokeRatingWorksheet.main(InvokeRatingWorksheet.java:69)
Caused by: java.io.IOException: WSWS3701E: Error: An exception was encountered. Use the wsdeploy command to deploy your application. The exception is java.io.IOException: WSWS3031E: Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings. Debug deploy artifact build numbers={pre-WAS 6.0 build}
at com.ibm.ws.webservices.engine.utils.MCUtils.interceptSerializationException(MCUtils.java:141)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPEnvelope.outputImpl(SOAPEnvelope.java:369)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.output(SOAPElement.java:2076)
at com.ibm.ws.webservices.engine.SOAPPart.writeTo(SOAPPart.java:921)
... 20 more

Kindly help me in resolving the issue..I use RAD to generate client and websphere6.1 version..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42372
    
  64
Error: Serialization cannot occur for com.hanover.www.RatingWorksheet.GetRatingWorkSheetRequest. There are no registered type mappings.

That's the important part. Check the documentation of the tool/SOAP stack you're using for instructions on how to register type mappings.


Ping & DNS - my free Android networking tools app
Prema Durai
Greenhorn

Joined: Aug 27, 2009
Posts: 10
Thanks for the reply..when i try to do the following, i am unable to registry the mapping:
SOAPMappingRegistry smr = new SOAPMappingRegistry();
reg.mapTypes( "http://schemas.xmlsoap.org/soap/encoding/", new QName("http://schemas.xmlsoap.org/soap/encoding/" , "GetRatingWorkSheetRequest"),
GetRatingWorkSheetRequest.class, beanSer, beanDer );

i get the error as the arguments are not matching, though i give the exact arguments expected.

Can anybody tell me the different methods to invoke a jax-rpc web service?
Is it only through stubs or I can use the proxy method(which jax-ws uses)?

Thanks in advance..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42372
    
  64
Post the actual full error message.
Prema Durai
Greenhorn

Joined: Aug 27, 2009
Posts: 10

Serializer beanSer = new Serializer();
Deserializer beanDer;
reg.mapTypes( "http://schemas.xmlsoap.org/soap/encoding/", new QName("http://schemas.xmlsoap.org/soap/encoding/" , "GetRatingWorkSheetRequest"),
GetRatingWorkSheetRequest.class, beanSer, beanDer );

Error i get:

The method maptypes(String,QName,Class,Serializer,Deserializer) in type XMLJavaMappingRegistry is not applicable for the arguments(String,QName,Class<GetRatingWorkSheetRequest>,Serializer,Deserializer)
chets patel
Ranch Hand

Joined: Apr 27, 2010
Posts: 77

Hi
I am getting the same error .... Can any one please help....
I tried to add the _Helper class, _Deser class and _Ser class....
But still getting the same error...
Please help as soon as possible
 
 
subject: problem while invoking jaxrpc web service from java client