Hi,

I need some explanation about the wsdl validator and wsdl2java generator tools 
(cxf/bin).
The tool wsdlvalidator generate error for a Document Literal's style WSDL that 
isn't
compatible with Basic Profile 1.1 standard.

I have the message:
<soap:envelope>
    <soap:body>
        <xElement>5</xElement>
        <yElement>5.0</yElement>
    </soap:body>
</soap:envelope>

A WSDL for such message can be written in three ways (see the end of the
mail for the samples)

Here are some BP1.1 statements (4.4.1 Bindings and Parts):
a. "R2201 A document-literal binding in a DESCRIPTION MUST, in each of
its soapbind:body element(s), have at most one part listed in the parts
attribute, if the parts attribute is specified."
b. "R2210 If a document-literal binding in a DESCRIPTION does not
specify the parts attribute on a soapbind:body element, the
corresponding abstract wsdl:message MUST define zero or one wsdl:parts."
c. "For document-literal bindings, the Profile requires that at most one
part, abstractly defined with the element attribute, be serialized into
the soap:Body element."

It's not clear if an envelope with more children in Body Part is BP1.1
compliant, because:
WSDL Sample 1: WSI-BP-1.1 R2210 violation
WSDL Sample 2: WSI-BP-1.1 R2201 violation
WSDL Sample 3: doesn't violate any rule, but it's not compliant with "c"
statement.

Could you confirm (or not) wsdl sample 3 (and its generated message) is
WSI-BP-1.1 compliant?

It's correct that wsdl tools (cxf/bin/wsdl2java and cxf/bin/wsdlvalidator) 
accept WSDL Sample 3 ?

Andrea Poli



------------------------------------------------------------------------------------------------------------------------------------------------------
WSDL Sample 1. Attribute parts not defined in soap:body
------------------------------------------------------------------------------------------------------------------------------------------------------
<wsdl:definitions>
    ...
    xsd definition for types:xElement and types:yElement
    ...
    <wsdl:message name="operationMsg">
        <wsdl:part element="types:xElement" name="param"/>
        <wsdl:part element="types:yElement" name="param2"/>
    </wsdl:message>
    ....
    <wsdl:portType name="service">
        <wsdl:operation name="operation">
            <wsdl:input message="ns:operationMsg" name="operationMsg"/>
            .....
        </wsdl:operation>
        .....
    </wsdl:portType>
    <wsdl:binding name="serviceBinding" type="ns:service">

        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="operation">
            ...
            <wsdl:input name="operationMsg">
*                 <soap:body use="literal"/>*
            </wsdl:input>
            ....
        </wsdl:operation>
    ...
    </wsdl:binding>
    ....
</wsdl:definitions>
------------------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------------------------------------
WSDL Sample 2. Attribute parts defined in one soap:body element
------------------------------------------------------------------------------------------------------------------------------------------------------
<wsdl:definitions>
    ...
    xsd definition for types:xElement and types:yElement
    ...
    <wsdl:message name="operationMsg">
        <wsdl:part element="types:xElement" name="param"/>
        <wsdl:part element="types:yElement" name="param2"/>
    </wsdl:message>
    ....
    <wsdl:portType name="service">
        <wsdl:operation name="operation">
            <wsdl:input message="ns:operationMsg" name="operationMsg"/>
            .....
        </wsdl:operation>
        .....
    </wsdl:portType>
    <wsdl:binding name="serviceBinding" type="ns:service">

        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="operation">
            ...
            <wsdl:input name="operationMsg">
*                 <soap:body parts="param param2" use="literal"/>*
            </wsdl:input>
            ....
        </wsdl:operation>
    ...
    </wsdl:binding>
    ....
</wsdl:definitions>
------------------------------------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------------------------------------
WSDL Sample 3. Attribute parts defined in two soap:body element
------------------------------------------------------------------------------------------------------------------------------------------------------
<wsdl:definitions>
    ...
    xsd definition for types:xElement and types:yElement
    ...
    <wsdl:message name="operationMsg">
        <wsdl:part element="types:xElement" name="param"/>
        <wsdl:part element="types:yElement" name="param2"/>
    </wsdl:message>
    ....
    <wsdl:portType name="service">
        <wsdl:operation name="operation">
            <wsdl:input message="ns:operationMsg" name="operationMsg"/>
            .....
        </wsdl:operation>
        .....
    </wsdl:portType>
    <wsdl:binding name="serviceBinding" type="ns:service">

        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

        <wsdl:operation name="operation">
            ...
            <wsdl:input name="operationMsg">
*               <soap:body parts="param" use="literal"/>
                <soap:body parts="param2" use="literal"/>*
            </wsdl:input>
            ....
        </wsdl:operation>
    ...
    </wsdl:binding>
    ....
</wsdl:definitions>
------------------------------------------------------------------------------------------------------------------------------------------------------






Reply via email to