0 Replies Latest reply on May 27, 2005 4:32 AM by Johan Borchers

    b2b doc/lit WS app = very cool

    Johan Borchers Newbie


      I was triggered by the statement of Thomas Diesler believing in the future of doc/lit style. So I wanted to get it to work in JBoss 4. I managed to get an example working following the instruction on the WIKI.
      But I did not like to implement the wrapped method and the extra surrounding element in my SOAP body.

      Now I did implement the doc/lit style but without "wrapped" class as proposed on the WIKI pages.
      The only thing I did was to make my WSDL file by myself. I also did make a separate XSD file for the types section.
      I used wscompile to generate some beans from the WSDL file.
      Now you can use a clean SEI. You don't have to implement a sort of wrapped method in the SEI.
      What I found was, do not make the name of the operation the same as the name of the element used in the input element. This is a sort of special case in WSDL. But this happens when you generate WSDL with wscompile from a SEI class.
      I also implemented the "clean" method in a session bean.
      JBoss isn't complaining due to WSDD file. And you don't have the extra element anymore in your SOAP body. You just sent a "PurchaseOrder" in the SOAP body and not a "submitPurchaseOrder" with in it a "PurchaseOrder".

      Maybe it is a good idea to put my example step by step on the WIKI?
      (I don't know how to do that at the moment)

      I'm very very, VERY happy.


      The WSDL file (by hand)

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name="ProductionOrderService"
       <schema targetNamespace="http://www.vda.nl/pc/production/order/type"
       <include schemaLocation="http://www.solcon.nl/jborchers/ProductionOrder.xsd"/>
       <message name="ProductionOrderRequest">
       <part name="parameters" element="ns1:ProductionOrder"/>
       <message name="ProductionOrderResponse">
       <part name="result" element="ns1:ProductionOrderStatus"/>
       <message name="ProductionOrderException">
       <part name="error" element="ns1:ProductionOrderException"/>
       <portType name="ProductionOrderSEI">
       <operation name="submitProductionOrder">
       <input message="tns:ProductionOrderRequest"/>
       <output message="tns:ProductionOrderResponse"/>
       <fault name="ProductionOrderFault" message="tns:ProductionOrderException"/>
       <binding name="ProductionOrderSEIBinding" type="tns:ProductionOrderSEI">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
       <operation name="submitProductionOrder">
       <soap:operation soapAction=""/>
       <soap:body use="literal"/>
       <soap:body use="literal"/>
       <fault name="ProductionOrderFault">
       <soap:fault name="ProductionOrderFault" use="literal"/>
       <service name="ProductionOrderService">
       <port name="ProductionOrderSEIPort" binding="tns:ProductionOrderSEIBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL"/>