Hello,
I am facing a problem with attachments and Java2WSDL.
Here is my interface :
package com.wlab.axis;
import javax.activation.DataHandler;
/**
* Interface describing Lab web service
**/
public interface UnionServ {
public int push(String fName);
public DataHandler[] pop();
}
When I call java2wsdl, it gives me a wsdl file (see attachment).
Then when I call wsdl2java, I get this error message :
java.io.IOException: Type DataHandler is referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:522)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
at java.lang.Thread.run(Unknown Source)
Anyone can help me ? I need to pop a undefined number of documents from
the server and I didnt find another way.
Thanks for your help.
--
Walid Daniels
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="url:axis.wlab.com"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="url:axis.wlab.com"
xmlns:intf="url:axis.wlab.com"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="url:axis.wlab.com" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_tns2_DataHandler">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns2:DataHandler[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="pushResponse">
<wsdl:part name="pushReturn" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="popResponse">
<wsdl:part name="popReturn" type="impl:ArrayOf_tns2_DataHandler"/>
</wsdl:message>
<wsdl:message name="pushRequest">
<wsdl:part name="in0" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="popRequest">
</wsdl:message>
<wsdl:portType name="UnionServ">
<wsdl:operation name="pop">
<wsdl:input message="impl:popRequest" name="popRequest"/>
<wsdl:output message="impl:popResponse" name="popResponse"/>
</wsdl:operation>
<wsdl:operation name="push" parameterOrder="in0">
<wsdl:input message="impl:pushRequest" name="pushRequest"/>
<wsdl:output message="impl:pushResponse" name="pushResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="UnionServSoapBinding" type="impl:UnionServ">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="pop">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="popRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="url:axis.wlab.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="popResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="url:axis.wlab.com" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="push">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="pushRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="url:axis.wlab.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="pushResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="url:axis.wlab.com" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="UnionServService">
<wsdl:port binding="impl:UnionServSoapBinding" name="UnionServ">
<wsdlsoap:address location="http://localhost:8080/axis/services/UnionServ"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
package com.wlab.axis;
import javax.activation.DataHandler;
/**
* Interface describing UnionLab web service
**/
public interface UnionServ {
public int push(String fName);
public DataHandler[] pop(void);
}