I get the following error when trying to run a function on a remote
service.
Cannot perform web service invocation send.
The fault returned when invoking the web service operation is:
'' java.lang.IllegalArgumentException: argument type mismatch
If I call the URI directly - then I see the raw XML fine and dandy.
Using :
http://localhost/loginService/loginServiceSampleApp/authUser/AppLoginService.cfc?wsdl
Returns :
This XML file does not appear to have any style information associated
with it. The document tree is shown below.
-
<wsdl:definitions targetNamespace="http://
authUser.loginServiceSampleApp.loginService">
<!--WSDL created by ColdFusion version 9,0,0,251028-->
-
<wsdl:types>
-
<schema targetNamespace="http://xml.apache.org/xml-soap">
<import namespace="http://authUser.loginServiceSampleApp.loginService"/
>
<import namespace="http://rpc.xml.coldfusion"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
<complexType name="mapItem"> ......etc......
So I am assuming that the CFC invocation is all fine and dandy;
Here's my code that I am using that causes the error;
<cfset remoteLoginService = createObject("component","/loginService/
loginServiceSampleApp/authUser/AppLoginService").init("http://
localhost/loginService/loginServiceSampleApp/authUser/
AppLoginService.cfc?wsdl")>
Does the password match?<br />
Is the user authenticated?<br />
<cfoutput>
#remoteLoginService.fn_check_user_in_ldap(user = 'test_user', password
= 'test_password')#<br />
</cfoutput>
I do see the text; "Does the Password..."
So it would seem that I have an issue passing parameters to the
function in the manner that I currently am...
If anyone can see anything obivous - I would be most grateful...
Gavin
And it would seem there might be some other issue other than code
going on here, because I get the exact same error when trying to run
the sample application.
I turned on debug output and when the error is thrown I get the
following message;
Cannot perform web service invocation send.
The fault returned when invoking the web service operation is:
'' java.lang.IllegalArgumentException: argument type mismatch
In the separate debug output window I get a different message though.
/Library/WebServer/Documents/rocketboots/galaxy/trunk/com/rocketboots/
galaxy/Service.cfc(416) @ 09:10:05.780
type Application
message Cannot perform web service invocation send.
I don't know if the messags mean the same and they're ust represented
differently or what the story is...
Can I bother someone to download the download Galaxy and try out the
sample app?
I'm on CF9 - so I'd be interested to see if it is a CF version
specific issue or not.
You can obtain the required code (via SVN) from;
http://svn.rocketboots.com/os/galaxy/
Thanks.
--
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfau...@googlegroups.com.
To unsubscribe from this group, send email to cfaussie+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
I had a quick look in the Galaxy code - but I have never ever done any
remote service work so it was all a little foreign to me.
Thanks again.
Gavin.
On Apr 15, 9:28 am, "Phil Haeusler" <p...@gtnet.com.au> wrote:
> Gavin
>
> If i recall correctly, i'm pretty sure i had to make some changes to Robin's
> code to make the remote services part work under CF9 when i was playing with
> it. There was a difference between CF8 & CF9 around how parameters passed
> through CFINVOKE are handled. I'll dig up my code in a bit and get back to
> you.
>
> Phil
>
> -----Original Message-----
>
> [http://svn.rocketboots.com/os/galaxy/]
>
> Thanks.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "cfaussie" group.
>
> To post to this group, send email to cfau...@googlegroups.com.
>
> To unsubscribe from this group, send email to
> cfaussie+u...@googlegroups.com.
>
> For more options, visit this group athttp://groups.google.com/group/cfaussie?hl=en
I made the following adjustment to Service.cfc to get it working on CF9
for remote calls for methods with no parameters.
You'll need to adjust the cfreturn in the onMissingMethod function of
Service.cfc - Line 416 in latest trunk from
<cfreturn webService.send(missingMethodName, missingMethodArguments)>
to
<cfif not StructCount(missingMethodArguments)>
<cfreturn webService.send(missingMethodName, JavaCast("null", 0))>
<cfelse>
<cfreturn webService.send(missingMethodName, missingMethodArguments)>
</cfif>
I haven't tested to see if this change breaks earlier versions of CF,
but it was done in a made rush to get my laptop up and running for the
last Melb CFUG. If you can try this and it gets it working for you, and
we can ensure that it doesn't break earlier CFs we'll put it to Robin to
get it committed into SVN
Phil
On 15/04/10 9:57 AM, Gavin Baumanis wrote:
> HI Phil,
> That is great news... thanks..
> Great news in the sense that its not me - and that maybe my code is
> going to work afterall!
>
> I had a quick look in the Galaxy code - but I have never ever done any
> remote service work so it was all a little foreign to me.
> Thanks again.
>
> Gavin.
>
> On Apr 15, 9:28 am, "Phil Haeusler"<p...@gtnet.com.au> wrote:
>
>> Gavin
>>
>> If i recall correctly, i'm pretty sure i had to make some changes to Robin's
>> code to make the remote services part work under CF9 when i was playing with
>> it. There was a difference between CF8& CF9 around how parameters passed
Hi Phil,
I have made the changes you provided and I get the same error in the
same place.
Only of course this time it is in the <cfelse> part of the code you
sent me.
It of course works correctly with the Sample app provided by Robin...
so now I am back a step I suppose
with the issue of obviously doing something wrong with my code -
bummer.
Interestingly, I created a method in that CFC that takes no arguments
and returns a simple string.
That works as I would have expected.
Here is the line used to invoke the method on the remote service;
#remoteLoginService.fn_check_user_in_ldap(user = 'test_user', password
= 'test_password')#
Here is the cffunction declaration;
<cffunction
name="fn_authenticate_user"
hint="Function to Authenticate User Against specified LDAP Server :
I return a user object if successful"
access="public"
returntype="Any">
So it would seem that I have an issue with sending arguments to my
method if I use it is a remote service.
Hopefully it is somehting glaringly obvious.. and everyone cvan take
turns slapping my forehead at the CFUG!
Gavin.
> http://groups.google.com/group/cfaussie?hl=en.
>
>
--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com
Hands-on ColdFusion ORM Training @ cf.Objective() 2010
www.ColdFusionOrmTraining.com/
Cheers
Kai
--
Kai Koenig - Ventego Creative Ltd
ph: +64 4 476 6781 - mob: +64 21 928 365 / +61 450 132 117
web: http://www.ventego-creative.co.nz
blog: http://www.bloginblack.de
twitter: http://www.twitter.com/agentK
Hands-on Regular Expression training @ webDU 2010
http://bloginblack.de/agentk/workshop-befriending-regular-expressions/
Hands-on Flash Catalyst and Flex 4 training @ Webinale 2010
http://bloginblack.de/agentk/workshop-rias-with-flash-catalyst-and-flex-4/
--
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
Especially since I have no idea what you're talking about!
Gavin.
On Apr 15, 11:42 am, Mark Mandel <mark.man...@gmail.com> wrote:
> Very quick question - when you update the remote code are you
> refreshing the wsdl in the administrator?
>
Your code change was required none the less to get the sample
application running correctly on CF9.
So that wasn't a waste, at all.
I did a dump;
<cfdump var="#missingMethodName#"><br />
<cfdump var="#missingMethodArguments#"><br />
And can confirm that the methiod name matches the methodf in my CFC
and the missing method arguments also contains a structure of the
arguments that I had passed into the function call.
I created a new function;
<cffunction name="myFunction" access="public" returntype="Numeric" >
<cfargument name="myNumber" default="0" type="numeric">
<cfset fred = arguments.myNumnber +10>
<cfreturn fred>
</cffunction>
and call it like such;
<cfset remoteLoginService = createObject("component","/loginService/
loginServiceSampleApp/authUser/AppLoginService").init("http://
localhost/loginService/loginServiceSampleApp/authUser/
AppLoginService.cfc?wsdl")>
<cfoutput>
#remoteLoginService.myFunction(1)#<br />
<cfoutput>
I wouldn't have thought it got any more simple than that - to be
honest - but it returns the same error message as before.
It would seem to me - that there is some issue with dealing with ANY
kind of attribute that gets sent to the remote method.
Anyhow - unless there is an obvious answer - I will certainly see you
tonight at the CFUG - thanks for the offer to help!
Gavin.
On Apr 15, 12:50 pm, "Phil Haeusler" <p...@gtnet.com.au> wrote:
> Hi Gavin
>
> It could well be that this is a completely different issue to the one i came
> across.
>
> My memory is stretched a little bit now, but perhaps try playing around with
> the returntype of your function. Maybe start off with a string or struct
> and get that working and then keep extending it until it breaks. Happy to
> investigate more at the CFUG tonight
>
> Phil
>
> -----Original Message-----
>
> > >> [http://svn.rocketboots.com/os/galaxy/
> [http://svn.rocketboots.com/os/galaxy/]]
>
> > >> Thanks.
>
> > >> --
>
> > >> You received this message because you are subscribed to the Google
> Groups
>
> > >> "cfaussie" group.
>
> > >> To post to this group, send email to cfau...@googlegroups.com.
>
> > >> To unsubscribe from this group, send email to
>
> > >> cfaussie+u...@googlegroups.com.
>
> > >> For more options, visit this group
> athttp://groups.google.com/group/cfaussie?hl=en
> [athttp://groups.google.com/group/cfaussie?hl=en]
>
> > >> [http://groups.google.com/group/cfaussie?hl=en
To keep everyone in the loop;
The brains-trust at tonight's Melbourne CFUG all gave me some
assistance with trying to "nut-out" what I had done wrong.
(After the presentation on using the built-in debugger of CFBuilder)
Happy to report that I hadn't done anything wrong - it turns out to be
a CF9 related issue. Well that was the consensus anyway!
Just to prove them right , I have just downloaded / installed CF8 and
my code works fine and dandy.
It seems there is an issue with attribute type casting within the
Galaxy code - where it uses Java classes directly.
Phil has kindly offered to take the baton on this one and work with
Robin to see if it can be resolved for CF9.
It's not all doom and gloom though.... if the CFC is called locally
then Galaxy will correctly create as many instances of the object that
I have asked it to - and all arguments are accepted / actioned as one
would expect too.
So we can continue to re-develop our application using Galaxy SOA as
long all the CFCs are local - which is most likely going to be the
case (at least initially), even when the Remote type casting has ben
nutted out.
Gavin.