Ask a Question related to Coldfusion Component Development, Design and Development.
-
Rob_E_Mann #1
Consuming .Net Webservice with CFInvoke
I am trying to consume a .Net Webservice and am having a problem. The
webservice takes an array of string objects as a parameter, but when I try to
pass an array into the service, I receive the following error:
Could not perform web service invocation "getInfo" because
java.lang.IllegalArgumentException: argument type mismatch
Anyone have any idea how to pass an array of strings into a service?
Code:
<cfset accts = ArrayNew(1)>
<cfset accts[1] = "1111111111111111">
<cfset accts[2] = "2222222222222222">
<cfset accts[3] = "3333333333333333">
<cfinvoke
webservice="http://localhost/WebService/Service1.asmx?WSDL"
method="getInfo"
returnvariable="aArrayOfAccts">
<cfinvokeargument name="accts" value="#accts#"/>
</cfinvoke>
Rob_E_Mann Guest
-
Error Consuming Webservice
We are attempting to consume a webservice that passes faxed documents back and forth. When we try to send or retrieve a ducment through the... -
Consuming MapPoint Webservice with MX 7
Hi, I want to use Microsofts MapPoint Webservice, wich is username/password - Protected, with MX7. I tried with the following: <cfinvoke... -
Consuming webservice problem
I have created the sample webservice HelloWorld when I try to instantiate it from either a console app or a windows forms app I get the following... -
Consuming Coldfusion Webservice
I am trying to consume a coldfusion webservice that has been implemented as CFC. My calling program resides in Weblogic 8.1 (Java Program). I used... -
Consuming Controls from a Webservice
Whatever you are returning from WebMethod shd be serializable. For that what you can do is store cotrol name & properties as XML DataSet and... -
byron1021 #2
Re: Consuming .Net Webservice with CFInvoke
I have a work around for this. Had the same issue trying to pass an array of
strings to .NET. Look for this in your cfmx directory
org/tempuri/arrayOfStrings.class, I forgot how this is generated, or how I
generated it, but if you can't find it I will email it to you.
[email]byron@hostmysite.com[/email] Take that and put it in the cfmx class path somewhere.
Then use this code snippet as an example. The java class I guess is a native
array of strings and .NET likes this much better. ary = ArrayNew(1);
ary[1] = '1111111'; ws = createObject ('webservice',
'https://....//asmx?WSDL'); aofs = createObject ('java',
'org.tempuri.ArrayOfString').init(); aofs.setString(ary); ret =
ws.getInfo (accts=aofs);
byron1021 Guest



Reply With Quote

