You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mattias Jiderhamn <ma...@expertsystem.se> on 2002/11/19 13:41:29 UTC
Problems with generated WSDL
I'm having problems generating WSDL files. Whether I user the "automatic"
/services/Service?Wsdl or the manual Java2WSDL I get the same problem.
The namespace references of the file are invalid. In the root element I get
xmlns:="" and xmlns:="http://www.w3.org/2000/xmlns/". I also get xmlns:=""
in lots of the other elements.
The same problems occur in server-config.wsdd after deploying services.
Why is this? Do I have to configure something or add some parameter?
Here is a full example:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:ApiTest" xmlns:=""
xmlns:impl="urn:ApiTest" xmlns:intf="urn:ApiTest"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:="http://www.w3.org/2000/xmlns/">
<types xmlns:="http://schemas.xmlsoap.org/wsdl/">
<schema xmlns:="" xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:ApiTest">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="IntPair">
<sequence>
<element name="a" type="xsd:int"/>
<element name="b" type="xsd:int"/>
</sequence>
</complexType>
<element name="IntPair" nillable="true" type="impl:IntPair"/>
<complexType name="ArrayOf_xsd_int">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
</restriction>
</complexContent>
</complexType>
<element name="ArrayOf_xsd_int" nillable="true"
type="impl:ArrayOf_xsd_int"/>
<complexType name="ArrayOf_xsd_double">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
</restriction>
</complexContent>
</complexType>
<element name="ArrayOf_xsd_double" nillable="true"
type="impl:ArrayOf_xsd_double"/>
<complexType name="ArrayOfIntPair">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="impl:IntPair[]"/>
</restriction>
</complexContent>
</complexType>
<element name="ArrayOfIntPair" nillable="true"
type="impl:ArrayOfIntPair"/>
</schema>
</types>
<wsdl:message name="getIntPairArrayResponse" xmlns:="">
<wsdl:part name="getIntPairArrayReturn" type="impl:ArrayOfIntPair"/>
</wsdl:message>
<wsdl:message name="getIntPairArrayRequest" xmlns:="">
</wsdl:message>
<wsdl:message name="getNullObjectResponse" xmlns:="">
<wsdl:part name="getNullObjectReturn" type="impl:IntPair"/>
</wsdl:message>
<wsdl:message name="getNullObjectRequest" xmlns:="">
</wsdl:message>
<wsdl:message name="isOkResponse" xmlns:="">
<wsdl:part name="isOkReturn" type="xsd:boolean"/>
</wsdl:message>
<wsdl:message name="getIntPairResponse" xmlns:="">
<wsdl:part name="getIntPairReturn" type="impl:IntPair"/>
</wsdl:message>
<wsdl:message name="getDoubleArrayResponse" xmlns:="">
<wsdl:part name="getDoubleArrayReturn"
type="impl:ArrayOf_xsd_double"/>
</wsdl:message>
<wsdl:message name="getIntArrayResponse" xmlns:="">
<wsdl:part name="getIntArrayReturn" type="impl:ArrayOf_xsd_int"/>
</wsdl:message>
<wsdl:message name="getNullArrayRequest" xmlns:="">
</wsdl:message>
<wsdl:message name="getDoubleArrayRequest" xmlns:="">
</wsdl:message>
<wsdl:message name="isOkRequest" xmlns:="">
</wsdl:message>
<wsdl:message name="getNullArrayResponse" xmlns:="">
<wsdl:part name="getNullArrayReturn" type="impl:ArrayOf_xsd_int"/>
</wsdl:message>
<wsdl:message name="getIntArrayRequest" xmlns:="">
</wsdl:message>
<wsdl:message name="getIntPairRequest" xmlns:="">
</wsdl:message>
<wsdl:portType name="ApiTest" xmlns:="">
<wsdl:operation name="isOk">
<wsdl:input name="isOkRequest" message="impl:isOkRequest"/>
<wsdl:output name="isOkResponse" message="impl:isOkResponse"/>
</wsdl:operation>
<wsdl:operation name="getIntPair">
<wsdl:input name="getIntPairRequest"
message="impl:getIntPairRequest"/>
<wsdl:output name="getIntPairResponse"
message="impl:getIntPairResponse"/>
</wsdl:operation>
<wsdl:operation name="getIntArray">
<wsdl:input name="getIntArrayRequest"
message="impl:getIntArrayRequest"/>
<wsdl:output name="getIntArrayResponse"
message="impl:getIntArrayResponse"/>
</wsdl:operation>
<wsdl:operation name="getDoubleArray">
<wsdl:input name="getDoubleArrayRequest"
message="impl:getDoubleArrayRequest"/>
<wsdl:output name="getDoubleArrayResponse"
message="impl:getDoubleArrayResponse"/>
</wsdl:operation>
<wsdl:operation name="getIntPairArray">
<wsdl:input name="getIntPairArrayRequest"
message="impl:getIntPairArrayRequest"/>
<wsdl:output name="getIntPairArrayResponse"
message="impl:getIntPairArrayResponse"/>
</wsdl:operation>
<wsdl:operation name="getNullObject">
<wsdl:input name="getNullObjectRequest"
message="impl:getNullObjectRequest"/>
<wsdl:output name="getNullObjectResponse"
message="impl:getNullObjectResponse"/>
</wsdl:operation>
<wsdl:operation name="getNullArray">
<wsdl:input name="getNullArrayRequest"
message="impl:getNullArrayRequest"/>
<wsdl:output name="getNullArrayResponse"
message="impl:getNullArrayResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ApiTestSoapBinding" xmlns:="" type="impl:ApiTest">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="isOk">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="isOkRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:input>
<wsdl:output name="isOkResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getIntPair">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getIntPairRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:input>
<wsdl:output name="getIntPairResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getIntArray">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getIntArrayRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:input>
<wsdl:output name="getIntArrayResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDoubleArray">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getDoubleArrayRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:input>
<wsdl:output name="getDoubleArrayResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getIntPairArray">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getIntPairArrayRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:input>
<wsdl:output name="getIntPairArrayResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getNullObject">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getNullObjectRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:input>
<wsdl:output name="getNullObjectResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getNullArray">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getNullArrayRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:input>
<wsdl:output name="getNullArrayResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:ApiTest"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ApiTestService" xmlns:="">
<wsdl:port name="ApiTest" binding="impl:ApiTestSoapBinding">
<wsdlsoap:address location="http://localhost/services/ApiTest"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Mattias Jiderhamn
Expert Systems
mattias@expertsystem.se
http://www.expertsystem.se
RE: Problems with generated WSDL
Posted by Mattias Jiderhamn <ma...@expertsystem.se>.
Hmmmm.
It might have something todo with Resin, which has its own XML parser.
If I put Xerces (1.4.4) first in the classpath, Java2WSDL seemed to work.
I will have to try around a little and get back.
If anyone has any experiense with Axis + Resin + WSDL, tips are welcome.
> -----Original Message-----
> From: Mattias Jiderhamn [mailto:mattias@expertsystem.se]
> Sent: Tuesday, November 19, 2002 1:41 PM
> To: axis-user@xml.apache.org
> Subject: Problems with generated WSDL
>
>
> I'm having problems generating WSDL files. Whether I user the "automatic"
> /services/Service?Wsdl or the manual Java2WSDL I get the same problem.
>
> The namespace references of the file are invalid. In the root
> element I get
> xmlns:="" and xmlns:="http://www.w3.org/2000/xmlns/". I also get xmlns:=""
> in lots of the other elements.
>
> The same problems occur in server-config.wsdd after deploying services.
>
> Why is this? Do I have to configure something or add some parameter?
>
>
> Here is a full example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="urn:ApiTest" xmlns:=""
> xmlns:impl="urn:ApiTest" xmlns:intf="urn:ApiTest"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:="http://www.w3.org/2000/xmlns/">
> <types xmlns:="http://schemas.xmlsoap.org/wsdl/">
> <schema xmlns:="" xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="urn:ApiTest">
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType name="IntPair">
> <sequence>
> <element name="a" type="xsd:int"/>
> <element name="b" type="xsd:int"/>
> </sequence>
> </complexType>
> <element name="IntPair" nillable="true" type="impl:IntPair"/>
> <complexType name="ArrayOf_xsd_int">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
> </restriction>
> </complexContent>
> </complexType>
> <element name="ArrayOf_xsd_int" nillable="true"
> type="impl:ArrayOf_xsd_int"/>
> <complexType name="ArrayOf_xsd_double">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
> </restriction>
> </complexContent>
> </complexType>
> <element name="ArrayOf_xsd_double" nillable="true"
> type="impl:ArrayOf_xsd_double"/>
> <complexType name="ArrayOfIntPair">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:IntPair[]"/>
> </restriction>
> </complexContent>
> </complexType>
> <element name="ArrayOfIntPair" nillable="true"
> type="impl:ArrayOfIntPair"/>
> </schema>
> </types>
>
> <wsdl:message name="getIntPairArrayResponse" xmlns:="">
>
> <wsdl:part name="getIntPairArrayReturn" type="impl:ArrayOfIntPair"/>
>
> </wsdl:message>
>
> <wsdl:message name="getIntPairArrayRequest" xmlns:="">
>
> </wsdl:message>
>
> <wsdl:message name="getNullObjectResponse" xmlns:="">
>
> <wsdl:part name="getNullObjectReturn" type="impl:IntPair"/>
>
> </wsdl:message>
>
> <wsdl:message name="getNullObjectRequest" xmlns:="">
>
> </wsdl:message>
>
> <wsdl:message name="isOkResponse" xmlns:="">
>
> <wsdl:part name="isOkReturn" type="xsd:boolean"/>
>
> </wsdl:message>
>
> <wsdl:message name="getIntPairResponse" xmlns:="">
>
> <wsdl:part name="getIntPairReturn" type="impl:IntPair"/>
>
> </wsdl:message>
>
> <wsdl:message name="getDoubleArrayResponse" xmlns:="">
>
> <wsdl:part name="getDoubleArrayReturn"
> type="impl:ArrayOf_xsd_double"/>
>
> </wsdl:message>
>
> <wsdl:message name="getIntArrayResponse" xmlns:="">
>
> <wsdl:part name="getIntArrayReturn" type="impl:ArrayOf_xsd_int"/>
>
> </wsdl:message>
>
> <wsdl:message name="getNullArrayRequest" xmlns:="">
>
> </wsdl:message>
>
> <wsdl:message name="getDoubleArrayRequest" xmlns:="">
>
> </wsdl:message>
>
> <wsdl:message name="isOkRequest" xmlns:="">
>
> </wsdl:message>
>
> <wsdl:message name="getNullArrayResponse" xmlns:="">
>
> <wsdl:part name="getNullArrayReturn" type="impl:ArrayOf_xsd_int"/>
>
> </wsdl:message>
>
> <wsdl:message name="getIntArrayRequest" xmlns:="">
>
> </wsdl:message>
>
> <wsdl:message name="getIntPairRequest" xmlns:="">
>
> </wsdl:message>
>
> <wsdl:portType name="ApiTest" xmlns:="">
>
> <wsdl:operation name="isOk">
>
> <wsdl:input name="isOkRequest" message="impl:isOkRequest"/>
>
> <wsdl:output name="isOkResponse" message="impl:isOkResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="getIntPair">
>
> <wsdl:input name="getIntPairRequest"
> message="impl:getIntPairRequest"/>
>
> <wsdl:output name="getIntPairResponse"
> message="impl:getIntPairResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="getIntArray">
>
> <wsdl:input name="getIntArrayRequest"
> message="impl:getIntArrayRequest"/>
>
> <wsdl:output name="getIntArrayResponse"
> message="impl:getIntArrayResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="getDoubleArray">
>
> <wsdl:input name="getDoubleArrayRequest"
> message="impl:getDoubleArrayRequest"/>
>
> <wsdl:output name="getDoubleArrayResponse"
> message="impl:getDoubleArrayResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="getIntPairArray">
>
> <wsdl:input name="getIntPairArrayRequest"
> message="impl:getIntPairArrayRequest"/>
>
> <wsdl:output name="getIntPairArrayResponse"
> message="impl:getIntPairArrayResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="getNullObject">
>
> <wsdl:input name="getNullObjectRequest"
> message="impl:getNullObjectRequest"/>
>
> <wsdl:output name="getNullObjectResponse"
> message="impl:getNullObjectResponse"/>
>
> </wsdl:operation>
>
> <wsdl:operation name="getNullArray">
>
> <wsdl:input name="getNullArrayRequest"
> message="impl:getNullArrayRequest"/>
>
> <wsdl:output name="getNullArrayResponse"
> message="impl:getNullArrayResponse"/>
>
> </wsdl:operation>
>
> </wsdl:portType>
>
> <wsdl:binding name="ApiTestSoapBinding" xmlns:="" type="impl:ApiTest">
>
> <wsdlsoap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
> <wsdl:operation name="isOk">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="isOkRequest">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:input>
>
> <wsdl:output name="isOkResponse">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="getIntPair">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="getIntPairRequest">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:input>
>
> <wsdl:output name="getIntPairResponse">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="getIntArray">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="getIntArrayRequest">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:input>
>
> <wsdl:output name="getIntArrayResponse">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="getDoubleArray">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="getDoubleArrayRequest">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:input>
>
> <wsdl:output name="getDoubleArrayResponse">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="getIntPairArray">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="getIntPairArrayRequest">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:input>
>
> <wsdl:output name="getIntPairArrayResponse">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="getNullObject">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="getNullObjectRequest">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:input>
>
> <wsdl:output name="getNullObjectResponse">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> <wsdl:operation name="getNullArray">
>
> <wsdlsoap:operation soapAction=""/>
>
> <wsdl:input name="getNullArrayRequest">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:input>
>
> <wsdl:output name="getNullArrayResponse">
>
> <wsdlsoap:body use="encoded"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:ApiTest"/>
>
> </wsdl:output>
>
> </wsdl:operation>
>
> </wsdl:binding>
>
> <wsdl:service name="ApiTestService" xmlns:="">
>
> <wsdl:port name="ApiTest" binding="impl:ApiTestSoapBinding">
>
> <wsdlsoap:address location="http://localhost/services/ApiTest"/>
>
> </wsdl:port>
>
> </wsdl:service>
>
> </wsdl:definitions>
>
>
> Mattias Jiderhamn
> Expert Systems
>
> mattias@expertsystem.se
> http://www.expertsystem.se
>
>