Welcome, guest! Login
Close

Login to Your Account


  |  » Forgot your password?
Join

CJ WebServices Errors PHP5

 
Tools Search
  #1  
Old
ABW Ambassador
Join Date: October 22nd, 2006
Posts: 942
CJ WebServices Errors PHP5

I am trying to write a simple php5 script to access to access the product search API, but I am getting the following error.

Warning: SoapClient::SoapClient(https://api.cj.com/wsdl/version2/pro...ServiceV2.wsdl) [function.SoapClient-SoapClient]: failed to open stream: Connection timed out

I have PHP5 and SOAP is enabled on my server. Anybody has worked with the API. Any help will be appreciated.

The following is my code.


$key = "My Dev Key";
$siteId = "My PID";
$wdslurl = 'https://api.cj.com/wsdl/version2/productSearchServiceV2.wsdl';
$keywords = 'NBA Playoff tickets'; // What you want to search for.

try {

$productClient = new SoapClient($wdslurl,array('trace' => 1));

$results = $productClient->search(array(
"developerKey" => $key,
"websiteId" => $siteId,
"advertiserIds" => '',
"keywords" => "$keywords",
"serviceableArea" => '',
"upc" => '',
"manufacturerName" => '',
"manufacturerSku" => '',
"advertiserSku" => '',
"lowPrice" => '',
"highPrice" => '',
"lowSalePrice" => '',
"highSalePrice" => '',
"currency" => '',
"isbn" => '',
"sortBy" => '',
"sortOrder" => '',
"startAt" => 0,
"maxResults" => 10
)
);


print_r($results->out->totalResults);

// if something goes wrong show the user a nice message
} catch (Exception $e){

echo "

There was an error with your request or the service is unavailable.

";
print_r ($e);

}

?>
  #2  
Old
ABW Ambassador
Join Date: October 22nd, 2006
Posts: 942
After spending hours on it, I finally got it to work. I wish CJ had some good documentation. But anyway it now works and I can enjoy the rest of the weekend.
  #3  
Old
Member
Join Date: June 28th, 2006
Posts: 96
Just coming to see if I could help out. I spent months of time and lots of tweaking to get their stuff working for my sales notifier. I ended up having to do my own php install at dreamhost to get all of the settings the way they needed to be plus lots of help from others. So, let me know if you need any more help and I'll be glad to do what I can!
Join ABW to remove this sponsored message.
  #4  
Old
ABW Ambassador
Join Date: October 22nd, 2006
Posts: 942
Thanks for the response. I finally got it to work. I was trying get the product search module to work. And finally it did work. Not all php web hosts are set up the same. I had to do some tweaking to get it to work on one of my webhosts.
Reply
 

Tools Search
Search:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webservices support? RacerX Commission Junction - CJ 3 October 31st, 2007 05:11 PM
Nifty Tool To Make Your Pages Validate Cheesehead Marketing Resources & Power Tools 17 June 24th, 2007 11:24 PM
CJ Webservices FAQ - ABW Support Area Ron Bechdolt Commission Junction - CJ 60 December 26th, 2006 02:50 PM
Which datafeed format results in the fewest errors: Tab, CSV, or Pipe? Kadence Commission Junction - CJ 9 April 30th, 2005 03:17 AM
Web Stats/Tracking and errors from worms happypoon Domains & Hosting 1 September 1st, 2002 09:22 AM

X

Welcome to ABestWeb.com

Create your username to jump into the discussion!

ABestWeb.com is the largest affiliate marketing community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?



Content Relevant URLs by vBSEO ©2011, Crawlability, Inc.