Hi all,
I am using Axis for 3 years and I am falling down a very specific case.
I am trying to call a WS having a particular complexType as an output
part type :
<xsd:complexType name="ArrayOf_GeocoderResult">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns:GeocoderResult[]"/>
</restriction>
</complexContent>
</xsd:complexType>
When I use wsdl2java tool, I have a generated class called
ArrayOf_GeocoderResult which is correct for my case (I specify the
following options : setWrapArrays=true, setNoWrapped=true).
The problem is that this class does not contain any filed !!
So There is no getter, no setter... I think it is very strange, I was
expecting something concerning the array of GeocoderResult.
The problem occurs when I call the ws, I can see in my eclipse debugger
that the SOAP-ENVELOPPE returned by the geocoder service seems to be
correct but there is a problem during the deserialization. Axis is
trying to build an instance of ArrayOf_GeocoderResult based on an array
of objects... I think the array is correct but perhap there should be a
constructor taking this as a parameter ?
If you want to have a look at this WS, you can go on this website :
http://rpc.geocoder.us/
I give you the wsdl file in attach
I give you the returned soap-enveloppe too.
Regards,
Charles
<?xml version="1.0" encoding="utf-8" ?>
<definitions name="GeoCoder"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://rpc.geocoder.us/Geo/Coder/US/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://rpc.geocoder.us/Geo/Coder/US/">
<types>
<xsd:schema
targetNamespace="http://rpc.geocoder.us/Geo/Coder/US/"
elementFormDefault="unqualified" >
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:complexType name="ArrayOf_GeocoderResult">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns:GeocoderResult[]"/>
</restriction>
</complexContent>
</xsd:complexType>
<xsd:complexType name="GeocoderResult">
<xsd:all>
<xsd:element name="zip" type="xsd:int"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="lat" type="xsd:float"/>
<xsd:element name="long" type="xsd:float"/>
<xsd:element name="number" type="xsd:int"/>
<xsd:element name="suffix" type="xsd:string"/>
<xsd:element name="prefix" type="xsd:string"/>
<xsd:element name="type" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="suffix1" type="xsd:string"/>
<xsd:element name="prefix1" type="xsd:string"/>
<xsd:element name="type1" type="xsd:string"/>
<xsd:element name="street1" type="xsd:string"/>
<xsd:element name="suffix2" type="xsd:string"/>
<xsd:element name="prefix2" type="xsd:string"/>
<xsd:element name="type2" type="xsd:string"/>
<xsd:element name="street2" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ArrayOf_GeocoderAddressResult">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns:GeocoderAddressResult[]"/>
</restriction>
</complexContent>
</xsd:complexType>
<xsd:complexType name="GeocoderAddressResult">
<xsd:all>
<xsd:element name="number" type="xsd:int"/>
<xsd:element name="zip" type="xsd:int"/>
<xsd:element name="suffix" type="xsd:string"/>
<xsd:element name="prefix" type="xsd:string"/>
<xsd:element name="type" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="lat" type="xsd:float"/>
<xsd:element name="long" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ArrayOf_GeocoderIntersectionResult">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns:GeocoderIntersectionResult[]"/>
</restriction>
</complexContent>
</xsd:complexType>
<xsd:complexType name="GeocoderIntersectionResult">
<xsd:all>
<xsd:element name="zip" type="xsd:int"/>
<xsd:element name="suffix1" type="xsd:string"/>
<xsd:element name="prefix1" type="xsd:string"/>
<xsd:element name="type1" type="xsd:string"/>
<xsd:element name="street1" type="xsd:string"/>
<xsd:element name="suffix2" type="xsd:string"/>
<xsd:element name="prefix2" type="xsd:string"/>
<xsd:element name="type2" type="xsd:string"/>
<xsd:element name="street2" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="lat" type="xsd:float"/>
<xsd:element name="long" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<message name="geocodeRequest">
<part name="location" type="xsd:string"/>
</message>
<message name="geocodeResponse">
<part name="results" type="tns:ArrayOf_GeocoderResult"/>
</message>
<message name="geocodeAddressRequest">
<part name="address" type="xsd:string"/>
</message>
<message name="geocodeAddressResponse">
<part name="results" type="tns:ArrayOf_GeocoderAddressResult"/>
</message>
<message name="geocodeIntersectionRequest">
<part name="intersection" type="xsd:string"/>
</message>
<message name="geocodeIntersectionResponse">
<part name="results" type="tns:ArrayOf_GeocoderIntersectionResult"/>
</message>
<portType name="GeoCode_PortType">
<operation name="geocode">
<input message="tns:geocodeRequest"/>
<output message="tns:geocodeResponse"/>
</operation>
<operation name="geocode_address">
<input message="tns:geocodeAddressRequest"/>
<output message="tns:geocodeAddressResponse"/>
</operation>
<operation name="geocode_intersection">
<input message="tns:geocodeIntersectionRequest"/>
<output message="tns:geocodeIntersectionResponse"/>
</operation>
</portType>
<binding name="GeoCode_Binding" type="tns:GeoCode_PortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="geocode">
<soap:operation style="rpc" soapAction="http://rpc.geocoder.us/Geo/Coder/US#geocode"/>
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://rpc.geocoder.us/Geo/Coder/US/"
use="encoded"/>
</input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://rpc.geocoder.us/Geo/Coder/US/"
use="encoded"/>
</output>
</operation>
<operation name="geocode_address">
<soap:operation style="rpc" soapAction="http://rpc.geocoder.us/Geo/Coder/US#geocode_address"/>
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://rpc.geocoder.us/Geo/Coder/US/"
use="encoded"/>
</input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://rpc.geocoder.us/Geo/Coder/US/"
use="encoded"/>
</output>
</operation>
<operation name="geocode_intersection">
<soap:operation style="rpc" soapAction="http://rpc.geocoder.us/Geo/Coder/US#geocode_intersection"/>
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://rpc.geocoder.us/Geo/Coder/US/"
use="encoded"/>
</input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://rpc.geocoder.us/Geo/Coder/US/"
use="encoded"/>
</output>
</operation>
</binding>
<service name="GeoCode_Service">
<documentation>WSDL File for Geo Coder - Written by Scott Gunn (scott_gunn*AT*email.com)</documentation>
<port binding="tns:GeoCode_Binding" name="GeoCode_Port">
<soap:address
location="http://rpc.geocoder.us/service/soap/"/>
</port>
</service>
</definitions>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<namesp1:geocodeResponse
xmlns:namesp1="http://rpc.geocoder.us/Geo/Coder/US/">
<geo:s-gensym18
xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="geo:GeocoderAddressResult[1]"
xmlns:geo="http://rpc.geocoder.us/Geo/Coder/US/">
<item xsi:type="geo:GeocoderAddressResult">
<number xsi:type="xsd:int">1600</number>
<lat xsi:type="xsd:float">38.898748</lat>
<street xsi:type="xsd:string">Pennsylvania</street>
<state xsi:type="xsd:string">DC</state>
<city xsi:type="xsd:string">Washington</city>
<zip xsi:type="xsd:int">20502</zip>
<suffix xsi:type="xsd:string">NW</suffix>
<long xsi:type="xsd:float">-77.037684</long>
<type xsi:type="xsd:string">Ave</type>
<prefix xsi:type="xsd:string"/>
</item>
</geo:s-gensym18>
</namesp1:geocodeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]