From: SBS Computers on

Hi everyone,

I am trying to write a simple php page using an sdk. The SDK api contains all wsdl files which do all the work.

There's a soap.php which has all the functions and stores the output in $response.

My
php page includes soap.php and a function. The function is handled by
soap.php and it will get the date from the appropriate wdsl file and
store it in $response. It is stored in xml format using utf-16.

If
I run my php page frmo console, I get the output fine. If I run it from
a browser, the page is empty but if I "view source", the date is there..

What do I need to do in my php page to get $response actually displayed in a browser.

Thanks

Gino
From: Andre Polykanine on
Hello Gino,

Just put at the end the following:

echo $response;

That will echo it into the browser.
--
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

----- Original message -----
From: SBS Computers <sbs_computers(a)hotmail.com>
To: php-general(a)lists.php.net <php-general(a)lists.php.net>
Date: Thursday, September 2, 2010, 10:16:26 PM
Subject: [PHP] PHP, Soap, and WDSL


Hi everyone,

I am trying to write a simple php page using an sdk. The SDK api contains all wsdl files which do all the work.

There's a soap.php which has all the functions and stores the output in $response.

My
php page includes soap.php and a function. The function is handled by
soap.php and it will get the date from the appropriate wdsl file and
store it in $response. It is stored in xml format using utf-16.

If
I run my php page frmo console, I get the output fine. If I run it from
a browser, the page is empty but if I "view source", the date is there.

What do I need to do in my php page to get $response actually displayed in a browser.

Thanks

Gino

From: SBS Computers on

Thanks for the reply. Unfortunately I still get the same results.

$response is in the soaplib.php file.

It's as if the data is not getting to my php page?

The view source shows the following data:

<?xml version="1.0" encoding="utf-16"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >
..
..
..bunch of data
..
..
</response></soap:Body></soap:Envelope>





> Date: Thu, 2 Sep 2010 22:39:41 +0300
> From: andre(a)oire.org
> To: sbs_computers(a)hotmail.com
> CC: php-general(a)lists.php.net
> Subject: Re: [PHP] PHP, Soap, and WDSL
>
> Hello Gino,
>
> Just put at the end the following:
>
> echo $response;
>
> That will echo it into the browser.
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
>
> ----- Original message -----
> From: SBS Computers <sbs_computers(a)hotmail.com>
> To: php-general(a)lists.php.net <php-general(a)lists.php.net>
> Date: Thursday, September 2, 2010, 10:16:26 PM
> Subject: [PHP] PHP, Soap, and WDSL
>
>
> Hi everyone,
>
> I am trying to write a simple php page using an sdk. The SDK api contains all wsdl files which do all the work.
>
> There's a soap.php which has all the functions and stores the output in $response.
>
> My
> php page includes soap.php and a function. The function is handled by
> soap.php and it will get the data from the appropriate wdsl file and
> store it in $response. It is stored in xml format using utf-16.
>
> If
> I run my php page frmo console, I get the output fine. If I run it from
> a browser, the page is empty but if I "view source", the date is there.
>
> What do I need to do in my php page to get $response actually displayed in a browser.
>
> Thanks
>
> Gino
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
From: Jangita on
On 02/09/2010 10:51 p, SBS Computers wrote:

> It's as if the data is not getting to my php page?
>
> The view source shows the following data:
>
> <?xml version="1.0" encoding="utf-16"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> .
> .
> .bunch of data
> .
> .
> </response></soap:Body></soap:Envelope>
>
Seems like the data is getting there OK. But a browser normally will not
output normal xml and hides it (unless there is a <body /> tag or other
tags that normally display output since it is using the text/html MIME

add this line

header('Content-type: text/plain');

before the echo and see what happens. Also make sure there is no other
output (echo or any html tags) before the line above
--
Jangita | +256 76 91 8383 | Y! & MSN: jangita(a)yahoo.com
Skype: jangita | GTalk: jangita.nyagudi(a)gmail.com
From: chris h on
Alternatively you can pass the var through htmlspecialchars...

echo htmlspecialchars( $response );


and for a really simple solution you can echo it inside a textarea...

echo "<textarea> $response </textarea>";


Though you'll likely want to increase the size of the textarea! ;-)




Chris.



On Fri, Sep 3, 2010 at 3:39 AM, Jangita <jangita(a)jangita.com> wrote:

> On 02/09/2010 10:51 p, SBS Computers wrote:
>
> It's as if the data is not getting to my php page?
>>
>> The view source shows the following data:
>>
>> <?xml version="1.0" encoding="utf-16"?><soap:Envelope xmlns:soap="
>> http://schemas.xmlsoap.org/soap/envelope/">
>> .
>> .
>> .bunch of data
>> .
>> .
>> </response></soap:Body></soap:Envelope>
>>
>> Seems like the data is getting there OK. But a browser normally will not
> output normal xml and hides it (unless there is a <body /> tag or other tags
> that normally display output since it is using the text/html MIME
>
> add this line
>
> header('Content-type: text/plain');
>
> before the echo and see what happens. Also make sure there is no other
> output (echo or any html tags) before the line above
>
> --
> Jangita | +256 76 91 8383 | Y! & MSN: jangita(a)yahoo.com
> Skype: jangita | GTalk: jangita.nyagudi(a)gmail.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>