House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Problem with web service call after ColdFusion 8 to ColdFusion 10 upgrade

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Root
03/04/2013 08:53 PM

So I have this wonky SAP web service that I'm calling.. you can see an example of the WSDL here: http://www.it.dev.duke.edu/public/wsdl.xml http://www.it.dev.duke.edu/public/wsdl.txt I'm creating my wsdl object: <cfset argStruct = structNew()> <cfset argStruct.username = "myusername"> <cfset argStruct.password = "mypassword"> <cfset argStruct.refreshWSDL = "yes"> <cfset argStruct.saveJava = "no"> <cfset ws = createObject("webservice","#wsdlurl#", argStruct)> And then calling the web service like this: <cfset wsResult = ws.zAdvWebServOptOut('rick.root@gmail.com ','#optcode#','','')> This was working fine, but now produces the following error: Web service operation zAdvWebServOptOut with parameters {rick.root@gmail.com,UDVAE,,} cannot be found. Now, I never quite understood how this worked before, given the way the wsdl looks.  I have since tried several combinations - passing only two arguments (as I would expect), and passing the 4th argument as an int (0), to no avail, always the same ol' error (just slightly different actually, based on the arguments being passed). I'm a little stumped here. Anyone got any suggestions? Rick -- *The beatings will continue until morale improves.*

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Byron Mann
03/04/2013 11:43 PM

Think you need one parameter with email and OptOut keys. <cfset wsResult = ws.zAdvWebServOptOut({Email='rick.root@gmail.com ',OptOut=optcode} )> Byron Mann Lead Engineer & Architect HostMySite.com On Mar 4, 2013 8:53 PM, "Rick Root" <rick.root@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Root
03/05/2013 01:08 AM

Hm, nope that doesn't work - I tried it with and without the braces (and of course using "OptCode" instead of "OptOut" as that's how the field is defined in the WSDL). Web service operation zAdvWebServOptOut with parameters {rick.root@gmail.com,MYCODE} cannot be found. It produces this same error message even if I add additional arguments. Now, if I dump the web service object, this is how it defines the  method... zAdvWebServOptOut(functions.rfc.sap.document.sap_com.Char241, functions.rfc.sap.document.sap_com.Char8) If I pass two structs ... ws.zAdvWebServOptOut({whatever},{whatever}), I do get a different error, it gives me an Axis Fault like this: Cannot perform web service invocation zAdvWebServOptOut. The fault returned when invoking the web service operation is: org.apache.axis2.AxisFault: Email cannot be null!! Still stumped :( On Mon, Mar 4, 2013 at 11:43 PM, Byr ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andrew Scott
03/05/2013 01:36 AM

Not sure this is the issue, but WSDL is always cached, can you log into the CF Admin and delete that cached WSDL. Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+:  http://plus.google.com/113032480415921517411 ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Raymond Camden
03/05/2013 06:11 AM

It isn't always cached. Note this line: <cfset argStruct.refreshWSDL = "yes"> This was added in CF9 I believe. (There is also a way to do it w/ cfinvoke.) On Tue, Mar 5, 2013 at 12:35 AM, Andrew Scott <andrews@andyscott.id.au>wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andrew Scott
03/05/2013 07:06 AM

That is true Ray, I forgot all about that addition to ColdFusion 9. Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+:  http://plus.google.com/113032480415921517411 On Tue, Mar 5, 2013 at 10:10 PM, Raymond Camden <raymondcamden@gmail.com>wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Root
03/05/2013 01:18 PM

Okay I'm really struggling with this, I really need to get this ws call back up and running. I'm now trying to use <cfinvoke>  and I'm getting a slightly different error message. was: Web service operation zAdvWebServOptOut with parameters {rick.root@gmail.com,UDVAE} cannot be found. with cfinvoke - passing the same struct via argumentscollection Web service operation zAdvWebServOptOut with parameters {OPTCODE={UDVAE},EMAIL={rick.root@gmail.com}} cannot be found. I've also tried passing the arguments using <cfinvokeargument>, with the same results as using the argumentCollection. Rick

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Russ Michaels
03/05/2013 01:24 PM

Ate you calling a cf web service that you have written or an external web service? Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Mar 5, 2013 6:18 PM, "Rick Root" <rick.root@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
03/05/2013 01:43 PM

----- Excess quoted text cut - see Original Post for more ----- This is a long shot, but: https://bugbase.adobe.com/index.cfm?event=bug&id3321512 What patch level is your CF 10 server, by the way? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Root
03/05/2013 01:59 PM

Dave, that link doesn't seem to work.  Updater 8 applied this weekend, so the latestand greatest. Russ - it's an external web service - one written by our SAP peole - whom I don't have the greatest of access to.  I am the only consumer of this web service. Rick

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Root
03/05/2013 02:02 PM

Dave, I figured out what you were missing in the URL above .. probably not related. But it didmake me think - what if I switched back to Axis 1 ... I tried this and re-tested but got the same error.  Is this something I'd need to re-start Coldfusion to take effect? Rick

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
03/05/2013 02:09 PM

> But it did make me think - what if I switched back to Axis 1 ... Yeah, that was my thought - not that you necessarily needed to upgrade to the latest patch, but you might add that switch to your web service call. I don't know if a restart is required. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Root
03/05/2013 02:26 PM

DING DING DING! Adding the following to the original code did the trick. <cfset argStruct.wsVersion = "1"> To those interested, who have seen the WSDL and wondered... note that the WSDL has two input parameters and two response parameters, but I have to pass FOUR parameters, the latter two just being empty strings. The web service call doesn't actually return a result that I can read like this wsResult = myws.mymethod(arg, arg); Instead, I actually have to do this to get the result: local.wsResponse = getSoapResponse(local.ws); local.wsResponse = XMLParse(local.wsResponse); local.responseMessages = XMLSearch(local.wsResponse,"//Msgtab/item"); Pretty messed up if you ask me.  But, that's SAP for you, I guess :) Thanks all for helping me out! Rick

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Chuck Stazo
04/16/2013 02:51 PM

----- Excess quoted text cut - see Original Post for more ----- Thanks a ton!  I've been struggling with this issue since I went to CF10.  I was almost ready to throw in the towel and revert back to CF9.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Russ Michaels
03/05/2013 03:32 PM

In that case I bet it is a problem with the axis version. When you call an external web service axis creates a bunch of java stub files which handle all the ws function calls, sometimes it is unable to create them due to something in the web service it doesn't understand. Your previous version of cf would have been using axis v1, bur cf10 is axis v2, and this sap service is most likely written for v1. I believe there is a switch in cf10 to tell it to use either v1 or v2, setting it to v1 will prob solve your problem. Regards Russ Michaels www.michaels.me.uk www.cfmldeveloper.com - Free CFML hosting for developers www.cfsearch.com - CF search engine On Mar 5, 2013 6:58 PM, "Rick Root" <rick.root@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

September 30, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30         

Designer, Developer and mobile workflow conference