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 Scott Sauyet <li...@sauyet.com> on 2007/08/22 18:44:00 UTC
Using soap.encoding.Array
If this doesn't belong on this list, could someone kindly suggest a more
appropriate list? Thanks, -- SS
I'm using Axis with XMLBeans as the client to an existing service, and
everything is working fine until I try to get data from an array. I get
back an element of an interface extending
org.xmlsoap.schemas.soap.encoding.Array
But this doesn't seem to let me get at the actual data inside the array.
Sniffing the SOAP messages assures me that there is in fact data being
returned, but the API appears to offer me no way to retrieve it. This
must be a simple oversight on my part, but I've been staring at it too
long without any insights.
Can someone explain how to get the elements of type MyClass from this
array? (More details are below.)
Thanks,
-- Scott
More details:
The schema in the WSDL contains the following:
<xs:complexType name="Event">
<xs:sequence>
<xs:element name="EventDateTime" type="xs:dateTime"/>
<xs:element name="EventDescription" type="xs:string"/>
<xs:element name="EventId" type="xs:long"/>
<xs:element name="EventTitle" type="xs:string"/>
<!-- many more fields -->
</xs:sequence>
</xs:complexType>
<xs:complexType name="arEvent">
<xs:complexContent>
<xs:restriction base="soapenc:Array">
<xs:sequence />
<xs:attribute ref="soapenc:arrayType"
n1:arrayType="ro:Event[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/"
/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
toString() on the resulting ArEvent object looks like this:
<xml-fragment
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:HNS="http://tempuri.org/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dat="Databox"
>
<dat:Event>
<dat:EventDateTime>2005-05-20T20:00:00</dat:EventDateTime>
<dat:EventDescription>Description here</dat:EventDescription>
<dat:EventId>1</dat:EventId>
<dat:EventTitle>The title</dat:EventTitle>
<!-- more fields -->
</dat:Event>
<dat:Event>
<dat:EventDateTime>2005-05-20T20:00:00</dat:EventDateTime>
<dat:EventDescription>Description field</dat:EventDescription>
<dat:EventId>6</dat:EventId>
<dat:EventTitle>Test event One</dat:EventTitle>
</dat:Event>
<!-- many more events -->
</xml-fragment>
So the data is clearly there. And the class representing the Event is
created by the WSDL2Java tool. I just can't figure out how to get at it.
Thanks again.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Using soap.encoding.Array
Posted by Scott Sauyet <li...@sauyet.com>.
Scott Sauyet wrote:
> Thanks -- it seems like the vendor's idea of doc/lit is... let's say...
> irregular. :-( I will try to follow up with the vendor on that.
I did, and was told that it's a problem that was fixed this week and
will be in next weekend's build. With their help, I was able to
temporarily work around it.
Thank you very much for your help.
-- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Using soap.encoding.Array
Posted by Scott Sauyet <li...@sauyet.com>.
Anne Thomas Manes wrote:
> On 8/22/07, Scott Sauyet <li...@sauyet.com> wrote:
>> org.xmlsoap.schemas.soap.encoding.Array
>>
>> [... ] doesn't seem to let me get at the actual data inside the array.
>
> SOAP Encoding arrays are only used with rpc/encoded. Axis2 doesn't
> support rpc/encoded. Switch to Axis 1.3.
Thanks -- it seems like the vendor's idea of doc/lit is... let's say...
irregular. :-( I will try to follow up with the vendor on that.
But Axis 1.3 does support this, huh? I swear I've tried that with no
success. (And this is Axis, not the 1.3 version of Axis2?) I will look
at it again.
Thanks,
-- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Using soap.encoding.Array
Posted by Anne Thomas Manes <at...@gmail.com>.
SOAP Encoding arrays are only used with rpc/encoded. Axis2 doesn't
support rpc/encoded. Switch to Axis 1.3.
Anne
On 8/22/07, Scott Sauyet <li...@sauyet.com> wrote:
> If this doesn't belong on this list, could someone kindly suggest a more
> appropriate list? Thanks, -- SS
>
> I'm using Axis with XMLBeans as the client to an existing service, and
> everything is working fine until I try to get data from an array. I get
> back an element of an interface extending
>
> org.xmlsoap.schemas.soap.encoding.Array
>
> But this doesn't seem to let me get at the actual data inside the array.
> Sniffing the SOAP messages assures me that there is in fact data being
> returned, but the API appears to offer me no way to retrieve it. This
> must be a simple oversight on my part, but I've been staring at it too
> long without any insights.
>
> Can someone explain how to get the elements of type MyClass from this
> array? (More details are below.)
>
> Thanks,
>
> -- Scott
>
> More details:
>
> The schema in the WSDL contains the following:
>
> <xs:complexType name="Event">
> <xs:sequence>
> <xs:element name="EventDateTime" type="xs:dateTime"/>
> <xs:element name="EventDescription" type="xs:string"/>
> <xs:element name="EventId" type="xs:long"/>
> <xs:element name="EventTitle" type="xs:string"/>
> <!-- many more fields -->
> </xs:sequence>
> </xs:complexType>
>
> <xs:complexType name="arEvent">
> <xs:complexContent>
> <xs:restriction base="soapenc:Array">
> <xs:sequence />
> <xs:attribute ref="soapenc:arrayType"
> n1:arrayType="ro:Event[]"
> xmlns:n1="http://schemas.xmlsoap.org/wsdl/"
> />
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
>
> toString() on the resulting ArEvent object looks like this:
>
> <xml-fragment
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:HNS="http://tempuri.org/"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:dat="Databox"
> >
> <dat:Event>
> <dat:EventDateTime>2005-05-20T20:00:00</dat:EventDateTime>
> <dat:EventDescription>Description here</dat:EventDescription>
> <dat:EventId>1</dat:EventId>
> <dat:EventTitle>The title</dat:EventTitle>
> <!-- more fields -->
> </dat:Event>
> <dat:Event>
> <dat:EventDateTime>2005-05-20T20:00:00</dat:EventDateTime>
> <dat:EventDescription>Description field</dat:EventDescription>
> <dat:EventId>6</dat:EventId>
> <dat:EventTitle>Test event One</dat:EventTitle>
> </dat:Event>
> <!-- many more events -->
> </xml-fragment>
>
> So the data is clearly there. And the class representing the Event is
> created by the WSDL2Java tool. I just can't figure out how to get at it.
>
> Thanks again.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org