1 Reply Latest reply on Jan 5, 2005 2:49 PM by Gerhard Otte

    Problem calling webservice from an EJB

    Gerhard Otte Newbie

      Hello !
      I try to access a webservice from an EJB (SLSB) that is deployed on JBoss 4.0.1 server (the EJB and the Webservices are located on the same server). The service uses rpc/encoded format and returns arrays of user defined objects in several of it's methods.

      In my EJB create function I'm usinf this code to access the webservice:

      URL url = new URL("http://localhost:8080/LvsWs/Item?wsdl");
       QName qname = new QName("http://x.y.z", "LVSItemJSE");
       sfItemService = ServiceFactory.newInstance();
       svcItemService = sfItemService.createService(url, qname);
       itemService = (LVSItemServicesEndpoint)svcItemService.getPort(LVSItemServicesEndpoint.class);
      


      I can successfully call methods that return user defined objects; but if i call a method that returns an array of user defined objects i get this message in the log file:
      2005-01-05 14:24:55,333 DEBUG [org.jboss.webservice.server.ServerEngine] LvsWs.war#ItemService.getItemStockInfoArr [trIn=0,glIn=0,invoke=47,glOut=0,trOut=0]
      2005-01-05 14:24:55,380 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Enter: handleResponse
      2005-01-05 14:24:55,380 DEBUG [org.jboss.webservice.handler.HandlerChainBaseImpl] Exit: handleResponse with status: true
      2005-01-05 14:24:55,396 ERROR [org.apache.axis.client.Call] Exception:
      org.xml.sax.SAXException: No deserializer defined for array type {http://lvsws.emediapark.de}LVSDoItemStockInfo
      at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:331)
      at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:466)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1180)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
      ...



      It looks like the axis client does not know the array.
      Calling the webservice from a vb-client via pocketSOAP is successfull.

      Can someone give me a hint/example.
      I thought about using the stub generated by wscompile (jwsdp-1.5) but
      havn't found any example yet.

      TIA Gerhard