axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bartlomiej Zdanowski <b.zdanow...@autoguard.pl>
Subject Please help with sending objects array
Date Mon, 17 Sep 2007 12:58:17 GMT
Hello.
I have a problem. I use Axis2.0 at client side (Java) and PHP SOAP at 
server side. The problem is that when I send from client an array of 
objects, at server side only first object is seen as object not an array.

My request is
<xsd:complexType name="AddDealerInfoRequest">
        <xsd:complexContent>
            <xsd:extension base="tns:Request">
                <xsd:sequence>
                    <xsd:element name="bondProvisions" 
type="ws:BondProvision"
                        minOccurs="0" maxOccurs="unbounded"  />
                    <xsd:element name="clientId" type="xsd:int" 
nillable="false" />
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

Schema
    <xsd:complexType name="BondProvision">
        <xsd:sequence>
             <xsd:element name="BondProvisionId" type="xsd:int" 
nillable="true">
             </xsd:element>
             <xsd:element name="DealerInfoId" type="xsd:int" 
nillable="false">
             </xsd:element>
             <xsd:element name="ContractOptionId" type="xsd:int" 
nillable="false">
             </xsd:element>
             <xsd:element name="BondProvisionAmount" type="xsd:float" 
nillable="true">
             </xsd:element>
             <xsd:element name="BondProvisionVersionTs" 
type="xsd:dateTime" nillable="true" />
        </xsd:sequence>
    </xsd:complexType>

Encoded soap message is (only important part)
(...)
<soapenv:Body>
        <AddDealerInfoRequest href="#id0" />
        <multiRef id="id0" soapenc:root="0"
            
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            sessionId="4usqg2kj5p8lafmtefvl97n6n0"
            xsi:type="ns1:AddDealerInfoRequest"
            xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns:ns1="http://autoguard.pl/ac2/ws/rq">
            <bondProvisions href="#id2" />
            <bondProvisions href="#id3" />
            <clientId href="#id6" />
        </multiRef>
(...)

And at php's side message is seen as an stdClass but only first 
BondProvision object is available like this

array(sessionId="4usqg2kj5p8lafmtefvl97n6n0",
    bondProvisions=array(........values.....),
    clientId=1,
);
     
I expect to see bondProvisions as an array of BondProvision objects.
Please help.

-- 
*Bartlomiej Zdanowski*
Programmer
Product Research & Development Department
AutoGuard S.A.

Place of registration: Regional Court for the Capital City of Warsaw
Registration no.: 0000287629
Share capital: 1 059 000 PLN
Polish VAT and tax ID no.: PL1132219747
Omulewska 27 street
04-128 Warsaw
Poland
phone +48 22 611 69 23
www.autoguard.pl <http://www.autoguard.pl>

Mime
View raw message