No. "wrapped" is not a valid option for the WSDL style attribute. The WSDL is correct.

On 11/18/05, Ebert, Chris < [EMAIL PROTECTED]> wrote:
I think you need to say 'wrapped' in the binding instead of 'document'.

Chris


-----Original Message-----
From: Greg Adams [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 18, 2005 12:08
To: [email protected]
Subject: WSDL2Java and wrapped vs document style

Given the following WSDL:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions
    xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:tns="urn:WidgetPrice"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:http=" http://schemas.xmlsoap.org/wsdl/http/"
    targetNamespace="urn:WidgetPrice"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
        <s:schema elementFormDefault="qualified"
targetNamespace="urn:WidgetPrice">
            <s:element name="StateIdentifier">
                <s:complexType>
                    <s:all>
                        <s:element name="userContextId" type="s:string"
/>
                        <s:element name="convId" type="s:string" />
                    </s:all>
                </s:complexType>
            </s:element>
            <s:element name="setWidgetPrice">
                <s:complexType>
                    <s:sequence>
                        <s:element name="name" type="s:string" />
                        <s:element name="price" type="s:float" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="setWidgetPriceResponse">
                <s:complexType />
            </s:element>
            <s:element name="getWidgetPrice">
                <s:complexType>
                    <s:sequence>
                        <s:element name="name" type="s:string" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="getWidgetPriceResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element name="getWidgetPriceResult"
type="s:float" />
                    </s:sequence>
                </s:complexType>
            </s:element>
        </s:schema>
    </wsdl:types>

    <wsdl:message name="setWidgetPriceRequest">
        <wsdl:part name="state_header" element="tns:StateIdentifier" />
        <wsdl:part name="parameters" element="tns:setWidgetPrice" />
    </wsdl:message>
    <wsdl:message name="setWidgetPriceResponse">
        <wsdl:part name="parameters"
element="tns:setWidgetPriceResponse" />
    </wsdl:message>
    <wsdl:message name="getWidgetPriceRequest">
        <wsdl:part name="state_header" element="tns:StateIdentifier" />
        <wsdl:part name="parameters" element="tns:getWidgetPrice" />
    </wsdl:message>
    <wsdl:message name="getWidgetPriceResponse">
        <wsdl:part name="parameters"
element="tns:getWidgetPriceResponse" />
    </wsdl:message>

    <wsdl:portType name="WidgetPriceSoap">
        <wsdl:operation name="setWidgetPrice">
            <wsdl:input message="tns:setWidgetPriceRequest" />
            <wsdl:output message="tns:setWidgetPriceResponse" />
        </wsdl:operation>
        <wsdl:operation name="getWidgetPrice">
            <wsdl:input message="tns:getWidgetPriceRequest" />
            <wsdl:output message="tns:getWidgetPriceResponse" />
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="WidgetPriceSoapBinding"
type="tns:WidgetPriceSoap">
        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="setWidgetPrice">
            <soap:operation soapAction="urn:WidgetPrice/setWidgetPrice"
style="document"/>
            <wsdl:input name="setWidgetPriceRequest">
                <soap:body parts="parameters" use="literal" />
                <soap:header message="tns:setWidgetPriceRequest"
part="state_header" use="literal" />
            </wsdl:input>
            <wsdl:output name="setWidgetPriceResponse">
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getWidgetPrice">
            <soap:operation soapAction="urn:WidgetPrice/getWidgetPrice"
style="document" />
            <wsdl:input name="getWidgetPriceRequest">
                <soap:body parts="parameters" use="literal" />
                <soap:header message="tns:getWidgetPriceSoapIn"
part="state_header" use="literal" />
            </wsdl:input>
            <wsdl:output name="getWidgetPriceResponse">
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="WidgetPrice">
        <wsdl:port name="WidgetPriceSoap"
binding="tns:WidgetPriceSoapBinding">
            <soap:address
location="http://localhost:2892/NetWidgetPrice/Service.asmx" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


Why does WSDL2Java automatically create a "document" style service, when
what I want is a "wrapped" style service?

Greg


Reply via email to