PHP SOAP Gerrit


/ Published in: PHP
Save to your folder(s)

Misc operations


Copy this code and paste it in your HTML
  1. //GetContent (for external ID)
  2.  
  3. $contentClient = new SoapClient("http://cs2.acme.com/ContentService.svc?wsdl",
  4. array('location' => "http://cs2.acme.com/ContentService.svc/basic"));
  5. $contentParams = array("ExternalID" => 'abc123', "ServiceID" => 123, "SessionContext" => $sessionContext);
  6. $contentResponse = $contentClient->GetContent(array('parameters'=>$contentParams));
  7. $content = $contentResponse->GetContentResult;
  8.  
  9.  
  10. //Register Subscriber
  11.  
  12. $subscriberClient = new SoapClient("http://cs2.acme.com/SubscriberService.svc?wsdl",
  13. array('location' => "http://cs2.acme.com/SubscriberService.svc/basic"));
  14. $subscriberVO = array ("UserName" => 'patriksuser', "Password" => 'abc123', "Email" => '[email protected]');
  15. $subscriberParams = array("NewSubscriber" => $subscriberVO, "SessionContext" => $sessionContext);
  16. $subscriberResponse = $subscriberClient->RegisterSubscriber(array('parameters'=>$subscriberParams));
  17. $newsubscriber = $subscriberResponse->RegisterSubscriberResult;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.