John
On Thursday, November 7, 2002, at 08:41 PM, Scott Cadillac wrote:
Hi John,
It's possible. I've implemented a few SOAP services. How about a mini-mini
crash course in SOAP?
This is your starting point:
http://soap.amazon.com/schemas/AmazonWebServices.wsdl (Can be called with
<@URL>)
The WSDL file dictates the available operations (requests) you can make to
Amazon. Look at the <operation /> elements near the bottom of the XML.
Then using a tool like XMLSPY (www.xmlspy.com), you can decipher what your
XML payload should look like (based on the WSDL schema) and build that into
a <@URL> request. You dump your XML request into the POSTARGS= attribute of
<@URL> (Witango 4 SP1 or v5 required) and set your LOCATION= value from the
following node at the very bottom of the WSDL file.
<soap:address location="http://soap.amazon.com/onca/soap" />
Then you just parse the XML returned from <@URL> (returned from Amazon).
Like I said, XMLSPY (which does come with a free 30 day trial) is useful to
help you understand the WSDL file. Its as simple as the following
screen-shots:
1.) - SOAP_request_from_XMLSPY.GIF
2.) - Enter_WSDL_URL.GIF
3.) - Select_operation.GIF
4.) - See_XML_Request_payload.GIF
I'm not trying to convert you to XMLSPY from Witango - just showing you a
handy way to cut some corners in the learning curve. Once you understand
what your XML request should look like, then it's still up to you to build
the Witango DOM (XML) code to do both the Request (via <@URL>) and the
parsing of the Amazon Response XML.
Of course, you may want to build a boat-load of code for things like
caching the WSDL and Fault handling. Plus you need a Witango/HTML interface
(or CRONTAB) to handle the actual requesting.
Getting past the WSDL layer is the hardest part of SOAP. Systems like
ASP.NET has the WSDL deciphering/parsing baked right in and a .NET
developer doesn't have to get his hands dirty. At some point I hope Witango
can do the same - but in the mean time, I like the fact that we have to
learn how all the nuts and bolts are put together. I think it makes us
better developers :-)
Once you got the WSDL part figured out - then <@URL> does a lot of work for
you. You can download my XML-RPC code if you need some hints on posting XML
over HTTP (<@URL>).
http://xml-extra.net/webpage.xmlx?node=52
XML-RPC uses (almost) the exact same method as SOAP for posting XML over
HTTP - the XML payloads are just a different shape (this is where XMLSPY
helps).
And of course, you need to know XML and Witango DOM and XPointer. Hopefully
this can help:
http://xml-extra.net/webpage.xmlx?node=68 (XML Primer).
http://xml-extra.net/webpage.xmlx?node=72 (Witango XPointer).
On a side note - integrating an application with Amazon's Web Services is
cool. But what really gets me humming is integrating Google's Search engine
into a Witango application via SOAP.
http://api.google.com/GoogleSearch.wsdl
http://www.google.com/apis/api_faq.html
Good luck and have FUN :-).....
----- Original Message -----
From: "John Newsom" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 07, 2002 8:01 PM
Subject: Witango-Talk: Amazon Web Services
Has anyone use the AWS api's with witango? I know Scott has done alot<See_XML_Request_payload.GIF><Select_operation.GIF><Enter_WSDL_URL.GIF> <SOAP_request_from_XMLSPY.GIF>
of research with witango and web services.
Just wondering.
John Newsom
______________________________________________________________________ __
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body
