Hi Guys,
I have a situation where I have a WSDL with some XML as its service
documentation. Also I do not have a default namespace declared. This means
that the xml that I have within the documentation is not namespace
qualified. Under this situation Woden throws an error when trying to parse
the WSDL with the following exception. I've also attached a WSDL that causes
this issue. Do we need a null check in DOMXMLElement that cheks this before
creating an URI?
Caused by: java.lang.NullPointerException
at java.net.URI$Parser.parse(URI.java:3003)
at java.net.URI.<init>(URI.java:578)
at org.apache.woden.internal.DOMXMLElement.doGetNamespaceURI(
DOMXMLElement.java:101)
at org.apache.woden.internal.BaseXMLElement.getNamespaceURI(
BaseXMLElement.java:80)
at org.apache.woden.internal.BaseWSDLReader.parseExtensionElement(
BaseWSDLReader.java:1532)
at org.apache.woden.internal.BaseWSDLReader.parseDocumentation(
BaseWSDLReader.java:472)
at org.apache.woden.internal.BaseWSDLReader.parseInterfaceOperation(
BaseWSDLReader.java:798)
at org.apache.woden.internal.BaseWSDLReader.parseInterface(
BaseWSDLReader.java:663)
at org.apache.woden.internal.BaseWSDLReader.parseDescription(
BaseWSDLReader.java:429)
at org.apache.woden.internal.DOMWSDLReader.readWSDL(
DOMWSDLReader.java:184)
at org.apache.woden.internal.DOMWSDLReader.readWSDL(
DOMWSDLReader.java:229)
at org.apache.woden.internal.DOMWSDLReader.readWSDL(
DOMWSDLReader.java:264)
at org.apache.woden.internal.DOMWSDLReader.readWSDL(
DOMWSDLReader.java:126)
at
org.apache.axis2.description.WSDL20ToAxisServiceBuilder.readInTheWSDLFile(
WSDL20ToAxisServiceBuilder.java:1146)
at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.<init>(
WSDL20ToAxisServiceBuilder.java:148)
at org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder
.<init>(WSDL20ToAllAxisServicesBuilder.java:54)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(
CodeGenerationEngine.java:109)
Thanks,
Keith.
--
Keith Chapman
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
<wsdl2:description xmlns:wsdl2="http://www.w3.org/ns/wsdl" xmlns:tns="http://services.mashup.wso2.org/test" xmlns:wsoap="http://www.w3.org/ns/wsdl/soap" xmlns:wrpc="http://www.w3.org/ns/wsdl/rpc" xmlns:ws="http://services.mashup.wso2.org/test?xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:whttp="http://www.w3.org/ns/wsdl/http" targetNamespace="http://services.mashup.wso2.org/test">
<wsdl2:types>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://services.mashup.wso2.org/test?xsd">
<xs:complexType name="testResponseType">
<xs:sequence>
<xs:element name="return" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="testResponse" type="ws:testResponseType"/>
</xs:schema>
</wsdl2:types>
<wsdl2:interface name="testInterface">
<wsdl2:operation name="test" pattern="http://www.w3.org/ns/wsdl/in-out">
<wsdl2:documentation>
<div>This is supposed to be the documentation for this service</div>
</wsdl2:documentation>
<wsdl2:input element="#none" wsaw:Action="http://services.mashup.wso2.org/test/ServiceInterface/testRequest"/>
<wsdl2:output element="ws:testResponse" wsaw:Action="http://services.mashup.wso2.org/test/ServiceInterface/testResponse"/>
</wsdl2:operation>
</wsdl2:interface>
<wsdl2:binding name="testHttpBinding" interface="tns:testInterface" type="http://www.w3.org/ns/wsdl/http">
<wsdl2:operation ref="tns:test" whttp:method="POST" whttp:location="test/test"/>
</wsdl2:binding>
<wsdl2:binding name="testSOAP12Binding" interface="tns:testInterface" type="http://www.w3.org/ns/wsdl/soap" wsoap:version="1.2" wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP">
<wsdl2:operation ref="tns:test" wsoap:action="http://services.mashup.wso2.org/test/ServiceInterface/testRequest" whttp:location="test/test"/>
</wsdl2:binding>
<wsdl2:binding name="testSOAP11Binding" interface="tns:testInterface" type="http://www.w3.org/ns/wsdl/soap" wsoap:version="1.1" wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP">
<wsdl2:operation ref="tns:test" wsoap:action="http://services.mashup.wso2.org/test/ServiceInterface/testRequest" whttp:location="test/test"/>
</wsdl2:binding>
<wsdl2:service name="test" interface="tns:testInterface">
<wsdl2:endpoint name="SecureTestSOAP11Endpoint" binding="tns:testSOAP11Binding" address="https://192.168.1.50:7443/services/samples/test"/>
<wsdl2:endpoint name="testSOAP11Endpoint" binding="tns:testSOAP11Binding" address="http://192.168.1.50:7762/services/samples/test"/>
<wsdl2:endpoint name="SecureTestSOAP12Endpoint" binding="tns:testSOAP12Binding" address="https://192.168.1.50:7443/services/samples/test"/>
<wsdl2:endpoint name="testSOAP12Endpoint" binding="tns:testSOAP12Binding" address="http://192.168.1.50:7762/services/samples/test"/>
<wsdl2:endpoint name="SecureTestHTTPEndpoint" binding="tns:testHttpBinding" address="https://192.168.1.50:7443/services/samples/test"/>
<wsdl2:endpoint name="testHTTPEndpoint" binding="tns:testHttpBinding" address="http://192.168.1.50:7762/services/samples/test"/>
</wsdl2:service>
</wsdl2:description>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]