Issue Details (XML | Word | Printable)

Key: WODEN-203
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
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

WSDL 2.0 codegeration fails in Axis2 due to Woden assertion

Created: 27/Mar/08 03:47 PM   Updated: 29/Mar/08 06:34 PM
Return to search
Component/s: Validation
Affects Version/s: M7b
Fix Version/s: M8

Time Tracking:
Not Specified

Environment: Ubuntu 7.0.4, JDK 1.5_06,

Resolution Date: 29/Mar/08 06:34 PM


 Description  « Hide
We are having a bit of a problem in Axis2 (codegeration) due to an assertion woden has made. I have attached the wsdl2 of the version service hearwith. As you will note the target namespace of the wsdl is http://axisversion.sample and woden tries to resolve this and failes cause its not a resource that exist. The complete stack trace is given below

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:159)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: WSDLException: faultCode=OTHER_ERROR: Fatal error.: axisversion.sample: java.net.UnknownHostException: axisversion.sample
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
    at java.net.Socket.connect(Socket.java:507)
    at java.net.Socket.connect(Socket.java:457)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
    at sun.net.www.http.HttpClient.&lt;init&gt;(HttpClient.java:214)
    at sun.net.www.http.HttpClient.New(HttpClient.java:287)
    at sun.net.www.http.HttpClient.New(HttpClient.java:299)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:913)
    at java.net.URLConnection.getContent(URLConnection.java:682)
    at java.net.URL.getContent(URL.java:1021)
    at org.apache.woden.internal.wsdl20.assertions.Description1001.validate(Description1001.java:28)
    at org.apache.woden.internal.wsdl20.validation.WSDLValidator.checkAssertions(WSDLValidator.java:109)
    at org.apache.woden.internal.wsdl20.validation.WSDLValidator.validate(WSDLValidator.java:77)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:207)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:233)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:268)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:127)
    at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.readInTheWSDLFile(WSDL20ToAxisServiceBuilder.java:1181)
    at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.<init>(WSDL20ToAxisServiceBuilder.java:151)
    at org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder.<init>(WSDL20ToAllAxisServicesBuilder.java:53)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:102)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

    at org.apache.woden.internal.wsdl20.assertions.Description1001.validate(Description1001.java:42)
    at org.apache.woden.internal.wsdl20.validation.WSDLValidator.checkAssertions(WSDLValidator.java:109)
    at org.apache.woden.internal.wsdl20.validation.WSDLValidator.validate(WSDLValidator.java:77)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:207)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:233)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:268)
    at org.apache.woden.internal.DOMWSDLReader.readWSDL(DOMWSDLReader.java:127)
    at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.readInTheWSDLFile(WSDL20ToAxisServiceBuilder.java:1181)
    at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.<init>(WSDL20ToAxisServiceBuilder.java:151)
    at org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder.<init>(WSDL20ToAllAxisServicesBuilder.java:53)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:102)
    ... 7 more


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Lawrence Mandel added a comment - 29/Mar/08 06:29 PM
I've reproduced this problem on Windows. This issues is the Description1001 assertion is not catching the UnknownHostException thrown when trying to resolve a hostname that doesn't resolve.

Lawrence Mandel added a comment - 29/Mar/08 06:34 PM
Fixed. Description1001 was previously throwing a WSDLException for any caught exception other than FileNotFoundException. This behaviour was incorrect. The assertion should report a warning for any exception that results in the attempt to resolve the namespace. The one exception is a WSDLException, which will be thrown by the Woden URI resolver if something goes wrong with the URI resolver. We may need to reconsider this exception as I'm not sure any assertion should ever throw an exception instead of simply failing the assertion.