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

Consuming WSDL

Guest
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

I need to jump into making requests of a WSDL feed - yesterday. Specifically I am trying to help a client using Netsuite to access their inventory at https://webservices.netsuite.com/wsdl/v2_5_0/netsuite.wsdl

I am clueless and it is taking me way too long to find the plethora of info on web services.

So I am looking around for a specific course/ tut / ONLINE anything that will help me fast track to some WSDL consumption. Paid is ok - I don't always expect free training:) If anyone has worked with Netsuite before I would be eternally grateful for any advice you could offer on this front.

Thanks so much for anything you can do to point me in the right direction.
Chris
TOPICS
Advanced techniques

Views

921

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 ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

Use the cfinvoke tag. Details are in the cfml reference manual. If you don't have one, the internet does.

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
Advisor ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

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
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

Oddly enough I think my trouble is not with how at this point. I think I understand how - but I can not interpret my responses well enough. It would seem that when I call the service - it does in fact call the correct service - b/c I can dump the object and get a list of all the methods available(including the one I want to use) However I am consistantly getting a miserable error that makes no sense to me....

Web service operation "login" with parameters {{PASSWORD={xxx},EMAIL={xxx},ACCOUNT={xxx},ROLE={31},}} could not be found.

I mean it looks simple enough - the method "login" is not available. However if I dump the object you can see that login is in fact an accepted method....

object of com.netsuite.webservices.platform_2_5.NetSuiteBindingStub
Methods
add (returns com.netsuite.webservices.platform.messages_2_5.WriteResponse)
get (returns com.netsuite.webservices.platform.messages_2_5.ReadResponse)
.
.
login (returns com.netsuite.webservices.platform.messages_2_5.SessionResponse)
.
.etc

So I gues I really need to know how do I interpret this? The message says no method called login - but the object says "Hey I have the method login - go ahead try it."

I'm pulling what little hair I have left - out at the roots

Thanks again all - and great link Bob - I did not see that one on the cfdocs - dunno how I missed it.

Chris

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
Advisor ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

Post both your code and the WSDL.

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
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

I am hoping this load correctly for you - it is currently taking forever to run on my server the first time.

http://www.echowebs.com/wsdl.cfm

here is the code - minus the vitals....

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 ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

quote:

Originally posted by: echowebs
Oddly enough I think my trouble is not with how at this point. I think I understand how - but I can not interpret my responses well enough. It would seem that when I call the service - it does in fact call the correct service - b/c I can dump the object and get a list of all the methods available(including the one I want to use) However I am consistantly getting a miserable error that makes no sense to me....

Web service operation "login" with parameters {{PASSWORD={xxx},EMAIL={xxx},ACCOUNT={xxx},ROLE={31},}} could not be found.
Chris

When I get that error it's because the function had an argument that I didn't provide. This happens even when the argument is declared optional in the webservice code.

It also appears that your cfinvoke tag does not have the same syntax that I remember from the manual.

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
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

Little did I realize that posting that file put the user info out there for the world to see. I had to remove the user info - but the error message is exactly as you will see it - except the user info is invalid. know that this is not the trouble b/c you see the exact same error as I do with the correct user info

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
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

I am not using the cfinvoke that section is commented out. I am using the cfscript vars. I will look into the extra args thought that could very well be.

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 ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

When you create a structure for your arguments, you need to use the argumentcollection keyword.

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
Advisor ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

LATEST
Disclaimer: I am not the world's greatest SOAP expert so I might not be on the right track, but here's my thoughts.

It looks like the service expects some data to be passed in the SOAP headers.

(from wsdl)
<message name="headers">
<part name="applicationInfo" element="platformMsgs:applicationInfo"/>
<part name="partnerInfo" element="platformMsgs:partnerInfo"/>
<part name="documentInfo" element="platformMsgs:documentInfo"/>
<part name="sessionInfo" element="platformMsgs:sessionInfo"/>
<part name="preferences" element="platformMsgs:preferences"/>
<part name="searchPreferences" element="platformMsgs:searchPreferences"/>
</message>

See objects defined in https://webservices.netsuite.com/xsd/platform/v2_5_0/messages.xsd

I have not used this feature in CF, but take a look at the AddSOAPRequestHeader function to provide info within the headers.



References:

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Part_4_CF_DevGuide_1.html

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_a-b_03.html#5050827

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