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

pradip sonar commented on AXIS2-407:
------------------------------------

I faced this issue when I was using wsdl2java untility of axis2-1.4.1 for code 
gen,
I was trying with following url,
call wsdl2java -uri "http://localhost/TestService.asmx?wsdl"; -o "c:\source" -d 
xmlbeans -R "c:\resource" -or.

In this case, the resource path is not relative to output path, the follwing 
exception occures,

Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetExcept
ion
        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: java.lang.RuntimeException: 
java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:126)
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at 
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:115)
        ... 3 more
Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: The 
filename, directory name, or volume label syntax is incorrect (schemaorg_
apache_xmlbeans.system.s3E2AB9FDDDEAD0D861B806A37906C852.modelconfiguration681ctype)
 - code 9
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
        ... 8 more
Caused by: org.apache.xmlbeans.XmlException: The filename, directory name, or 
volume label syntax is incorrect (schemaorg_apache_xmlbeans.system.s3E2A
B9FDDDEAD0D861B806A37906C852.modelconfiguration681ctype) - code 9
        at org.apache.xmlbeans.XmlBeans.wrappedException(XmlBeans.java:149)
        at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:675)
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189)
        ... 8 more
Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: The filename, 
directory name, or volume label syntax is incorrect (schemaorg_apache_xmlbeans
.system.s3E2AB9FDDDEAD0D861B806A37906C852.modelconfiguration681ctype) - code 9
        at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.getSaverStream(SchemaTypeSystemImpl.java:2234)
        at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.writeRealHeader(SchemaTypeSystemImpl.java:1604)
        at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveType(SchemaTypeSystemImpl.java:1455)
        at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.saveTypesRecursively(SchemaTypeSystemImpl.java:1331)
        at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.save(SchemaTypeSystemImpl.java:1306)
        at 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:230)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
        ... 9 more


I found that the the resource path should be relative to output path to work 
this,
So I changed the resource path which is relative to output path and the code 
was generated with resources successfully.

The following code gen url works,
call wsdl2java -uri "http://localhost/TestService.asmx?wsdl"; -o "c:\source" -d 
xmlbeans -R "resource" -or.
In this, classes will get generated under c:\source directory, resources 
directory will get created under c:\source path and all resources will get 
generated under this resource directory.

> xmlbeans.XmlException: The filename, directory name, or volume label syntax 
> is incorrect
> ----------------------------------------------------------------------------------------
>
>                 Key: AXIS2-407
>                 URL: https://issues.apache.org/jira/browse/AXIS2-407
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 0.94
>         Environment: WinXP Pro, jdk 1.5.0_06
>            Reporter: Matti Kaikkonen
>         Attachments: SOAPFrontGetShowBalanceJMS.wsdl
>
>
> C:\OAGIS\GetShowBalanceFlat\CompositeBalanceBOD_05\FlatWSDL>wsdl2java -s -d 
> xmlbeans -o c:\codeaxis2 -uri SOAPFrontGetShowBalanceJMS.wsdl
> fails and reports problems 
> Same wsdl runs OK with xmlbeans-2.1.0
> C:\OAGIS\GetShowBalanceFlat\CompositeBalanceBOD_05\FlatWSDL>scomp -src 
> xmlbeansrc SOAPFrontGetShowBalanceJMS.wsdl
> Time to build schema type system: 1.321 seconds
> Time to generate code: 2.324 seconds
> Time to compile code: 7.681 seconds
> Compiled types to: xmltypes.jar
> C:\OAGIS\GetShowBalanceFlat\CompositeBalanceBOD_05\FlatWSDL>wsdl2java -s -d 
> xmlbeans -o c:\codeaxis2 -uri SOAPFrontGetShowBalanceJMS.wsdl
> Exception in thread "main" 
> org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.RuntimeException: org.apache.xmlbeans.XmlException: The filename, 
> di
> rectory name, or volume label syntax is incorrect 
> (schemaorg_apache_xmlbeans.sys
> tem.s5EC1B4967B23C5343BF5CD12561C30EE.schemaorg_apache_xmlbeans/javaname/org/ope
> napplications/www/oagis/_9/currencycode/_54217:2001/CurrencyCodeContentType) 
> - c
> ode 9
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
> ationEngine.java:118)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:31)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: The 
> fil
> ename, directory name, or volume label syntax is incorrect 
> (schemaorg_apache_xml
> beans.system.s5EC1B4967B23C5343BF5CD12561C30EE.schemaorg_apache_xmlbeans/javanam
> e/org/openapplications/www/oagis/_9/currencycode/_54217:2001/CurrencyCodeContent
> Type) - code 9
>         at 
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLB
> eansExtension.java:205)
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
> ationEngine.java:80)
>         ... 2 more
> Caused by: org.apache.xmlbeans.XmlException: The filename, directory name, or 
> vo
> lume label syntax is incorrect 
> (schemaorg_apache_xmlbeans.system.s5EC1B4967B23C5
> 343BF5CD12561C30EE.schemaorg_apache_xmlbeans/javaname/org/openapplications/www/o
> agis/_9/currencycode/_54217:2001/CurrencyCodeContentType) - code 9
>         at org.apache.xmlbeans.XmlBeans.wrappedException(XmlBeans.java:149)
>         at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:673)
>         at 
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLB
> eansExtension.java:179)
>         ... 3 more
> Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: The filename, 
> director
> y name, or volume label syntax is incorrect 
> (schemaorg_apache_xmlbeans.system.s5
> EC1B4967B23C5343BF5CD12561C30EE.schemaorg_apache_xmlbeans/javaname/org/openappli
> cations/www/oagis/_9/currencycode/_54217:2001/CurrencyCodeContentType) - code 
> 9
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.getSav
> erStream(SchemaTypeSystemImpl.java:2214)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.writeR
> ealHeader(SchemaTypeSystemImpl.java:1589)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.savePointerFile(
> SchemaTypeSystemImpl.java:373)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.savePointersForC
> lassnames(SchemaTypeSystemImpl.java:356)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.savePointers(Sch
> emaTypeSystemImpl.java:337)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.save(SchemaTypeS
> ystemImpl.java:1305)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(Sche
> maTypeSystemCompiler.java:230)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:665)
>         ... 4 more

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

Reply via email to