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 "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2007/11/19 14:01:52 UTC

[jira] Resolved: (AXIS2-3092) WSDL2Java fails to generate with element ref tag inside wsdl file

     [ https://issues.apache.org/jira/browse/AXIS2-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-3092.
-------------------------------------------------

    Resolution: Invalid

this is a problem with the schema

> WSDL2Java fails to generate with element ref tag inside wsdl file
> -----------------------------------------------------------------
>
>                 Key: AXIS2-3092
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3092
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.3
>            Reporter: chris
>            Assignee: Amila Chinthaka Suriarachchi
>
> when I am trying to generate the java code with wsdl2java (axis2 1.2 or 1.3) from a wsdl file containing the tag element:ref I received an error. I am using the adb databinding (but I got the same error with XMLbean databinding) :
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>      [java] 	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
>      [java] 	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)
>      [java] 	... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java] 	at java.lang.reflect.Method.invoke(Method.java:324)
>      [java] 	at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
>      [java] 	... 3 more
>      [java] Caused by: org.apache.axis2.schema.SchemaCompilationException: The referenced element '{urn:TicketEvent}TSAMessage' was not found!
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:618)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:478)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1899)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1788)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:977)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:886)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:867)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:518)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:302)
>      [java] 	at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:212)
>      [java] 	at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:80)
>      [java] 	... 8 more
> ============= wsdl file ========================================
> <wsdl:definitions xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="urn:TicketEvent" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:TicketEvent">
>   <wsdl:types>
>     <s:schema elementFormDefault="qualified" targetNamespace="urn:TicketEvent" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:eai="urn:TicketEvent">
>       <s:element name="clientRequest">
>         <s:complexType>
>           <s:sequence>
>             <s:element ref="eai:TSAMessage"/>
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>       <s:element name="clientRequestResponse">
>         <s:complexType>
>           <s:sequence>
>             <s:element ref="eai:TSAMessage"/>
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>     </s:schema>
>     <xsd:schema targetNamespace="urn:TicketEvent" elementFormDefault="qualified" version="1.6" xmlns="urn:TicketEvent" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>       <xsd:element name="TSAMessage">
>         <xsd:complexType>
>           <xsd:sequence>
>             <xsd:element name="GeneratedTimeStamp" type="xsd:dateTime">
>             </xsd:element>
>             <xsd:element name="SentTimeStamp" type="xsd:dateTime" minOccurs="0">
>             </xsd:element>
>             <xsd:element name="Message">
>               <xsd:complexType>
>                 <xsd:sequence>
>                   <xsd:any namespace="##any">
>                   </xsd:any>
>                 </xsd:sequence>
>               </xsd:complexType>
>             </xsd:element>
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>     </xsd:schema>
>     
>   </wsdl:types>
>   <wsdl:message name="clientRequestSoapIn">
>     <wsdl:part name="parameters" element="s0:clientRequest"/>
>   </wsdl:message>
>   <wsdl:message name="clientRequestSoapOut">
>     <wsdl:part name="parameters" element="s0:clientRequestResponse"/>
>   </wsdl:message>
>   <wsdl:portType name="TicketEventPortType">
>     <wsdl:operation name="clientRequest">
>       <wsdl:input message="s0:clientRequestSoapIn"/>
>       <wsdl:output message="s0:clientRequestSoapOut"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="TicketEventBinding" type="s0:TicketEventPortType">
>     <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>     <wsdl:operation name="clientRequest">
>       <soap:operation soapAction="urn:TicketEvent/clientRequest" style="document"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="TicketEventSrv">
>     <wsdl:port name="TicketEventPort" binding="s0:TicketEventBinding">
>       <soap:address location="http://telkom4:2007/axis/services/TicketEventPort"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> ============================================================

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