Jump to content

Connecting to Soap Web Service


ARTIS

Recommended Posts

Hi!

 

I need to retrieve data from a WCF Web Service and don't seem to be connecting when the "new SoapClient" is called.  I am using php version 5.2.  The service requires 2 Parmameters, an account ID and a comma separated email list.  Can someone please tell me what I am doing wrong?

 

Thanks!

 

<?php
header('Content-Type: text/xml'); 

$client = new SoapClient('http://www.zbestlistings.com/WCF/Primedia.svc?wsdl');
$response = $client->GetPropertyXML(array( "AccountID" => "12807175152", "eMailList" => "Sheryl@Rentingslc.com, Tenants@Rpmwestvalley.com, 

Tom@Rpmsouthernutah.com" )); 
echo   $response;

?>

Link to comment
Share on other sites

The response from the client is an object, you need to fetch the correct key of the object (the only key might I add)

 

The following displays what you need:

<?php
header('Content-Type: text/xml'); 

$client = new SoapClient('http://www.zbestlistings.com/WCF/Primedia.svc?wsdl');
$response = $client->GetPropertyXML(array( "AccountID" => "12807175152", "eMailList" => "Sheryl@Rentingslc.com, Tenants@Rpmwestvalley.com, Tom@Rpmsouthernutah.com" )); 

echo $response->GetPropertyXMLResult;

?>

 

Regards, PaulRyan.

Link to comment
Share on other sites

I just get a blank screen.  I added echo tags to pinpoint were the failure is occuring like so:

 

echo " 1  "

$client = new SoapClient('http://www.zbestlistings.com/WCF/Primedia.svc?wsdl');

echo " 2 "

$response = $client->GetPropertyXML(array( "AccountID" => "12807175152", "eMailList" => "Sheryl@Rentingslc.com, Tenants@Rpmwestvalley.com, Tom@Rpmsouthernutah.com" ));

echo " 3  "

 

 

It never makes it to 2.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.