axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shardul Jewalikar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-1510) Included schema filenames impact wsdl2java with xmlbeans binding
Date Wed, 20 Feb 2008 01:32:43 GMT

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

Shardul Jewalikar commented on AXIS2-1510:
------------------------------------------

I'm facing same problem with imported schema type. 
Lets say Schema 1 has URI file:/C:/unsubscribe.xsd with system id unsubscribe
and Schema 2 has URI
file:/C:/subscribe.xsd with system id subscribe


                    if (schema.getSourceURI() != null &&
                            schema.getSourceURI().endsWith(systemId.replaceAll("\\\\", "/")))


It looks like there is problem in Axis2EntityResolver class with above mentioned line of code.
For systemid subscribe it is pocking up file file:/C:/unsubscribe.xsd as schema.getSourceURI().endsWith(systemId.replaceAll("\\\\",
"/")) returns true for this case


> Included schema filenames impact wsdl2java with xmlbeans binding
> ----------------------------------------------------------------
>
>                 Key: AXIS2-1510
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1510
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>            Reporter: Mariusz Woloncewicz
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>         Attachments: subscribe.xsd, TestServices.wsdl, TestServicesFAIL.wsdl, unsubscribe.xsd
>
>
> Types declaration in wsdl:
> <xs:include schemaLocation="subscribe.xsd"/>
> <xs:include schemaLocation="unsubscribe.xsd"/>
> <xs:element name="subscribe" type="tns:SubscribeType"/>
> <xs:element name="unsubscribe" type="tns:UnsubscribeType"/>		
> Output generated by wsdl2java.bat -uri TestServices.wsdl -d xmlbeans :
> Retrieving schema at 'subscribe.xsd', relative to 'file:/C:/JIRA/'.
> Retrieving schema at 'unsubscribe.xsd', relative to 'file:/C:/JIRA/'.
> 2006-10-26 10:35:52 org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityR
> esolver resolveEntity
> INFO: Resolving schema with publicId [null] and systemId [subscribe.xsd]
> 2006-10-26 10:35:52 org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityR
> esolver resolveEntity
> INFO: Resolving schema with publicId [null] and systemId [unsubscribe.xsd]
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
> ationEngine.java:224)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExcepti
> on
>         at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLB
> eansExtension.java:92)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
> ationEngine.java:177)
>         ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
>         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.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLB
> eansExtension.java:82)
>         ... 3 more
> Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error:
> src-resolve: type 'SubscribeType@ws/request/beans' not found.
>         at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGe
> nerationUtility.java:241)
>         ... 8 more
> Caused by: org.apache.xmlbeans.XmlException: error: src-resolve: type 'Subscribe
> Type@ws/request/beans' not found.
>         at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(Sche
> maTypeSystemCompiler.java:225)
>         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:667)
>         at org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGe
> nerationUtility.java:167)
>         ... 8 more
> Current workaround is renaming unsubscribe.xsd file (for instance, to  "unsubscription.xsd").


-- 
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


Mime
View raw message