Hi All....
I would GREATLY appreciate help on how to connect to a 3rd
parties web service please!!!! I have never before attempted this.
I have been given this information which contains example code for
other languages:
// C#
ICEPortal.ICEWebService h = new ICEPortal.ICEWebService();
ICEPortal.ICEAuthHeader myHeader = new
ICEPortal.ICEAuthHeader();
myHeader.Username = "distrib@distrib.com";
myHeader.Password = "password";
h.ICEAuthHeaderValue = myHeader;
ICEPortal.Brochure brochure = null;
string ErrorMsg = "";
int result = h.GetBrochure("MyMappedID", out ErrorMsg, out
brochure);
// VB
Dim h As New ICEPortal.ICEWebService
Dim myHeader As New ICEPortal.ICEAuthHeader
myHeader.Username = "distrib@distrib.com"
myHeader.Password = "password"
h.ICEAuthHeaderValue = myHeader
Dim brochure As ICEPortal.Brochure
Dim result as Integer
Dim ErrorMsg as String
result = h.GetBrochure("MyMappedID", ErrorMsg, brochure)
// JScript
var h:ICEPortal.ICEWebService = new
ICEPortal.ICEWebService();
var myHeader:ICEPortal.ICEAuthHeader = new
ICEPortal.ICEAuthHeader();
myHeader.Username = "distrib@distrib.com";
myHeader.Password = "password";
h.ICEAuthHeaderValue = myHeader;
var brochure:ICEPortal.Brochure;
var ErrorMsg;
var result = h.GetBrochure("MyMappedID", ErrorMsg,
brochure);
AND ALSO:
"The following is a sample SOAP 1.2 request and response. The
placeholders shown need to be replaced with actual values."
POST /Service.asmx HTTP/1.1
Host: services.iceportal.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:soap12="
http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<ICEAuthHeader xmlns="
http://services.iceportal.com/service">
<Username>string</Username>
<Password>string</Password>
</ICEAuthHeader>
</soap12:Header>
<soap12:Body>
<GetAllBrochureIDs xmlns="
http://services.iceportal.com/service"
/>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:soap12="
http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetAllBrochureIDsResponse xmlns="
http://services.iceportal.com/service">
<GetAllBrochureIDsResult>int</GetAllBrochureIDsResult>
<ErrorMessage>string</ErrorMessage>
<IDs>
<string>string</string>
<string>string</string>
</IDs>
</GetAllBrochureIDsResponse>
</soap12:Body>
</soap12:Envelope>
As a start I would like to call a method "GetAllBrochureIDs",
and thought it might have been something like this:
<cfinvoke webservice="
http://services.iceportal.com/service?WSDL"
method="GetAllBrochureIDs" returnvariable="idList">
<cfinvokeargument name="username" value="myUsername">
<cfinvokeargument name="password" value="myPassword">
</cfinvoke>
<cfoutput>#idList#</cfoutput>
But clearly I am lost! Can anyone give me hand here please?
Cheers,
Aaron