Users - Problem with deserializing SOAP response message

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Users - Problem with deserializing SOAP response message

Anna  Schietz
hi,

I want to make a list of all categories of a catalog available in a spring
application. I couldn't figure out what all the RMI stuff is about so I
decided to use SOAP ;-)

I *finally* managed to call the service but now I get an error concerning
the responsemessage. The error was already reportetd elsewhere (e.g.
http://www.codecomments.com/archive420-2005-7-539685.html)... is this an
OfBiz bug? Is there nothing I can do about it?


*********************************************************
My test service (I used an existing service to minimze the amount of
mistakes I could make ;-):

<service name="getVariantCombinations" engine="java"
location="org.ofbiz.product.feature.ProductFeatureServices" export="true"
auth="false" invoke="getVariantCombinations">
                <description>....</description>
                <attribute type="String" mode="IN" name="productId" optional="false"/>
                <attribute type="List" mode="OUT" name="featureCombinations"
optional="false"/>
        </service>

    <service name="remoteGetVariantCombinations" engine="soap" export="true"
location="http://localhost:8080/webtools/control/SOAPService"
invoke="getVariantCombinations" auth="false">
        <description>Customer specific Price for defined
Product/Customer</description>
        <!--namespace>http://localhost:8080/</namespace-->
        <namespace>http://www.w3.org/2001/XMLSchema</namespace>
       
<!--namespace>http://schemas.xmlsoap.org/soap/encoding/</namespace-->
        <attribute type="String" mode="IN" name="productId"
optional="false"/>
                <attribute type="List" mode="OUT" name="featureCombinations"
optional="false"/>
     </service>

*********************************************************
And this is how I call it:

  String urlString="http://localhost:8080/webtools/control/SOAPService/";
  Call call = new Call();
 
call.setFullTargetObjectURI("http://localhost:8080/webtools/control/SOAPService/remoteGetVariantCombinations");
  call.setMethodName("remoteGetVariantCombinations");
  call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
  //call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);

  Vector params = new Vector();
  //params.addElement(new Parameter("login.username", String.class, "admin",
null));
  //params.addElement(new Parameter("login.password", String.class, "ofbiz",
null));
  params.addElement(new Parameter("productId", String.class,productId,
null));

 //adding the parameter(s) to the Call object
  call.setParams(params);

 //invoke the soap method
  Response res = call.invoke(new URL(urlString), "");




*********************************************************
And here is the nice stacktrace:
195763 (http-0.0.0.0-8080-Processor8) [     RequestManager.java:123:INFO ]
[RequestManager.getRequestAttribute] Value for attribute "null" of uri
"SOAPService" not found
195763 (http-0.0.0.0-8080-Processor8) [     RequestHandler.java:399:INFO ]
[RequestHandler.doRequest]: Response is handled by the event.
195795 (http-0.0.0.0-8080-Processor8) [     ControlServlet.java:258:DEBUG]
[[[SOAPService] Done rendering page, Servlet Finished- total:9.846,since
last([SOAPService] Set...):9.846]]
195795 (http-0.0.0.0-8080-Processor1) [               Call.java:2450:ERROR]
Exception:

195857 (http-0.0.0.0-8080-Processor1) [  ServiceDispatcher.java:381:DEBUG]
[[Sync service failed...- total:0.0,since last(Begin):0.0]] - 'webtools /
remoteGetVariantCombinations'
195873 (http-0.0.0.0-8080-Processor1) [  ServiceDispatcher.java:384:ERROR]
---- exception report
----------------------------------------------------------
Service [remoteGetVariantCombinations] threw an unexpected exception/error
Exception: org.ofbiz.service.GenericServiceException
Message: RPC error (; nested exception is:
        org.xml.sax.SAXException: Deserializing parameter 'responseMessage':  could
not find deserializer for type
{http://schemas.xmlsoap.org/soap/encoding/}string)
---- stack trace
---------------------------------------------------------------
org.ofbiz.service.GenericServiceException: RPC error (; nested exception is:

        org.xml.sax.SAXException: Deserializing parameter 'responseMessage':  could
not find deserializer for type
{http://schemas.xmlsoap.org/soap/encoding/}string)
org.ofbiz.service.engine.SOAPClientEngine.serviceInvoker(SOAPClientEngine.java:165)
org.ofbiz.service.engine.SOAPClientEngine.runSync(SOAPClientEngine.java:82)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:339)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:110)
org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:239)
org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:415)
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:251)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:191)
org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:87)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:258)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: Deserializing parameter
'responseMessage':  could not find deserializer for type
{http://schemas.xmlsoap.org/soap/encoding/}string
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
Deserializing parameter 'responseMessage':  could not find deserializer for
type
{http://schemas.xmlsoap.org/soap/encoding/}string
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
org.apache.axis.client.Call.invoke(Call.java:2448)
org.apache.axis.client.Call.invoke(Call.java:2347)
org.apache.axis.client.Call.invoke(Call.java:1804)
org.ofbiz.service.engine.SOAPClientEngine.serviceInvoker(SOAPClientEngine.java:163)
org.ofbiz.service.engine.SOAPClientEngine.runSync(SOAPClientEngine.java:82)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:339)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:110)
org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:239)
org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:415)
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:251)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:191)
org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:87)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:258)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)
        {http://xml.apache.org/axis/}hostname:xx
org.xml.sax.SAXException: Deserializing parameter 'responseMessage':  could
not find deserializer for type
{http://schemas.xmlsoap.org/soap/encoding/}string
org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
org.apache.axis.client.Call.invoke(Call.java:2451)
org.apache.axis.client.Call.invoke(Call.java:2347)
org.apache.axis.client.Call.invoke(Call.java:1804)
org.ofbiz.service.engine.SOAPClientEngine.serviceInvoker(SOAPClientEngine.java:163)
org.ofbiz.service.engine.SOAPClientEngine.runSync(SOAPClientEngine.java:82)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:339)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:110)
org.ofbiz.webapp.event.SOAPEventHandler.invoke(SOAPEventHandler.java:239)
org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:415)
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:251)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:191)
org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:87)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:258)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)
Caused by: org.xml.sax.SAXException: Deserializing parameter
'responseMessage':  could not find deserializer for type
{http://schemas.xmlsoap.org/soap/encoding/}string
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
org.apache.axis.client.Call.invoke(Call.java:2448)
       

--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users