Re: Is there a way to test, what's the output of PHP SOAP request?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, it seems, that I was looking for simple __getLastRequest() function.

However, I have nested array:

$form =  array('some' => array(
				'Info' => array('Product' => 1,
		   					'Insurance' => 0,
		   					'MaritalStatus' => 'married',
		   					'Salary' => 300000
							),
				'Borrower' => array('Number' => '1231231234',
		   					'Firstname' => 'xxxx',
		   					'LastName' => 'xxxxxxxx',
		   					'Email' => 'xx@xx.com'
				),							
				'Personal' => array('bor' => '281051006U',
		   					'Borrower' => 'yyyyy',
		   					'Salaryr' => 300000
				),
				'Living' => array('Fee' => 250,
		   					'Rent' => 0.00
				)
				)
				);

I need to send

<some>
<Info>
<Product>1</Product>
<Insurance>0</Insurance>
<MaritalStatus>married</MaritalStatus>
<Salary>3000</Salary>
</Info>
<Borrower>
<Number>2312132</Number>
<Firstname>xxxxx</Firstname>
</Borrower>
etc.
</some>

But my arrays are printed out as

<ns1:some>
<item><key>Info</key><value>
<item><key>Product</key><value>1</value></item>
<item><key>Insurance</key><value>0</value></item>
<item><key>MaritalStatus</key><value>married</value></item> etc.

Apparently there's a catch, how to use arrays with SOAP? How to get rid of
the extra tags?

Maria



RQuadling wrote:
> 
> On 3 February 2011 15:14, Mariaxx <sannamari28@gmail.com> wrote:
>>
>> Fatal error: Class 'Tidy' not found in
>> /home/admin/public_html/uusi/testi.php
>> on line 142
>>
>> Am I missing out some files? I have two files: WAPI.php and the other
>> with
>> my credentials.
>>
>>
>> RQuadling wrote:
>>>
>>> On 2 February 2011 14:01, Mariaxx <sannamari28@gmail.com> wrote:
>>>>
>>>> Is there a way to figure out the form of data I'm sending in an SOAP
>>>> XML
>>>> request.
>>>> I need to be sure, that when I'm calling the service, that my arrays
>>>> are
>>>> "printed out" correctly and doesn't contain any extra (nested)
>>>> parameters.
>>>>
>>>> Maria
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Is-there-a-way-to-test%2C-what%27s-the-output-of-PHP-SOAP-request--tp30826222p30826222.html
>>>> Sent from the Php - Soap mailing list archive at Nabble.com.
>>>>
>>>>
>>>> --
>>>> PHP Soap Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>>
>>> Take a look at the code here [1]. I created this to help a previous
>>> question on this list [2].
>>>
>>> Whilst I only show the trace (headers sent/received for
>>> request/response) during an exception, you can just cut'n'paste that
>>> code to the main body.
>>>
>>> If you've got any concrete examples of the work you are trying to do,
>>> then maybe I can help you some more.
>>>
>>> Regards,
>>>
>>> Richard.
>>>
>>> [1] http://pastebin.com/f8CBcLHc
>>> [2] http://news.php.net/php.soap/3245
>>>
>>> --
>>> Richard Quadling
>>> Twitter : EE : Zend
>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>
>>> --
>>> PHP Soap Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Is-there-a-way-to-test%2C-what%27s-the-output-of-PHP-SOAP-request--tp30826222p30836410.html
>> Sent from the Php - Soap mailing list archive at Nabble.com.
>>
>>
>> --
>> PHP Soap Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
> http://uk3.php.net/manual/en/book.tidy.php
> 
> If you cannot enable Tidy, then you'll have to adjust the code. All it
> is used for it pretty printing of the XML request/response. It isn't
> used for any data processing purposes.
> 
> -- 
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
> 
> -- 
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Is-there-a-way-to-test%2C-what%27s-the-output-of-PHP-SOAP-request--tp30826222p30842458.html
Sent from the Php - Soap mailing list archive at Nabble.com.


-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux