Forum Discussion

Jsyed's avatar
Jsyed
Occasional Contributor
15 years ago

SOAP Client

Hello,
I am trying to create SOAP client so that i can use Yahoo mail API. Can you please advice how can i create that using SOAP UI. Please see the attached example on yahoo API website. Please reply ASAP.

// Construct the URL encoded URL to send requests
$location = "http://mail.yahooapis.com/ws/mail/v1.1/soap?appid=
  " .              urlencode($appid) . "&WSSID=" . urlencode($wssid);
// Construct the SOAP client
$client = new SoapClient("http://mail.yahooapis.com/ws/mail/v1.1/wsdl",
array("location" => $location));
// Remove the leading "Y=" from the cookie string
$credential = split("=", $cookie);
// Set the "Y" cookie in the SOAP client
$client->__setCookie("Y", $credential[1]);

Thanks
Junaid

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    You can import the WSDL file into soapUI, which will allow you to invoke the commands available i the API from within soapUI (click here for help on this), but soapUI will not create a client for you. The code you provided shows an exampe of connecting to the Yahoo Mail API in the PHP programming language. Depending on what programming language and libraries you have access to, this will differ.

    Regards,
    Dain
    eviware support