[EMAIL PROTECTED]: wrong namespace resolution which URI starts with 'http://ws'
-----------------------------------------------------------------------
Key: AXIS2-1779
URL: http://issues.apache.org/jira/browse/AXIS2-1779
Project: Apache Axis 2.0 (Axis2)
Issue Type: Bug
Components: Tools
Environment: Both 1.1 release and trunk revision, xmlbeans data binding
Reporter: Ruslan Lopatin
WSDL2Java produces following error:
--------------------------------
Exception in thread "Main Thread"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.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.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at
jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;J)Ljava.lang.Object;(Unknown
Source)
at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
... 3 more
Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error:
src-resolve.a: Could not find type '[EMAIL PROTECTED]://ws.test.uri.com'. Do
you mean to refer to the type named [EMAIL
PROTECTED]://www.test.uri.com/er/services/ASService?
at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:248)
... 6 more
Caused by: org.apache.xmlbeans.XmlException: error: src-resolve.a: Could not
find type '[EMAIL PROTECTED]://ws.test.uri.com'. Do you mean to refer to the
type named [EMAIL PROTECTED]://www.test.uri.com/er/services/ASService?
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
at
jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
Source)
at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;J)Ljava.lang.Object;(Unknown
Source)
at org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:166)
... 6 more
---------------------------
when invoked with the following WSDL (wsdl2java -d xmlbeans -uri
ASService.wsdl):
---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://www.test.uri.com/er/services/ASService"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://www.test.uri.com/er/services/ASService"
xmlns:intf="http://www.test.uri.com/er/services/ASService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="http://ws.test.uri.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema targetNamespace="http://ws.test.uri.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://www.test.uri.com/er/services/ASService"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="GlobalGroupInfo">
<sequence>
<element name="name" type="xsd:string"/>
<element name="guid" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="UserInfo">
<sequence>
<element name="login" type="xsd:string"/>
<element name="firstName" nillable="true" type="xsd:string"/>
<element name="lastName" nillable="true" type="xsd:string"/>
<element name="uid" type="xsd:int"/>
<element name="globalGroups" nillable="true"
type="impl:ArrayOf_GlobalGroupInfo"/>
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://www.test.uri.com/er/services/ASService"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://ws.test.uri.com"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_GlobalGroupInfo">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:GlobalGroupInfo[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="registerRemoteUserRequest">
<wsdl:part name="login" type="soapenc:string"/>
<wsdl:part name="password" type="soapenc:string"/>
<wsdl:part name="firstName" type="soapenc:string"/>
<wsdl:part name="lastName" type="soapenc:string"/>
<wsdl:part name="globalGroups" type="impl:ArrayOf_GlobalGroupInfo"/>
</wsdl:message>
<wsdl:message name="registerRemoteUserResponse">
<wsdl:part name="registerRemoteUserReturn" type="tns1:UserInfo"/>
</wsdl:message>
<wsdl:portType name="ASServiceImpl">
<wsdl:operation name="registerRemoteUser" parameterOrder="login password
firstName lastName globalGroups">
<wsdl:input message="impl:registerRemoteUserRequest"
name="registerRemoteUserRequest"/>
<wsdl:output message="impl:registerRemoteUserResponse"
name="registerRemoteUserResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ASServiceSoapBinding" type="impl:ASServiceImpl">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="registerRemoteUser">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="registerRemoteUserRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://service.auth.test.uri.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="registerRemoteUserResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.test.uri.com/er/services/ASService" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ASServiceImplService">
<wsdl:port binding="impl:ASServiceSoapBinding" name="ASService">
<wsdlsoap:address
location="http://localhost:8180/dist-er/services/ASService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------------------------
Note, that when 'http://ws.test.uri.com' replaced with some URI without 'ws'
prefix (such as http://iws.test.uri.com or http://entities.test.uri.com), code
generation completes successfully. And it always fails with 'ws' (wsutil in our
case).
Regrettably, we can't rename the namespace, as this is a third-party
web-service for us.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]