I am developing a web service client to consume a web service that returns an Object not a
String. When I make the webservice return a String it works perfectly, when I switch to a
Object then it throws this exception:
org.xml.sax.SAXException: Deserializing parameter 'result': could not find
deserializer for type
{http://ericsson.webservice.ems.com.br/EricssonMockingWebService/types}SendResponse
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:330)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1188)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
at
org.apache.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1407)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:263)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:397)
at org.apache.axis.client.Call.invoke(Call.java:2652)
at org.apache.axis.client.Call.invoke(Call.java:2524)
at org.apache.axis.client.Call.invokeInternal(Call.java:1976)
at org.apache.axis.client.Call.invoke(Call.java:1917)
at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:175)
at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:251)
at $Proxy145.send(Unknown Source)
at
br.com.ouvi.ems.gw.ericssonipx.ejb.EricssonIPXWebServiceHelperEJB.sendSms(EricssonIPXWebServiceHelperEJB.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
at
org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:854)
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:82)
at $Proxy143.sendSms(Unknown Source)
My client looks like this.
public SendResponse sendSms(String smsMessage) throws WebserviceException {
SendResponse sendSmsResponse;
sendSmsResponse = null;
try {
System.out.println("Contacting webservice at
http://localhost:8080/ws4ee/services/EricssonMockingWebService?wsdl");
URL url = new
URL("http://localhost:8080/ws4ee/services/EricssonMockingWebService?wsdl");
QName qname = new QName("http://ericsson.webservice.ems.com.br",
"EricssonMockingWebService");
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(url, qname);
EricssonMockingWebServiceEndpoint endpoint =
(EricssonMockingWebServiceEndpoint)
service.getPort(EricssonMockingWebServiceEndpoint.class);
System.out.println("output:" +
endpoint.send("blablabalblabl"));
} catch (Exception ex) {
logger.error("Exception doing sms request for IPX: " + ex.getMessage(),
ex);
throw new WebserviceException(ex.getMessage(), ex);
}
return sendSmsResponse;
}
The exception is thrown from the line:
System.out.println("output:" + endpoint.send("blablabalblabl"));
I am guessing I am missing a deserializer class that is produced by the wstools, but I
haven't been able to find out which yet.
Anybody experienced the same problem?
Best regards,
Eivind
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263600#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...