Skip to main content
November 10, 2008
Question

Web Services - PLEASE HELP.... EXPERT REQUIRED!!!!!!!

  • November 10, 2008
  • 2 replies
  • 897 views
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
This topic has been closed for replies.

2 replies

Inspiring
November 11, 2008
slykiwi wrote:
> 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:

what's the correct url to the WSDL (what you show n your cfinvoke snippet isn't
correct)? do they have any java examples?
November 12, 2008
Hi Paul...thanks for your reply. I have gone back and asked them what the correct url to the WSDL is. I assumed that all the info was in the attached sample code that they supplied. Will post when I hear back from them.

Thanks again!
Participant
November 10, 2008
Try to print your cfinvokeargument parameters

<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>


Akbarsait
http://www.akbarsait.com
November 10, 2008
Hey Akbarsait....thanks for reading my post. How will printing the username/password to screen help please? I did try it but as the username is an email address it comes up "Invalid token '@' found on line 12 at column 48."

I am still very lost here.