axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lawrence Mandel (JIRA)" <>
Subject [jira] Commented: (AXIS2-3717) WSDL2Java fails for WSDL that work for Axis2 1.3
Date Wed, 09 Apr 2008 03:15:28 GMT


Lawrence Mandel commented on AXIS2-3717:

I think I've found the cause of this failure. Woden is failing to resolve the schema location
because no base URI is set on on the wsdlSource when Woden's readWSDL method is invoked. Here
are the specifics.

WSDL20ToAllAxisServicesBuilder's readInTheWSDLFile(Document) method attempts to set the base
URI on the wsdlSource passed to Woden as follows:

if (getBaseUri() != null && !"".equals(getBaseUri())) {
            try {
                wsdlSource.setBaseURI(new URI(getBaseUri()));
            } catch (URISyntaxException e) {

In this case getBaseUri returns a correct base location but an invalid URI. This causes the
new URI() call to throw a MalformedUrlException and prevents the base URI from being set on
the wsdlSource object. 

I tested on Windows. With a URI like C:\\testfolder\ca-interface.wsdl the new URI() call fails
on the forward slash '\' character.

>From a quick look back at Axis2 1.3 and Woden M7b it looks like Axis2 used to call a different
readWSDL method passing in a string instead of a wsdlSource object. Woden was then able to
handle the URI string and convert it to a URI object.

I don't know whether the correct action here is for the getBaseUri method to format the base
URI or for some other method to do so. An Axis2 dev should take a look at this case and decide
where to handle the formatting of the base URI string so that a URI object can be created
and passed to Woden.

> WSDL2Java fails for WSDL that work for Axis2 1.3
> ------------------------------------------------
>                 Key: AXIS2-3717
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4
>         Environment: Java 1.6, Windows
>            Reporter: Werner Dittmann
>            Assignee: Lawrence Mandel
>            Priority: Blocker
>             Fix For: 1.4
>         Attachments: ca-interface.wsdl, ca-types.xsd
> using Axis2 1.4 RC4 WSDL2Java fails for WSDL files that work for Axis2 1.3 and without
any complaints. Using "urn:" naming scheme. Also fails when using http: naming scheme and
the document is not referencable (the later used to work in RC3).
> For the WSDL files see attachment, command and error output in this message.
> For WSDL2java I use the follwing command:
> -s -ssi -d adb -p caservice \
> 	     -t -wv 2.0 -o buildc -d adb \
> 	     -http-proxy-host \
> 	     -http-proxy-port 81 \
> 	     -ns2p urn:schemas:caTypes=schemas.catypes \
> 	     -uri ca-interface.wsdl
> I got the following error messages:
>  Using AXIS2_HOME:   d:\devhome\axis2-1.4
>  Using JAVA_HOME:       d:\jdk1.6.0
> log4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL20ToAxisServiceBuilder).
> log4j:WARN Please initialize the log4j system properly.
> Woden[Error],0:0,WSDL502,Could not create a URL from context URI "null" and location
URI "null".
> Woden[Error],0:0,WSDL502,Could not create a URL from context URI "null" and location
URI "null".
> Woden[Warning],0:0,Description-1001,The targetNamespace 'urn:caService' is not dereferencable.
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error
parsing WSDL
> 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(
> 	at org.apache.axis2.wsdl.WSDL2Code.main(
> 	at org.apache.axis2.wsdl.WSDL2Java.main(
> Caused by: org.apache.axis2.AxisFault: Unable to find element {urn:schemas:caTypes}createPackageSubscription
reffered to by operation createPackageSubscription
> 	at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.createAxisMessage(
> 	at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateOperations(
> 	at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processInterface(
> 	at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processService(
> 	at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateService(
> 	at org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder.populateAllServices(
> 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(
> 	... 2 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message