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 Nate Roe <na...@vegas.com> on 2008/04/05 00:00:56 UTC
How do I pass an array as an OMElement?
I'm using Axis 1.3.
On the client side, I have an ADBBean setter method that takes an OMElement. The corresponding service method takes an array of objects.
How do I make my array of objects into an OMElement?
Thanks,
Nate Roe
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: How do I pass an array as an OMElement?
Posted by Nate Roe <na...@vegas.com>.
I found this KB article which I think is exactly what I want.
http://wso2.org/library/332
After I read that, at first I wasn't sure how to make an appropriate QName, but now I see that my auto-generated ADBBean classes make QName objects often, so I can copy paste from there.
Thanks,
Nate Roe
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Friday, April 04, 2008 4:45 PM
To: Nate Roe
Subject: Re: How do I pass an array as an OMElement?
assuming the wsdl defines some unique entity (such as Person) which will be
represented in Axiom code as an OMElement
<wsdl:types>
<xs:schema xmlns:ax21="http://data.test.vegas.com/xsd"
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://data.test.vegas.com/xsd">
<xs:complexType name="Person">
<xs:sequence>
<xs:element minOccurs="0" name="address" nillable="true"
type="ax21:Address"/>
<xs:element minOccurs="0" name="name" nillable="true"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
//you can then assign the array to be an open ended Array of predefined
Person entities
<xsd:complexType name="personArray">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType"
wsdl:arrayType="Person[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
Does this help?
M-
----- Original Message -----
From: "Nate Roe" <na...@vegas.com>
To: <ax...@ws.apache.org>
Sent: Friday, April 04, 2008 6:00 PM
Subject: How do I pass an array as an OMElement?
I'm using Axis 1.3.
On the client side, I have an ADBBean setter method that takes an OMElement.
The corresponding service method takes an array of objects.
How do I make my array of objects into an OMElement?
Thanks,
Nate Roe
---------------------------------------------------------------------
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