1 Reply Latest reply on Oct 20, 2005 4:44 PM by Thomas Diesler

    SimpleDeserializer encountered a child element, which is NOT

    harlockcorsair Newbie

      Hi ,

      I've have wrote and deployed a web service in JBOSS 4.0.2 under freeBSD (java 1.4.2_p5). Everything works fine with a basic SOAP console sending raw XML request. The service runs fast and sends matching responses.

      But when trying to access the service via a servlet container for demo purpose the following message is raised :
      exception

      javax.servlet.ServletException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.; nested exception is:
      org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
      com.coordialis.business.service.web.servlets.impl.SDemoServlet.perform(SDemoServlet.java:79)
      com.coordialis.business.service.web.servlets.impl.SDemoServlet.doPost(SDemoServlet.java:47)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

      root cause

      org.jboss.axis.AxisFault: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
      org.jboss.axis.AxisFault.makeFault(AxisFault.java:99)
      org.jboss.axis.client.Call.invoke(Call.java:2667)
      org.jboss.axis.client.Call.invoke(Call.java:2538)
      org.jboss.axis.client.Call.invokeInternal(Call.java:1976)
      org.jboss.axis.client.Call.invoke(Call.java:1914)
      org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
      org.jboss.axis.client.Call.invoke(Call.java:1871)
      com.coordialis.business.service.web.servlets.impl.SDemoServlet.perform(SDemoServlet.java:76)
      com.coordialis.business.service.web.servlets.impl.SDemoServlet.doPost(SDemoServlet.java:47)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


      The invoking client code is :

      Context objCtx = this.__createContext(this.getJNDIProps());
      QueryViadilisService service = (QueryViadilisService) objCtx.lookup("comp/env/service/QueryViadilisService");
      QName portName = new QName("http://www.coordialis.com/ws/wsdl/viadilis", "queryViadilisPort");
      QName operationName = new QName("http://www.coordialis.com/ws/wsdl/viadilis", "getViadilisEntities");

      Call call = service.createCall(portName, operationName);

      request.setAttribute("entities", call.invoke(operationName, new Object[]{objQuery}));


      Activated traces on the server clearly show that the message is sent and nicely processed by the web service. But the deserialization fails on jax-rpc client side in the servlet container. The container is the same for the demo servlet and the web services. Does anyone has an idea ? This is the very last point of our development to show the efficiency of our service and we are blocked on arrival close to the release date.