• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Guest
Nov 09, 2008 Nov 09, 2008

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

797

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 09, 2008 Nov 09, 2008

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 10, 2008 Nov 10, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 10, 2008 Nov 10, 2008

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 11, 2008 Nov 11, 2008

Copy link to clipboard

Copied

slykiwi wrote:
> 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.

i get 404s when i try to access http://services.iceportal.com/service?WSDL what
errors were you getting? do you need something "client" side (that is on the cf
server)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 12, 2008 Nov 12, 2008

Copy link to clipboard

Copied

Hey Paul.... Here is their response:

The generic web service of ICE is http://services.iceportal.com/service.asmx?wsdl, however for different purpose we have different methods defined which are provided with different directories in this URL.

If you click on the link http://services.iceportal.com/Service.asmx you can see the methods. I could give you the username/login off forum if need be.

Cheers,

Aaron

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 12, 2008 Nov 12, 2008

Copy link to clipboard

Copied

LATEST
this should get you started:

<cfscript>
ws=createObject("webservice"," http://services.iceportal.com/service.asmx?wsdl");
// are we connected?
writeoutput("<b>ws port</b>: #ws.getPortname().toString()#");
</cfscript>
<br><br>
<cfdump var="#ws#">

crack open the "parent class" at the bottom of the dump & you should see methods
to set user name & password, etc. --or-- i *think* once you get the service
created ok you can go into cfadmin for webservices & add the user name &
password & then just call the ws (also rename it to something less wordy):

<cfscript>
// say we renamed the ws 'icePortal'
ws=createObject("webservice","icePortal");
</cfscript>

whether this is a good idea or not depends on your environment.

post back if you get stuck.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation