AW: [SOAP] Problems with sending arrays via Soap

[email protected] ("Lorenz Barth")
Newsgroups php.soap
Organization PBX-network GmbH
Message-ID <[email protected]>
Hi Jonathan,

Thanks for the quick responste. I've tried that before. It didn't help :(

But as far as i understand that option affacts only how recived Data is processed. Not the serialisaton of the data. 

Lorenz

-----Ursprüngliche Nachricht-----
Von: Jonathan Pitcher [mailto:[email protected]] 
Gesendet: Dienstag, 8. Juli 2008 19:16
An: Lorenz Barth; [email protected]
Betreff: Re: [SOAP] Problems with sending arrays via Soap

I don't know if this will help, but we deal a lot with vendors on java platforms and when we run into issues with their systems not taking an array we setup the client as follows ...


$this->client = new SoapClient($this->wsdl, Array('trace' => true, 'features' => SOAP_USE_XSI_ARRAY_TYPE));

Notice the 'features' part ... That solved our problem, I hope it helps solve yours.

Jonathan Pitcher


On 7/8/08 12:05 PM, "Lorenz Barth" <[email protected]> wrote:

> Hello,
> 
> I'm trying to send a string array to one of our services. Here the 
> part of the
> wsdl:
> 
> <wsdl:message name="sendTextLetterRequest"> <wsdl:part name="t" 
> type="tns1:Ticket"/> <wsdl:part name="recipient" 
> type="soapenc:string"/> <wsdl:part name="subject" 
> type="soapenc:string"/> <wsdl:part name="country" 
> type="soapenc:string"/> <wsdl:part name="content" 
> type="soapenc:string"/> <wsdl:part name="options" 
> type="impl:ArrayOf_soapenc_string"/>
> </wsdl:message>
> 
> 
> <schema
> targetNamespace="http://127.0.0.1/pbx-server/customer/services/LetterS
> ervice"> <import 
> namespace="http://shared.webservices.server.platform.pbxnetwork.de"/>
> <import namespace="pbx"/>
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType name="ArrayOf_soapenc_string"> <complexContent> 
> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" 
> wsdl:arrayType="soapenc:string[]"/>
> </restriction>
> </complexContent>
> </complexType>
> </schema>
> 
> 
> The server is based on java Axis. Simple Things like normal stings and 
> even Objects like the Ticket are working fine. But I'm unable to send 
> the options array to the Server. Here is a part of the php client app:
> 
> $pbx_client = new SoapClient($wsdl);
>         try {
> 
> //          $result = $pbx_client->__soapCall("sendTextLetter", array(new
> pbx_Ticket($ticket),"recipient"=>$recipient,"subject"=>$subject,"count
> ry"=>$co untry,"content"=>$content,"options"=>$options));
> $result = $pbx_client->sendTextLetter(new 
> pbx_Ticket($ticket),$recipient,$subject,$country,$content,$options);
> if (true === $result) {
>                         DebugMessage("PBX: Letter Versendet.");
>                         return true;
>                 } else {
>                         DebugMessage("PBX: Fehler beim Letter 
> Versand",$result);
>                         return false;
>                 }
>         }catch(SoapFault $exception) { print_r($exception); 
> DebugMessage("Fehler beim Briefversand", $exception);
> 
> 
> }
> 
> 
> Hopefully one of you guys can help me with this. I search google all 
> day but without success.
> 
> Thanks a lot in advance
> 
> Lorenz
> 
> 
> 
> 
> --
> PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: 
> http://www.php.net/unsub.php
> 



--
PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.