Re: [PHP] Fun with SOAP.

2008-05-01 Thread Eric Butera
On Wed, Apr 30, 2008 at 3:53 PM, Larry Brown
<[EMAIL PROTECTED]> wrote:
> I'm not sure how it looks etc with with soapui but I noticed you
>  mentioning you don't want to mess with nusoap.  I've used nusoap for
>  both client and server uses for years and I'm really impressed with how
>  easily it works.  Using $soapInstance->request and
>  $soapInstance->response the xml is displayed where you can see how it
>  was created based on the array you fed the instance before sending for
>  your message.  It makes troubleshooting much easier for me.
>
>  That being said I don't send attachments.  However just doing a quick
>  google on "nusoap attachments" (without the quotes) has mention of
>  people sending MIME attachments and one listing an issue with DIME
>  encoded attachments yet another explaining that he solved the DIME
>  encoded issue and referred to "wrox book open source webservices page
>  315" which is an on-line book.
>
>  Sorry no quick silver bullet, but I would highly recommend looking at
>  nusoap if only as a test.

Hi Larry,

I am receiving a multipart mime attachment from Amazon.  The idea is
we request a report and get a response.  This response differs from
any other response I have seen in that it is multipart.  I searched
all over the place for a way to get it to work correctly.  The soapUI
program is the only one so far that has been able to show me that I
get a proper return value that can be parsed.  soapUI shows me the
envelope XML and then has a button on the bottom that says there is an
attachment that I can save to a file.  So from this I know that it is
possible to handle this type of request "correctly."  I just haven't
been able to find any real examples on how to use it.

I wanted to keep everything using ext/soap since it is c code and very
fast.  Plus there are other parts of this program already utilizing
it.

So far I have my backup plan working using curl, a regex, and simplexml.  ;)

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



Re: [PHP] Fun with SOAP.

2008-04-30 Thread Nathan Nobbe
On Wed, Apr 30, 2008 at 1:53 PM, Larry Brown <
[EMAIL PROTECTED]> wrote:

> Sorry no quick silver bullet, but I would highly recommend looking at
> nusoap if only as a test.
>

additionally, i could not find any occurrence of 'attachment' grepping
through the c code in the soap extension or the rpc extension..

-nathan


Re: [PHP] Fun with SOAP.

2008-04-30 Thread Larry Brown
I'm not sure how it looks etc with with soapui but I noticed you
mentioning you don't want to mess with nusoap.  I've used nusoap for
both client and server uses for years and I'm really impressed with how
easily it works.  Using $soapInstance->request and
$soapInstance->response the xml is displayed where you can see how it
was created based on the array you fed the instance before sending for
your message.  It makes troubleshooting much easier for me.

That being said I don't send attachments.  However just doing a quick
google on "nusoap attachments" (without the quotes) has mention of
people sending MIME attachments and one listing an issue with DIME
encoded attachments yet another explaining that he solved the DIME
encoded issue and referred to "wrox book open source webservices page
315" which is an on-line book.

Sorry no quick silver bullet, but I would highly recommend looking at
nusoap if only as a test.

Larry

On Wed, 2008-04-30 at 08:21 -0400, Eric Butera wrote:
> On Wed, Apr 30, 2008 at 7:35 AM, Eric Butera <[EMAIL PROTECTED]> wrote:
> > On Tue, Apr 29, 2008 at 5:07 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> >  > i know this has nothing to do w/ getting it to work w/ php, eric, but 
> > have
> >  > you tried hitting the service w/ soap ui?
> >  > http://www.soapui.org/
> >  >
> >  > although its written in java, its an indispensable testing tool, imho, 
> > and i
> >  > always give it a shot when im having soap troubles.  i might try to see 
> > if
> >  > you can get a successful response from the service w/ it.
> >  >
> >  > -nathan
> >
> >  Hi Nathan!
> >
> >  Thanks for the reply.  I'm download it as we speak.  Hopefully it'll
> >  give me some sort of answer as to what is going on.  I really haven't
> >  found out enough about the SOAP "standard" enough to know what is
> >  expected behavior, etc.  I know I can see all of the raw data there,
> >  just ext/soap doesn't seem to like the multi-part.  Maybe soapUI will
> >  give me some sort of answer for this.
> >
> 
> After using soapUI I've determined that the SOAP response gives back
> an envelope and has one attachment.  Does anyone know if the SOAP
> extension can handle attachments?  I'd really rather not mess around
> with nusoap or the pear soap package.  I don't see anywhere on the
> manual where it is possible to download attachments.  Hopefully
> someone else has dealt with this before.
> 
-- 
Larry Brown <[EMAIL PROTECTED]>


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



Re: [PHP] Fun with SOAP.

2008-04-30 Thread Eric Butera
On Wed, Apr 30, 2008 at 7:35 AM, Eric Butera <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 29, 2008 at 5:07 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
>  > i know this has nothing to do w/ getting it to work w/ php, eric, but have
>  > you tried hitting the service w/ soap ui?
>  > http://www.soapui.org/
>  >
>  > although its written in java, its an indispensable testing tool, imho, and 
> i
>  > always give it a shot when im having soap troubles.  i might try to see if
>  > you can get a successful response from the service w/ it.
>  >
>  > -nathan
>
>  Hi Nathan!
>
>  Thanks for the reply.  I'm download it as we speak.  Hopefully it'll
>  give me some sort of answer as to what is going on.  I really haven't
>  found out enough about the SOAP "standard" enough to know what is
>  expected behavior, etc.  I know I can see all of the raw data there,
>  just ext/soap doesn't seem to like the multi-part.  Maybe soapUI will
>  give me some sort of answer for this.
>

