php - How to learn SOAP? -


i've created web application mapping component. want use geocoding service other google, ones i've found use soap communicate website. i've never used soap before. know of resources me figure out? i"m using php integrate build web app.

edit: need use soap geocoding right now... if know services too, that'd great. thanks!

edit again: need learn soap can interact http://www.nn4d.com/site/global/build/web_services/geocoding_reversegeocoding/map24geocoder51service/map24geocoder51service.jsp

learning soap on own requires learn xml , lots of soap-specific stuff.

however, you've tagged question php, assume you're asking learn how use soap web service through php. different learning soap because php (like other languages) abstracts messy xml bits of soap , turns easy-to-use object.

that's theory, anyway.

there 2 soap toolkits in common use on php. 1 called nusoap. works well, no longer in active development (it written before php provided own built-in soap class). if want use nusoap, here official project web site: http://nusoap.sourceforge.net/

if you're using php5.2 or 5.3 (which should be, since they're supported versions), you'll have built-in soap class. if want use official php soap class, here's manual page: http://php.net/manual/en/book.soap.php

once you've picked soap class want use, need know bit soap web services in general, , specific service want use.

firstly, you'll need know if service provides wsdl. wsdl xml document defines methods , parameters available on soap service. allows soap class define class soap service, makes life easier programmer. in practice in php doesn't make differench though.

i recommend download soap ui, debugging tool soap services. allows see , modify exact xml code being sent , received. it'll learn , understand how soap works, , debugging if php code doesn't work expected.

[edit] important thing know api you're working with.

if service you're dealing has wsdl, php automatically generate appropriate methods when create object. example:

$client = new soapclient("http://somedomain/stockquote.wsdl"); print($client->getstockquote("msft")); 

it simple that. granted, simple example; soap services (certainly ones i've used!) take lot more parameters that, , take them in form of giant nested array structure.

if service doesn't have wsdl, you'll have call methods using different method:

$client = new soapclient(null, array('location' => "http://somedomain/stockquote.asp")); print($client->__soapcall('getstockquote',"msft")); 

hope helps understand bit better.

i still recommend having go soap ui, understand soap in general lot better. should read php soap class manual pages: http://php.net/manual/en/book.soap.php - documentation thorough, though these things can daunting approach @ first reference, not tutorial.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -