[prev in list] [next in list] [prev in thread] [next in thread]
List: php-soap
Subject: [SOAP] SOAP and Arrays
From: 24.7.147.200
Date: 2008-06-04 19:19:45
Message-ID: B2.E1.12662.ADAE6484 () pb1 ! pair ! com
[Download RAW message or body]
I am using the SOAP Package and have an issue.
When I pass an array to the SOAP call it wraps each item in an <item>
</item> tag. The WSDL indicated it needs to be wrapped in <int> </int> but
it doesn't do this.
I created a new array w/ the int as the array identifier and it now created
the <int></int> but still warps in an <item> tag.
The Lib works great for everything except Arrays. All of my array values get
wrapped in this <item> tag and the Soap server ignores them.
The Documentation is lacking on this issue.
Is this a Bug or am I not submitting the array correctly. It does parse
arrays that are multi level correctly after the first level.
Example is the $Cust array, The whole Array is wrapped in <item> tags but
the data inside creates the correct tags.
Below is some example code of the calls I am making.
Please provide some guidance.
foreach ($PublicationID as $Pub)
{
$PubID[] = array("int" => intval($Pub));
}
foreach ($CustomFld as $Key => $Data)
{
$Cust[] = array("CustomField" => array("FieldName" => $Data,
"Value" => $CustomData[$Key]));
}
$wsdl_url = "http://api.emaildirect.com/v3/api.asmx?WSDL";
$WSDL = new SOAP_WSDL($wsdl_url);
#Connect to remote API Server
$soap = $WSDL->getProxy();
#Send SOAP Request to server
$response = $soap->Email_ForceAddition($AccountName
, $APIPassword
, $Email
, $SourceID
, $PubID
, $LstID
, $AutoRespondID
, $Cust);
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic