Re: Need help figuring out what I'm doing wrong accessing this Web Service

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

 



On 10 January 2011 01:22, newcoder <tillman.stevens@rockingr.net> wrote:
>
>
>
> RQuadling wrote:
>>
>>
>> If you've got the cookie, then you need to split it into name/value ...
>>
>> list($name, $value) = explode('=', $cookie, 2);
>>
>> should do that just fine.
>>
>> So, with that, you can now do ...
>>
>> $service = new ServiceXYZ();
>> $service->__setCookie($name, $value);
>>
>> And that is a LOT easier than using a stream context. Next time, I'll
>> RTFM.
>> --
>> 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
>>
>
> and that worked great! I did this:
>
> Â Â Â Â Â Â Â Â// explose the cookie
> Â Â Â Â Â Â Â Âlist($s_CookieName, $s_CookieValue) = explode('=', $s_Cookie, 2);
>
> Â Â Â Â Â Â Â Â// try setting the cookie using the soapClient method __setCookie
>
> Â Â Â Â Â Â Â Â$agDataService->__setCookie($s_CookieName, $s_CookieValue);
> Â Â Â Â Â Â Â Â//$agDataService->__setCookie('https', $s_Cookie);
>
> Â Â Â Â Â Â Â Â// try a simple request - getCMSTables()
> Â Â Â Â Â Â Â Â$agTables = $agDataService->getCMSTables();
>
> Â Â Â Â Â Â Â Âecho '<p style="color:blue"> print_r($agTables): </p><p> ';
> Â Â Â Â Â Â Â Âprint_r($agTables);
> Â Â Â Â Â Â Â Âecho '</p>';
>
> and it returned:
>
> print_r($agTables):
>
> stdClass Object ( [getCMSTablesResult] => stdClass Object ( [any] =>
> accounts
> appointment
> employee
> invoice_line_item
> ) )
>
> so, I know we're now successfully authenticating, however, when I do the
> next request:
>
> Â Â Â Â Â Â Â Â$agColumns = $agDataService->getCMSTableColumns('employee');
>
> Â Â Â Â Â Â Â Âecho '<p style="color:blue"> print_r($agColumns): </p><p> ';
> Â Â Â Â Â Â Â Âprint_r($agColumns);
> Â Â Â Â Â Â Â Âecho '</p>';
>
> the following is returned:
>
> print_r($agColumns):
>
> stdClass Object ( [getCMSTableColumnsResult] => stdClass Object ( [any] => )
> )
>
> and the documentation of the getCMSTableColumns is:
>
> getCMSTableColumns
> This is a generic method used to get the column names for a specified table
>
> 1) The method takes an operation type that specifies which table to retreive
> data from.
> Input Name      Description
> Table           This is the table which you want the column names
> for.
>
>
> Any idea what I might be doing wrong now?

Not without having some working code.

As you can see we are getting there. Unfortunately, I've got 3 people
all asking for SOAP help at the same time. I seem to be the only here,
so my time _is_ limited.

Can I ask you to send me your code that you have so far so I can
review it (if you want to that is).

One of the things about outputting to a browser is that XML tags won't
show. So, ( [any] => ) is completely meaningless.

As SOAP is essentially machine to machine, adding a browser in the way
to handle the debugging means you are going to have to tell the
browser to shut-up. That can be as simple as issuing a <pre> before
any all output and using htmlentities() to encode any output,
especially necessary for xml output.

Add to that, using Tidy(), you can get some nicely formatted output in
a browser.

Or use the command line (Windows example below).

C:\PHP5\php.exe -f script.php




-- 
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




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

  Powered by Linux