Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6488

Binding style vs part type R2203 And R2204 problems in wsdl document

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.1.3, 2.7.18, 3.0.7
    • Tooling, WS-* Components
    • None
    • apache-cxf 3.0.1

    • Novice

    Description

      Why Apache-cxf wsdl validator returns error:
      "WSDLValidator Error : A document-literal binding in a DESCRIPTION MUST refer, in each of its soapbind:body element(s),only to wsdl:part element(s) that have been defined using the element attribute."
      Validator takes messages' parts from operations despite of style of usage (mime:content here) and returns error if soap binding style does not match part type/element. At the same time this document is marked as correct on http://www.ws-i.org web page. So i do not understand, is it an apache-cxf bug or ws-i web page does not follow their standards?
      validating following document http://www.ws-i.org/profiles/attachmentsprofile-1.0.html#Referencing_Attachments_from_the_SOAP_Envelope (here it is correct):

      <?xml version="1.0" encoding="utf-8" ?> 
      <wsdl:definitions xmlns:types="http://example.com/mimetypes"
                        xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd"
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                        xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
                        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
                        targetNamespace="http://example.com/mimewsdl"
                        xmlns:tns="http://example.com/mimewsdl">
      
          <wsdl:types>
              <xsd:schema targetNamespace="http://example.com/mimetypes"
                      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      
                  <xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd" />
                  <xsd:element name="ClaimDetail" type="types:ClaimDetailType"/>
                  <xsd:complexType name="ClaimDetailType">
                      <xsd:sequence>
                          <xsd:element name="Name" type="xsd:string"/>
                          <xsd:element name="ClaimForm" type="ref:swaRef"/>
                      </xsd:sequence>
                  </xsd:complexType>
                  <xsd:element name="ClaimRefNo" type="xsd:string"/>
              </xsd:schema>
          </wsdl:types>
      
          <wsdl:message name="ClaimIn">
              <wsdl:part name="body" element="types:ClaimDetail"/>
              <wsdl:part name="ClaimPhoto" type="xsd:base64Binary"/>
          </wsdl:message>
      
          <wsdl:message name="ClaimOut">
              <wsdl:part name="out" element="types:ClaimRefNo"/>
          </wsdl:message>
      
          <wsdl:portType name="ClaimPortType">
              <wsdl:operation name="SendClaim">
                  <wsdl:input message="tns:ClaimIn"/>
                  <wsdl:output message="tns:ClaimOut"/>
              </wsdl:operation>
          </wsdl:portType>
      
          <wsdl:binding name="ClaimBinding" type="tns:ClaimPortType">
              <soapbind:binding style="document" 
                                transport="http://schemas.xmlsoap.org/soap/http"/>
              <wsdl:operation name="SendClaim">
                  <soapbind:operation soapAction="http://example.com/soapaction"/>
                  <wsdl:input>
                      <mime:multipartRelated>
                          <mime:part>
                              <soapbind:body parts="body" use="literal"/>
                          </mime:part>
                          <mime:part>
                              <mime:content part="ClaimPhoto" type="image/jpeg"/>
                          </mime:part>
                      </mime:multipartRelated>
                  </wsdl:input>
                  <wsdl:output>
                      <soapbind:body use="literal" />
                  </wsdl:output>
              </wsdl:operation>
          </wsdl:binding>
      </wsdl:definitions>
      

      Attachments

        Activity

          People

            ay Akitoshi Yoshida
            komm Yuri Kr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: