axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1555) The attachment sample client classes fail to generate from the wsdl
Date Fri, 24 Sep 2004 15:54:32 GMT
The following comment has been added to this issue:

     Author: Jayachadra Sekhara Rao Sunkara
    Created: Fri, 24 Sep 2004 8:53 AM
       Body:
I think I troubleshooted the problem. When WSDL file is generated using ?WSDL option, some
basic types are also getting qualified with the service specific namespace like {urn:EchoAttachmentsService}.
So if one uses that same WSDL file and runs a WSDL2Java program would fail to identify the
exact data type for such objects and would log it as an undefinedType in the SymbolTable.
And eventually when checking for UndefinedTypes before generating the java code, an execption
occurs.
I think this can be overcome by patching up the generateWSDL routine itself (and other associated
ruotines, if any) on the server side so that the generated WSDL doesn't contain any frail,
unidentifiable type descriptions in it.
I'm on that task, and would try to post a patch at the earliest
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1555?page=comments#action_53391

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1555

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1555
    Summary: The attachment sample client classes fail to generate from the wsdl
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Samples
   Versions:
             current (nightly)

   Assignee: 
   Reporter: Vlad Sa

    Created: Tue, 14 Sep 2004 11:35 AM
    Updated: Fri, 24 Sep 2004 8:53 AM
Environment: Windows XP, tomcat 4.1 axis 1.2 beta3

Description:
The WSDL2Java fails to generate client files for Attachments sample.

I have deployed attachments sample from the samples directory on tomcat 4.1. The shipped client
classes are worked. Then I try to generate the client files from wsdl file.
I go to the 
"View the list of deployed Web services" click urn:EchoAttachmentsService (wsdl) and save
wsdl file as EchoAttachmentsService.xml.

I have run follows command: 
java org.apache.axis.wsdl.WSDL2Java -t -s EchoAttachmentsService.xml
Got:
java.io.IOException: Type {urn:EchoAttachmentsService}DataHandler is referenced but not defined.
 at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:652)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:532)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:506)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:483)
 at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:356)
 at java.lang.Thread.run(Thread.java:536)

Here is wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/urn:EchoAttachmentsService"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/axis/services/urn:EchoAttachmentsService"
xmlns:intf="http://localhost:8080/axis/services/urn:EchoAttachmentsService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="urn:EchoAttachmentsService" 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.2beta3
Built on Aug 31, 2004 (10:11:01 PDT)-->
 <wsdl:types>
  <schema targetNamespace="http://localhost:8080/axis/services/urn:EchoAttachmentsService"
xmlns="http://www.w3.org/2001/XMLSchema">
   <import namespace="urn:EchoAttachmentsService"/>
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_tns1_DataHandler">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:DataHandler[]"/>
     </restriction>
    </complexContent>
   </complexType>
  </schema>
 </wsdl:types>
   <wsdl:message name="echoRequest">
      <wsdl:part name="dh" type="tns1:DataHandler"/>
   </wsdl:message>
   <wsdl:message name="echoDirRequest">
      <wsdl:part name="attachments" type="impl:ArrayOf_tns1_DataHandler"/>
   </wsdl:message>
   <wsdl:message name="echoDirResponse">
      <wsdl:part name="echoDirReturn" type="impl:ArrayOf_tns1_DataHandler"/>
   </wsdl:message>
   <wsdl:message name="echoResponse">
      <wsdl:part name="returnqname" type="tns1:DataHandler"/>
   </wsdl:message>
   <wsdl:portType name="EchoAttachmentsService">
      <wsdl:operation name="echo" parameterOrder="dh">
         <wsdl:input message="impl:echoRequest" name="echoRequest"/>
         <wsdl:output message="impl:echoResponse" name="echoResponse"/>
      </wsdl:operation>
      <wsdl:operation name="echoDir" parameterOrder="attachments">
         <wsdl:input message="impl:echoDirRequest" name="echoDirRequest"/>
         <wsdl:output message="impl:echoDirResponse" name="echoDirResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="urn:EchoAttachmentsServiceSoapBinding" type="impl:EchoAttachmentsService">
      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="echo">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="echoRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/urn:EchoAttachmentsService"
use="encoded"/>
         </wsdl:input>
         <wsdl:output name="echoResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/urn:EchoAttachmentsService"
use="encoded"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="echoDir">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="echoDirRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://attachments.samples"
use="encoded"/>
         </wsdl:input>
         <wsdl:output name="echoDirResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/urn:EchoAttachmentsService"
use="encoded"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="EchoAttachmentsServiceService">
      <wsdl:port binding="impl:urn:EchoAttachmentsServiceSoapBinding" name="urn:EchoAttachmentsService">
         <wsdlsoap:address location="http://localhost:8080/axis/services/urn:EchoAttachmentsService"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

I do not make any changes to the code. I have all required jar files in the path. I do not
have sample directory classes in the path.

If I generate wsdl file using java2WSDL and then generate client using WSDL2Java it works
but WSDL is different.

Please advise is my mistake or a bug.

Thanks Vlad.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message