After using soapUI I've determined that the SOAP response gives back
an envelope and has one attachment.  Does anyone know if the SOAP
extension can handle attachments?  I'd really rather not mess around
with nusoap or the pear soap package.  I don't see anywhere on the
manual where it is possible to download attachments.  Hopefully
someone else has dealt with this before.

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



Re: [PHP] Fun with SOAP.

2008-04-30 Thread Eric Butera
On Wed, Apr 30, 2008 at 2:53 AM, Warren Vail <[EMAIL PROTECTED]> wrote:
> You should be able to parse it manually in PHP, but probably not with a XML
>  parser or reader.  Simply var_dump() the responses you are getting and write
>  the code to break it up into values you can use.  In some respects I've
>  found this easier than XML, which tends at times to be somebody else's idea
>  of a standard XML response ;-).
>
>  Warren

I hear that!  I had a thought of creating a subclass for the SOAP
client to pre-filter the results for document fetching so that I can
just grab the last multipart chunk myself & use SimpleXML on it.  I
was just hoping there was some way of getting ext/soap to understand
that it is a multipart response and somehow tell it to use part 3.

Thank you for your reply!

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



Re: [PHP] Fun with SOAP.

2008-04-30 Thread Eric Butera
On Tue, Apr 29, 2008 at 5:07 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> i know this has nothing to do w/ getting it to work w/ php, eric, but have
> you tried hitting the service w/ soap ui?
> http://www.soapui.org/
>
> although its written in java, its an indispensable testing tool, imho, and i
> always give it a shot when im having soap troubles.  i might try to see if
> you can get a successful response from the service w/ it.
>
> -nathan

Hi Nathan!

Thanks for the reply.  I'm download it as we speak.  Hopefully it'll
give me some sort of answer as to what is going on.  I really haven't
found out enough about the SOAP "standard" enough to know what is
expected behavior, etc.  I know I can see all of the raw data there,
just ext/soap doesn't seem to like the multi-part.  Maybe soapUI will
give me some sort of answer for this.

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



RE: [PHP] Fun with SOAP.

2008-04-29 Thread Warren Vail
You should be able to parse it manually in PHP, but probably not with a XML
parser or reader.  Simply var_dump() the responses you are getting and write
the code to break it up into values you can use.  In some respects I've
found this easier than XML, which tends at times to be somebody else's idea
of a standard XML response ;-).

Warren 

> -Original Message-
> From: Nathan Nobbe [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, April 29, 2008 2:07 PM
> To: Eric Butera
> Cc: php php
> Subject: Re: [PHP] Fun with SOAP.
> 
> On Tue, Apr 29, 2008 at 2:15 PM, Eric Butera 
> <[EMAIL PROTECTED]> wrote:
> 
> > A fellow co-worker of mine is working on a project integrating with 
> > Amazon using SOAP.  I've never used SOAP before but it seemed like 
> > things were straight forward at first.  Some parts work 
> while others 
> > done.  Right now we are stuck trying to fetch a document from the 
> > remote server.
> >
> > We are able to connect and get a list of documents as 
> expected.  The 
> > PHP 5 SOAP extension handles this like a champ.  When a single 
> > document is requested an exception is thrown with the error message 
> > "looks like we got no XML document."  The document listing request 
> > returns a simple single text/xml SOAP XML response.  The 
> request for a 
> > single document returns a multi-part (multipart/related) response.
> >
> > Can the PHP 5 soap client even parse such things?  I looked at the 
> > manual pages and did Google searching, but I'm not even 
> sure what to 
> > word my queries as.  It seems like somehow this should just work as 
> > the script just defines a client and then does the call.  
> So any help 
> > or links to something that explains how this multipart 
> response can be 
> > handled will be greatly appreciated.  See below for the script & 
> > responses.
> 
> 
> i know this has nothing to do w/ getting it to work w/ php, 
> eric, but have you tried hitting the service w/ soap ui?
> http://www.soapui.org/
> 
> although its written in java, its an indispensable testing 
> tool, imho, and i always give it a shot when im having soap 
> troubles.  i might try to see if you can get a successful 
> response from the service w/ it.
> 
> -nathan
> 


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



Re: [PHP] Fun with SOAP.

2008-04-29 Thread Nathan Nobbe
On Tue, Apr 29, 2008 at 2:15 PM, Eric Butera <[EMAIL PROTECTED]> wrote:

> A fellow co-worker of mine is working on a project integrating with
> Amazon using SOAP.  I've never used SOAP before but it seemed like
> things were straight forward at first.  Some parts work while others
> done.  Right now we are stuck trying to fetch a document from the
> remote server.
>
> We are able to connect and get a list of documents as expected.  The
> PHP 5 SOAP extension handles this like a champ.  When a single
> document is requested an exception is thrown with the error message
> "looks like we got no XML document."  The document listing request
> returns a simple single text/xml SOAP XML response.  The request for a
> single document returns a multi-part (multipart/related) response.
>
> Can the PHP 5 soap client even parse such things?  I looked at the
> manual pages and did Google searching, but I'm not even sure what to
> word my queries as.  It seems like somehow this should just work as
> the script just defines a client and then does the call.  So any help
> or links to something that explains how this multipart response can be
> handled will be greatly appreciated.  See below for the script &
> responses.


i know this has nothing to do w/ getting it to work w/ php, eric, but have
you tried hitting the service w/ soap ui?
http://www.soapui.org/

although its written in java, its an indispensable testing tool, imho, and i
always give it a shot when im having soap troubles.  i might try to see if
you can get a successful response from the service w/ it.

-nathan