wsdl soap analyzer namespace issue
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 1
- Joined: Mon Jul 10, 2006 11:31 pm
wsdl soap analyzer namespace issue
I'm having trouble with complex types in wsdl. Given this wsdl:
-------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://xml.com/ws/UserService/2005/04/04"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:impl="http://xml.com/ws/UserService/2005/04/04"
xmlns:tns1="urn:UserService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="urn:UserService" xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="ctype">
<sequence>
<element name="listelem" minOccurs="0" maxOccurs="unbounded"></element>
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://xml.com/ws/UserService/2005/04/04" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="MsgFormat" type="tns1:ctype" />
</schema>
</wsdl:types>
<wsdl:message name="Response">
<wsdl:part name="AuthenticateUserReturn" element="impl:MsgFormat" />
</wsdl:message>
<wsdl:message name="Request">
<wsdl:part name="echoStr" element="impl:MsgFormat" />
</wsdl:message>
<wsdl:portType name="UserStore">
<wsdl:operation name="initialize" >
<wsdl:input message="impl:Request" name="Request" />
<wsdl:output message="impl:Response" name="Response" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="UserServiceSoapBinding" type="impl:UserStore">
<soapbind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="initialize">
<soapbind:operation soapAction="" />
<wsdl:input name="Request">
<soapbind:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal" />
</wsdl:input>
<wsdl:output name="Response">
<soapbind:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="UserStoreService">
<wsdl:port binding="impl:UserServiceSoapBinding" name="UserService">
<soapbind:address location="http://haha.com/axis/services/UserService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
-----------------------
I get this in the analyzer. Note that it doesn't get down the to the "listelem" level...
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<MsgFormat xmlns="http://xml.com/ws/UserService/2005/04/04"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
-------------------------
If I change the types element to put the ctype definition in the same namespace as the MsgFormat element like so:
-------------------------
<wsdl:types>
<schema targetNamespace="http://xml.com/ws/UserService/2005/04/04" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="MsgFormat" type="impl:ctype" />
<complexType name="ctype">
<sequence>
<element name="listelem" minOccurs="0" maxOccurs="unbounded"></element>
</sequence>
</complexType>
</schema>
</wsdl:types>
----------------------------------
then it finds it, but puts it in a namespace xmlns=""...
---------------------------------
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<MsgFormat xmlns="http://xml.com/ws/UserService/2005/04/04">
<listelem xmlns=""/>
</MsgFormat>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------
Niether of these works for me. In the first case, listelem seems to be not found, in the second case it's in the wrong namespace.
-------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://xml.com/ws/UserService/2005/04/04"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:impl="http://xml.com/ws/UserService/2005/04/04"
xmlns:tns1="urn:UserService"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="urn:UserService" xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="ctype">
<sequence>
<element name="listelem" minOccurs="0" maxOccurs="unbounded"></element>
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://xml.com/ws/UserService/2005/04/04" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="MsgFormat" type="tns1:ctype" />
</schema>
</wsdl:types>
<wsdl:message name="Response">
<wsdl:part name="AuthenticateUserReturn" element="impl:MsgFormat" />
</wsdl:message>
<wsdl:message name="Request">
<wsdl:part name="echoStr" element="impl:MsgFormat" />
</wsdl:message>
<wsdl:portType name="UserStore">
<wsdl:operation name="initialize" >
<wsdl:input message="impl:Request" name="Request" />
<wsdl:output message="impl:Response" name="Response" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="UserServiceSoapBinding" type="impl:UserStore">
<soapbind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="initialize">
<soapbind:operation soapAction="" />
<wsdl:input name="Request">
<soapbind:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal" />
</wsdl:input>
<wsdl:output name="Response">
<soapbind:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="UserStoreService">
<wsdl:port binding="impl:UserServiceSoapBinding" name="UserService">
<soapbind:address location="http://haha.com/axis/services/UserService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
-----------------------
I get this in the analyzer. Note that it doesn't get down the to the "listelem" level...
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<MsgFormat xmlns="http://xml.com/ws/UserService/2005/04/04"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
-------------------------
If I change the types element to put the ctype definition in the same namespace as the MsgFormat element like so:
-------------------------
<wsdl:types>
<schema targetNamespace="http://xml.com/ws/UserService/2005/04/04" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="MsgFormat" type="impl:ctype" />
<complexType name="ctype">
<sequence>
<element name="listelem" minOccurs="0" maxOccurs="unbounded"></element>
</sequence>
</complexType>
</schema>
</wsdl:types>
----------------------------------
then it finds it, but puts it in a namespace xmlns=""...
---------------------------------
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<MsgFormat xmlns="http://xml.com/ws/UserService/2005/04/04">
<listelem xmlns=""/>
</MsgFormat>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------
Niether of these works for me. In the first case, listelem seems to be not found, in the second case it's in the wrong namespace.
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Hi,
About the first problem, having 2 schemas in the <wsdl:types> and refering from an element in the first one to a complex type in the other, there seems to be a problem in how Oxygen handles the situation and I'll place a bug report. We'll keep you up to date with the progress.
About the second issue, having a single schema with both the complex type and the element, it is correct adding a "xmlns=''" to the "listelem" element because it is locally declared and locally declared elements, unless not specified, are from no namespace.
The workaround is to add the "form="qualified"" attribute to the local element declaration as follows (in this way the element gets mapped in the target namespace):
So as a workaround you can merge the two schemas into one.
Best regards,
Radu.
About the first problem, having 2 schemas in the <wsdl:types> and refering from an element in the first one to a complex type in the other, there seems to be a problem in how Oxygen handles the situation and I'll place a bug report. We'll keep you up to date with the progress.
About the second issue, having a single schema with both the complex type and the element, it is correct adding a "xmlns=''" to the "listelem" element because it is locally declared and locally declared elements, unless not specified, are from no namespace.
The workaround is to add the "form="qualified"" attribute to the local element declaration as follows (in this way the element gets mapped in the target namespace):
Code: Select all
<schema targetNamespace="http://xml.com/ws/UserService/2005/04/04"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:a="http://xml.com/ws/UserService/2005/04/04">
<element name="MsgFormat" type="a:ctype" />
<complexType name="ctype">
<sequence>
<element name="listelem" form="qualified" minOccurs="0" maxOccurs="unbounded"></element>
</sequence>
</complexType>
</schema>
Best regards,
Radu.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service