Issue Details (XML | Word | Printable)

Key: WODEN-201
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Lawrence Mandel
Reporter: Keith Godwin Chapman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Woden

Woden throws an error when the targetNamespace of the WSDL is urn:wsdlSamples

Created: 11/Mar/08 04:47 AM   Updated: 11/Mar/08 03:32 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: M8

Time Tracking:
Not Specified

Resolution Date: 11/Mar/08 03:32 PM


 Description  « Hide
Hi the following content is taken off a mail on the Axis2 user list where a user encounted this problem. According to lawrence this may be due to a change in the woden validation framework.

The original mail by Daniel is in the quote section.
 
<quote>

We found a problem using a wsdl2java tool with WSDL v.2 files.

Last month we were able to generate stub/client Java code without problems.

<wsdl:description
   xmlns:wsdl="http://www.w3.org/ns/wsdl"
   targetNamespace="urn:wsdlSamples"
   xmlns:tns="urn:wsdlSamples"
   xmlns:dtns="urn:wsdlSamplesData"
   xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap">
....

But with the latest revision from SVN (#635534) we received the following
error:

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
       at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:166)
       at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
       at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: WSDLException: faultCode=OTHER_ERROR: Fatal error.: unknown
protocol: urn: java.net.MalformedURLException: unknown protocol: urn
       at java.net.URL.<init>(URL.java:574)
       at java.net.URL.<init>(URL.java:464)
       at java.net.URL.<init>(URL.java:413)
       at java.net.URI.toURL(URI.java:1081)
       at
org.apache.woden.internal.wsdl20.assertions.Description1001.validate(Description1001.java:27)
       at
org.apache.woden.internal.wsdl20.validation.WSDLValidator.checkAssertions(WSDLValidator.java:109)
...

After the following modification the generating of stub/client passed.

<wsdl:description
   xmlns:wsdl="http://www.w3.org/ns/wsdl"
   targetNamespace="http://127.0.0.1/wsdlSamples/all.wsdl"
   xmlns:tns="http://127.0.0.1/wsdlSamples/all.wsdl"
   xmlns:dtns="urn:wsdlSamplesData"
   xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap">
...

Is it a problem of Description1001.validate() method ?

</quote>

Thanks,
Keith

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Lawrence Mandel added a comment - 11/Mar/08 03:29 PM
I've reproduced this failure. The problem is the Description1001 assertion attempts to open a stream to the target namespace to test if it is dereferencable. A stream cannot be opened for the urn scheme and a NPE is thrown.

Lawrence Mandel added a comment - 11/Mar/08 03:32 PM
Fixed. I've added a list of schemes for which the assertion can test. The list currently contains http, ftp, and file.