Hi all (again :)

I would like to write such a service method, that can get receive binary files (so it can recieve soap attachments). I tested the sample service sample/attachments (like Simone and Fabricio http://marc.theaimsgroup.com/?l=axis-user&m=113940005201713&w=2), it works (also the hand written client), but when trying to create client from the wsdl WSDL2java throws an exception that DataHandler is not defined (and it is really not deined). Is there possibility to create a webmethod, from that the generated wsdl contains also the attachment informations? Or Is it always better to use the generated wsdl as a template, so always to insert the attachment information into it?
I use Axis 1.3

Thnx for the help
 George


thrown exception when calling WSDL2java:

java.io.IOException: Type {urn:EchoAttachmentsService}DataHandler is referenced
but not defined.
at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(Symbol
Table.java:665)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545
)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Unknown Source)



axis-generated WSDL

?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://localhost:8085/axis/services/urn:EchoAttachmentsService";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:impl="http://localhost:8085/axis/services/urn:EchoAttachmentsService";
xmlns:intf="http://localhost:8085/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.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
 <wsdl:types>
  <schema
targetNamespace="http://localhost:8085/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="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:message name="echoRequest">

      <wsdl:part name="dh" 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:8085/axis/services/urn:EchoAttachmentsService";
use="encoded"/>

         </wsdl:input>

         <wsdl:output name="echoResponse">

            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://localhost:8085/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:8085/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:8085/axis/services/urn:EchoAttachmentsService"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>






--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Reply via email to