Title: Need WSDL for this SOAP message
Ah, but this isn't correct. When using doc/literal, your message <part> definitions must reference an element definition rather than a type definition.
 
So in your <types> section you also need to define an <element> definition for each message part. It should look like this:
 
<types>
   <xsd:schema 
       targetNamespace="http://www.tlr.bis.com/rating.xsd1" 
       xmlns="http://schemas.xmlsoap.org/wsdl/" 
       xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"        
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:tns="http://www.tlr.bis.com/rating.wsdl"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:xsd1="http://www.tlr.bis.com/rating.xsd1">
            <xsd:element name=RatingAttributes type=xsd1:RatingAttributesType">
            <xsd:complexType name="RatingAttributesType">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="user" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="date" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="usageType" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="database" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name=PriceInfo type=xsd1:PriceInfoType">            
            <xsd:complexType name="PriceInfoType">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="standardRate" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="standardCurrency" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="standardUnit" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="isIncluded" type="xsd:boolean"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </types>
   
    <message name="RatingResponse">
        <part name="RatingResponse" element="xsd1:PriceInfo"/>
    </message>
    <message name="RatingRequest">
        <part name="RatingRequest" element="xsd1:RatingAttributes"/>
    </message>

----- Original Message -----
Sent: Wednesday, July 30, 2003 5:35 PM
Subject: RE: Need WSDL for this SOAP message

Here is a wsdl I used to create a doc/literal service. The WSDL is defined as usual, with all the standard parts, no matter what style.
 
<?xml version="1.0" encoding="UTF-8"?>
<definitions  name="demo"   targetNamespace="
http://www.tlr.bis.com/rating.wsdl"   xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.tlr.bis.com/rating.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.tlr.bis.com/rating.xsd1">
    <types>
        <xsd:schema targetNamespace="
http://www.tlr.bis.com/rating.xsd1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.tlr.bis.com/rating.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.tlr.bis.com/rating.xsd1">
            <xsd:complexType name="RatingAttributes">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="user" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="date" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="usageType" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="database" type="xsd:string"/>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:complexType name="PriceInfo">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="1" name="standardRate" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="standardCurrency" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="standardUnit" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="1" name="isIncluded" type="xsd:boolean"/>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </types>
   
    <message name="RatingResponse">
        <part name="RatingResponse" type="xsd1:PriceInfo"/>
    </message>
    <message name="RatingRequest">
        <part name="RatingRequest" type="xsd1:RatingAttributes"/>
    </message>
   
    <portType name="RatingServicePort">
        <operation name="getRate">
            <input message="tns:RatingRequest"/>
            <output message="tns:RatingResponse"/>
        </operation>
    </portType>
   
    <binding name="RatingServiceBinding" type="tns:RatingServicePort">
        <soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
        <operation name="getRate">
            <soap:operation soapAction="RatingPortType#getRate" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="RatingService">
        <port binding="tns:RatingServiceBinding" name="RatingService">
            <soap:address location="
http://localhost:8080/axis/services/RatingService"/>
        </port>
        <port binding="tns:RatingServiceBinding" name="RatingService.debug">
            <soap:address location="
http://localhost:8070/axis/services/RatingService"/>
        </port>
    </service>
</definitions>
-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 4:24 PM
To: '[EMAIL PROTECTED]'
Subject: Need WSDL for this SOAP message


This is from the Axis Users Guide, in the section explaining the difference between Document and Wrapped services:

<soap:Envelope xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  <soap:Body>
    <myNS:PurchaseOrder xmlns:myNS="http://commerce.com/PO">
      <item>SK001</item>
      <quantity>1</quantity>
      <description>Sushi Knife</description>
    </myNS:PurchaseOrder>
  </soap:Body>
</soap:Envelope>

I would really like to see the (a?) WSDL document that was used to produce this message.

In my experimentation with Java2WSDL, I keep getting what I think is an extra step-- I get this:
<wsdl:message name="purchaseOrderRequest">
  <wsdl:part name="parameters" element="impl:purchaseorder"/>
</wsdl:message>

Then two schemas at the top-- purchaseorder has one element named 'in0', and it is of type PurchaseOrder.  Then the second schema for PurchaseOrder which is what I really want, just the three item/quantity/description elements inside the parent PurchaseOrder tag, directly inside the Body tag.

If that didn't make any sense, I think I'm becoming incoherent due to frustration and lack of knowledge.

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM

Reply via email to