0 Replies Latest reply on Feb 16, 2006 6:34 AM by mavalla

    WSMessageEndpoints not working in WS4EE?

    mavalla

      Hello,
      I am trying to implement a webservice similar to the message endpoints example that was posted at the wiki http://www.jboss.org/wiki/Wiki.jsp?page=WSMessageEndpoints.

      It doesn't seem to work under Jboss-4.0.4 and WS4EE.
      It doesn't give any error, but when I construct the response using dom and I send it to the serializer the client gets an empty response.

      The interfaz of the webservice is:

      public Element getCacheAvailabilityPrice(CacheAvailabilityPriceRequest input) throws RemoteException;


      The server side webservice sends the response like this:
       // Setup document builder
       DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
       //docBuilderFactory.setNamespaceAware(true);
      
       // Prepare response
       DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();
      
       return doc.getDocumentElement();
      


      This is what the client receives:
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Body>
       <ns1:getCacheAvailabilityPriceResponse xmlns:ns1="http://ReservationSystem.hotelebusiness.com/webservices/types">
       <result/>
       </ns1:getCacheAvailabilityPriceResponse>
       </soapenv:Body>
      </soapenv:Envelope>


      I see that the type Element is mapped to tns:Element instead of xsd:anyType like in the example of the wiki. The rest seems similar.

      The part of the WSDL for the Element object is like this:
      <complexType name="getCacheAvailabilityPriceResponse">
      -
       <sequence>
      <element name="result" nillable="true" type="tns:Element"/>
      </sequence>
      </complexType>
      -
       <complexType name="Element">
      -
       <sequence>
      <element name="nodeValue" nillable="true" type="string"/>
      <element name="prefix" nillable="true" type="string"/>
      <element name="textContent" nillable="true" type="string"/>
      </sequence>
      </complexType>


      If you need more information just let me know.

      Thank you very much for your time and your attention.
      Manuel Valladares