denis
denis

Reputation: 351

Connecting to API with SOAP

I am working with PHP and I am new to SOAP and having issues understanding the basic. I have this document that explains of what I need

http://dl.dropbox.com/u/508603/api/API%20Web%20Service3.docx

I have a web form where the user enters zip code and chooses a category of service.

Then, after this form is filled out, it would need to connect to the API by sending a request through SOAP, WSDL or REST Posting call.

In the document, please go to Page#3. You will see all the URL the API can be reached on. You can choose any of these approaches.

On page#4 I would need to ping their API to see if their is a service in a given Zip Code. The "categoryID" can be found on page#10 - page#14.

On page#4 we will be testing if the user has coverage of their service or not based on the zip code entered. The zip code and the categoryid will be entered in a web form.

Then, on page#5, we have all the fieldnames that needs to be named.

On page#6 we have a POST EXAMPLE

You will also see the type of responses the api returns as well.

I would appreciate if anyone can provide me a way to make this work....

thank you

Upvotes: 1

Views: 2671

Answers (1)

St. John Johnson
St. John Johnson

Reputation: 6660

I'm afraid I can't open your docx file. But let me try to be general.

Have they provided a WSDL file? That would be VERY helpful in defining the context/methods available when using their API.

PHP has a variety of SOAP classes. The one you will want is SoapClient.

$client = new SoapClient($wsdlurl, $optionsArray);
$client->api_method_name($params);

Pretty straight forward. If you provide more examples from this doc file, I can try to help out more.

Upvotes: 4

Related Questions