Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.0 M3
    • Fix Version/s: 1.0 RC1
    • Component/s: Core
    • Labels:
      None

      Description

      I am getting invalid WSDL generated by either the org.springframework.ws.transport.http.WsdlDefiniti onHandlerAdapter or the org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Def inition classes. The problem is that one of my namespace definitions is lost. Notice that the "tns:" namespace is lost in the following WSDL fragments:

      Original WSDL:
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:BxBenefits/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="BxBenefits" targetNamespace="urn:BxBenefits/1.0">
      <wsdl:documentation/>
      <wsdl:types>
      <xsd:schema>
      <xsd:import namespace="urn:BxBenefits/1.0" schemaLocation="BxBenefits.xsd"/>
      </xsd:schema>
      </wsdl:types>
      <wsdl:message name="FindGroupProductsRequest">
      <wsdl:part element="tns:FindGroupProducts" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="FindGroupProductsResponse">
      <wsdl:part element="tns:FindGroupProductsResponse" name="parameters"/>
      </wsdl:message>

      Transformed WSDL:
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="BxBenefits" targetNamespace="urn:BxBenefits/1.0">
      <wsdl:documentation/>
      <wsdl:types>
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="urn:BxBenefits/1.0" schemaLocation="BxBenefits.xsd"/>
      </xsd:schema>
      </wsdl:types>
      <wsdl:message name="FindGroupProductsRequest">
      <wsdl:part element="tns:FindGroupProducts" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="FindGroupProductsResponse">
      <wsdl:part element="tns:FindGroupProductsResponse" name="parameters"/>
      </wsdl:message>

      Since the "tns:" namespace definition is lost, the following references become invalid:
      Code:

      element="tns:FindGroupProducts"

      I found this problem when I attempted to load the WSDL into SoapUI via the URL. SoapUI loaded the file correctly, but the URL load failed.

      Shannon Kendrick

      1. BxBenefits.wsdl
        8 kB
        Shannon Kendrick
      2. BxBenefits-sws.wsdl
        9 kB
        Shannon Kendrick

        Activity

        Hide
        mskendrick Shannon Kendrick added a comment -

        This is the original WSDL file before it was transformed by Spring WS.

        Show
        mskendrick Shannon Kendrick added a comment - This is the original WSDL file before it was transformed by Spring WS.
        Hide
        mskendrick Shannon Kendrick added a comment -

        This is the transformed WSDL with the missing namespace.

        Show
        mskendrick Shannon Kendrick added a comment - This is the transformed WSDL with the missing namespace.
        Hide
        mskendrick Shannon Kendrick added a comment -

        After some additional investigation, it seems that the WSDL is only invalid when the "transformLocations" property is set to "true". The following code is executed in org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter:

        if (transformLocations)

        { DOMResult domResult = new DOMResult(); transformer.transform(definitionSource, domResult); Document definitionDocument = (Document) domResult.getNode(); transformLocations(definitionDocument, request); definitionSource = new DOMSource(definitionDocument); }

        When I set the "transformLocations" value to false, all the namespaces are correct in the WSDL, but the "tns" namespace is lost when the "transformLocations" value is set to "true".

        Show
        mskendrick Shannon Kendrick added a comment - After some additional investigation, it seems that the WSDL is only invalid when the "transformLocations" property is set to "true". The following code is executed in org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter: if (transformLocations) { DOMResult domResult = new DOMResult(); transformer.transform(definitionSource, domResult); Document definitionDocument = (Document) domResult.getNode(); transformLocations(definitionDocument, request); definitionSource = new DOMSource(definitionDocument); } When I set the "transformLocations" value to false, all the namespaces are correct in the WSDL, but the "tns" namespace is lost when the "transformLocations" value is set to "true".
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Can i use these attached files as testcases in the sws-code base? I would not like to break any copyrights...

        Show
        arjen.poutsma Arjen Poutsma added a comment - Can i use these attached files as testcases in the sws-code base? I would not like to break any copyrights...
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I cannot reproduce this. The only suggestion I can give is to upgrade Xalan (to 2.7.0). Previous versions have issues with missing namespaces.

        Show
        arjen.poutsma Arjen Poutsma added a comment - I cannot reproduce this. The only suggestion I can give is to upgrade Xalan (to 2.7.0). Previous versions have issues with missing namespaces.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing RC1 issues.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing RC1 issues.

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            mskendrick Shannon Kendrick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: