You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Michael Pollmeier (JIRA)" <ji...@apache.org> on 2008/05/22 11:15:55 UTC

[jira] Commented: (AXIS2-3810) Axis2 1.4 Codegen bug: impossible filename for written schemas

    [ https://issues.apache.org/jira/browse/AXIS2-3810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598952#action_12598952 ] 

Michael Pollmeier commented on AXIS2-3810:
------------------------------------------

We now found something new that could help solving the problem:
There are some schemas imported in the wsdl. In the wsdls in META-INF the schemaLocation is defined by the filename. 
But if I ask the service with ?wsdl, the schemaLocations are replaced! The pattern is <serviceName>?xsd=<originalFilename>
This cannot be correct as I configured useOriginalWsdl=true in services.xml!

Another thing: if I get the wsdl with <serviceName>.wsdl (instead of '?'), I get another version of the wsdl (whatever that is) with the correct (not the replaced) schemaLocations...

Hope this helps..

> Axis2 1.4 Codegen bug: impossible filename for written schemas
> --------------------------------------------------------------
>
>                 Key: AXIS2-3810
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3810
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4
>         Environment: Windows XP
>            Reporter: Michael Pollmeier
>         Attachments: META-INF.zip
>
>
> Hey Axis team!
> Seems like I discovered an Axis2 1.4 Codegen bug, please have a look:
> I created some services with similar wsdls and the same schemas, all wsdl/xsd/services.xml files are in attached META-INF.zip. 
> Now I want to create a client stub for that, using the following command:
> call "%AXIS2_HOME%\bin\wsdl2java" -uri %WSDL_URI% -ss -sd -d adb -o out
> If AXIS2_HOME is Axis2 1.3 and WSDL_URI is the normal http uri (http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?wsdl), it works.
> If AXIS2_HOME is Axis2 1.4 and WSDL_URI is a file based uri (D:\proj\BiPRO\sundn_implementierungen\STS\workspace\STS\resources\SecurityTokenServiceUsernamePW.wsdl), it works.
> But if I use Axis2 1.4 and the http uri, it does not work, and that seems to be only on windows systems, as it's a problem with the file names of the stored xsds: Axis2 Codegen want's to save a file with "special-characters" (?, =), and windows cannot deal with that...
> But I cannot change the wsdl, so that's not an option for me. 
> See console output:
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> D:\proj\BiPRO\sundn_implementierungen\STS\workspace\wsdl\test>call "C:\develop\axis2-1.4\bin\wsdl2java" -uri http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?wsdl -ss -sd -d adb -o out
> Using AXIS2_HOME:   C:\develop\axis2-1.4
> Using JAVA_HOME:    C:\develop\Java\jdk1.5.0_10
> Retrieving document at 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?wsdl'.
> Retrieving schema at 'SecurityTokenServiceUsernamePW?xsd=ws-policy.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?wsdl'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=ws-policy.xsd'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-secext-1.0.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=ws-policy.xsd'.
> Retrieving schema at 'xml.xsd', relative to 'http://localhost:8180/bipro/services/oasis-200401-wss-wssecurity-secext-1.0.xsd'.
> Retrieving schema at 'xmldsig-core-schema.xsd', relative to 'http://localhost:8180/bipro/services/oasis-200401-wss-wssecurity-secext-1.0.xsd'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://localhost:8180/bipro/services/oasis-200401-wss-wssecurity-secext-1.0.xsd'.
> Retrieving schema at 'SecurityTokenServiceUsernamePW?xsd=WS-Trust.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?wsdl'.
> Retrieving schema at 'addressing.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=WS-Trust.xsd'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=WS-Trust.xsd'.
> Retrieving schema at 'ws-policy.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=WS-Trust.xsd'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://localhost:8180/bipro/services/ws-policy.xsd'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-secext-1.0.xsd', relative to 'http://localhost:8180/bipro/services/ws-policy.xsd'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-secext-1.0.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=WS-Trust.xsd'.
> Retrieving schema at 'SecurityTokenServiceUsernamePW?xsd=ws-secureconversation.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?wsdl'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-utility-1.0.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=ws-secureconversation.xsd'.
> Retrieving schema at 'oasis-200401-wss-wssecurity-secext-1.0.xsd', relative to 'http://localhost:8180/bipro/services/SecurityTokenServiceUsernamePW?xsd=ws-secureconversation.xsd'.
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Schema writing failed!
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Schema writing failed!
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1370)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:253)
>         ... 2 more
> Caused by: java.lang.RuntimeException: Schema writing failed!
>         at org.apache.axis2.wsdl.codegen.writer.SchemaWriter.writeSchema(SchemaWriter.java:60)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeWSDLFiles(AxisServiceBasedMultiLanguageEmitter.java:1412)
>         at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1341)
>         ... 3 more
> Caused by: java.io.FileNotFoundException: out\resources\SecurityTokenServiceUsernamePW?xsd=ws-secureconversation.xsd (Die Syntax f³r den Dateinamen, Verzeichnisnamen oder die Datentrõgerbezeichnung ist falsch)
>         at java.io.FileOutputStream.open(Native Method)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>         at org.apache.axis2.wsdl.codegen.writer.SchemaWriter.writeSchema(SchemaWriter.java:51)
>         ... 5 more
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> This problem only affects those XSDs that are directly referenced in the wsdl. All others work. 
> I already debugged the Codegen and saw that the SchemaWriter gets the '?' in the schemaFileName, which originally comes from the AxisService's schemaMap: 
> [addressing.xsd=org.apache.ws.commons.schema.XmlSchema@1e6978d[http://schemas.xmlsoap.org/ws/2004/08/addressing], SecurityTokenServiceUsernamePW?xsd=ws-secureconversation.xsd=org.apache.ws.commons.schema.XmlSchema@1e7d503[http://schemas.xmlsoap.org/ws/2005/02/sc], ws-policy.xsd=org.apache.ws.commons.schema.XmlSchema@91a4fb[http://schemas.xmlsoap.org/ws/2004/09/policy], xmldsig-core-schema.xsd=org.apache.ws.commons.schema.XmlSchema@13c4c09[http://www.w3.org/2000/09/xmldsig#], xml.xsd=org.apache.ws.commons.schema.XmlSchema@143753[http://www.w3.org/XML/1998/namespace]]
> Any ideas?
> Thanks in advance and greetings from Germany
> Michael

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org