Skip to content

Namespace lost on generated WSDL [SWS-102] #257

@gregturn

Description

@gregturn

Shannon Kendrick opened SWS-102 and commented

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


Affects: 1.0 M3

Attachments:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions