Hello!
I am producing a web
service using Sun's stack included with NetBeans 4.1, which needs to be
consumed by a ColdFusion client (which uses Axis).
As long as the types returned by the web service are basic, I have no problems.
However if the types returned are complex, the WSDL produced by Sun's stack
confuses the hell out of Axis, which then proceeds to produce uncompilable code
on the client end. If I use Axis to manually produce the WSDL on the server
end, everything's good again.
What is going on? Which of the two systems is "breaking the rules"?
Can you suggest a solution?
Thanks for your help,
Luca
Sample WSDL produced by NetBeans:
<?xml version="1.0" encoding="UTF-8"?><definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:GetCustomer/wsdl"
xmlns:ns2="urn:GetCustomer/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
name="GetCustomer" targetNamespace="urn:GetCustomer/wsdl">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="urn:GetCustomer/types"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:GetCustomer/types">
<complexType name="getCustomer">
<sequence>
<element name="long_1"
type="long"/></sequence></complexType>
<complexType name="getCustomerResponse">
<sequence>
<element name="result" type="tns:Customer"
nillable="true"/></sequence></complexType>
<complexType name="Customer">
<sequence>
<element name="city" type="string"
nillable="true"/>
<element name="cust" type="long"/>
<element name="lineA" type="string"
nillable="true"/>
<element name="lineB" type="string"
nillable="true"/>
<element name="name" type="string"
nillable="true"/>
<element name="state" type="string"
nillable="true"/>
<element name="zip" type="string"
nillable="true"/></sequence></complexType>
<element name="getCustomer" type="tns:getCustomer"/>
<element name="getCustomerResponse"
type="tns:getCustomerResponse"/></schema></types>
<message name="GetCustomerSEI_getCustomer">
<part name="parameters"
element="ns2:getCustomer"/></message>
<message name="GetCustomerSEI_getCustomerResponse">
<part name="result" element="ns2:getCustomerResponse"/></message>
<portType name="GetCustomerSEI">
<operation name="getCustomer">
<input message="tns:GetCustomerSEI_getCustomer"/>
<output
message="tns:GetCustomerSEI_getCustomerResponse"/></operation></portType>
<binding name="GetCustomerSEIBinding" type="tns:GetCustomerSEI">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="getCustomer">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation></binding>
<service name="GetCustomer">
<port name="GetCustomerSEIPort"
binding="tns:GetCustomerSEIBinding">
<soap:address
location="http://lucaserver:8080/LucaServices/GetCustomer"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/></port></service></definitions>
Sample WSDL produced by Axis for the same
code:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:GetCustomer"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:GetCustomer" xmlns:intf="urn:GetCustomer"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns2="http://Luca.asi.com"
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="http://Luca.asi.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="Customer">
<sequence>
<element name="city" nillable="true"
type="soapenc:string"/>
<element name="cust" type="xsd:long"/>
<element name="lineA" nillable="true"
type="soapenc:string"/>
<element name="lineB" nillable="true"
type="soapenc:string"/>
<element name="name" nillable="true"
type="soapenc:string"/>
<element name="state" nillable="true"
type="soapenc:string"/>
<element name="zip" nillable="true"
type="soapenc:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getCustomerResponse">
<wsdl:part name="getCustomerReturn"
type="tns2:Customer"/>
</wsdl:message>
<wsdl:message name="getCustomerRequest">
<wsdl:part name="in0" type="xsd:long"/>
</wsdl:message>
<wsdl:portType name="GetCustomerSEI">
<wsdl:operation name="getCustomer"
parameterOrder="in0">
<wsdl:input message="impl:getCustomerRequest" name="getCustomerRequest"/>
<wsdl:output message="impl:getCustomerResponse"
name="getCustomerResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="GetCustomerSoapBinding"
type="impl:GetCustomerSEI">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getCustomer">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getCustomerRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:GetCustomer" use="encoded"/>
</wsdl:input>
<wsdl:output name="getCustomerResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:GetCustomer" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="GetCustomerSEIService">
<wsdl:port binding="impl:GetCustomerSoapBinding"
name="GetCustomer">
<wsdlsoap:address
location="http://localhost:8080/LucaServices/GetCustomer"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
|
- Axis vs. Sun incompatibility?? Luca Fabbri
-