Roland,

Thanks for your reply! I couldn't get your suggestion to work. It's erroring
out before it gets to the GetSOAPRequest() call. The "strange" thing is that
if i call the webservice with cfinvoke, i get the the
"java.lang.IllegalArgumentException: argument type mismatch" error. If i use
CreateObject() as you suggested, i get a "Web service operation "Write" with
parameters ...... could not be found." error.

I'm really beginning to see why you love this!  ;)  Feel free to hit the
webservice. It's a test installation. Here's my current test script ...


<cfset args = StructNew()>
<cfset args.User     = "web" >
<cfset args.Password = "test">
<cfset args.Table    = "igcontact">

<cfset dataNodes = ArrayNew(1)>

<!--- Title/Sqlname --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "Title/Sqlname">
<cfset node.Data = "eMr">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- Name --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "Name">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- FirstName --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "FirstName">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- Email --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "Email">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!---  Phone --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "Phone">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- Street --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "Street">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- PostalCode --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "PostalCode">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- City --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "City">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- Country --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "Country">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- Comment --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "Comment">
<cfset node.Data = "some data">
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- SpeakFrench --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "SpeakFrench">
<cfset node.Data = true>
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<!--- NewsLetter --->
<cfset node = CreateObject("component", "DataNode")>
<cfset node.Path = "NewsLetter">
<cfset node.Data = true>
<cfset node.ReconcKey = true>

<cfset ArrayAppend(dataNodes, node)>

<cfset ArrayOfDataNode = CreateObject("component", "ArrayOfDataNode")>
<cfset ArrayOfDataNode.dataNodes = dataNodes>
<cfset args.dataNodes = ArrayOfDataNode.dataNodes>

<!--- <cfdump var="#args#"> --->

<!--- <cfinvoke
webservice="http://igo2.dotnet31.hostbasket.com/data.asmx?wsdl";
returnvariable="status"
method="Write"
argumentCollection="#args#">

<cfoutput>#status#</cfoutput> --->


<cfscript>
        ws = CreateObject("webservice",
        "http://igo2.dotnet31.hostbasket.com/data.asmx?wsdl";);
        status = ws.Write(args);
        req = GetSOAPRequest(ws);
</cfscript>

<cfdump var="#req#">

>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Behalf Of Roland Collins
>Sent: Saturday, October 15, 2005 11:52 PM
>To: [email protected]
>Subject: RE: [CFCDev] communicating with a .NET web service
>
>
>Well it's probably just a namespace/datatype issue at this point, which is
>actually pretty easy to fix.
>
>Create the webservice as an object:
>
>ws = CreateObject("webservice",
>"http://igo2.dotnet31.hostbasket.com/data.asmx?wsdl";);
>
>status = ws.Write(args);
>
>req = GetSOAPRequest(ws);
>
><cfdump var="#req#">
>
>After you send the Write command, dumping the request with
>GetSOAPRequest(ws) shows you exactly what you sent to the service.  You can
>then compare this to what the service expects (viewable on the example page
>off of the main asmx file).
>
>In fact, if you post that request dump here, I can look at it in more
>detail.  Or if you don't mind, I can hit the webservice directly myself (if
>it won't cause any issues).
>
>I love troubleshooting interop issues - we do a LOT of CF/.NET connectivity
>;)
>
>Roland
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
>Of Nando
>Sent: Saturday, October 15, 2005 2:22 AM
>To: [email protected]
>Subject: RE: [CFCDev] communicating with a .NET web service
>
>Hi Roland,
>
>Thanks for answering! Before reading on, if you immediately see what i'm
>doing wrong and have a quick suggestion, great, i'm all ears because i'll
>learn something that might be useful to know. Otherwise i'm ready to drop
>this and move on.
>
>I already had tried what you suggested ... I had an identical DataNode.cfc.
>I'm getting the error:
>
>*******
>
>Could not perform web service invocation "Write".
>Here is the fault returned when invoking the web service operation:
>
> java.lang.IllegalArgumentException: argument type mismatch
>
>*******
>
>Current test that produces the above error with a DataNode.cfc in the same
>directory.
>
>******* webserviceTest_62.cfm  :)
>
><cfset args = StructNew()>
><cfset args.User     = "web" >
><cfset args.Password = "test">
><cfset args.Table    = "igcontact">
>
><cfset args.DataNodes = ArrayNew(1)>
><!--- Title/Sqlname --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "Title/Sqlname">
><cfset node.Data = "eMr">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- Name --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "Name">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- FirstName --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "FirstName">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- Email --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "Email">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!---  Phone --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "Phone">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- Street --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "Street">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- PostalCode --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "PostalCode">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- City --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "City">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- Country --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "Country">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- Comment --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "Comment">
><cfset node.Data = "some data">
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- SpeakFrench --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "SpeakFrench">
><cfset node.Data = true>
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><!--- NewsLetter --->
><cfset node = CreateObject("component", "DataNode")>
><cfset node.Path = "NewsLetter">
><cfset node.Data = true>
><cfset node.ReconcKey = true>
>
><cfset ArrayAppend(args.DataNodes, node)>
>
><cfdump var="#args#">
>
><cfinvoke webservice="http://igo2.dotnet31.hostbasket.com/data.asmx?wsdl";
>returnvariable="status"
>method="Write"
>argumentCollection="#args#">
>
><cfoutput>#status#</cfoutput>
>
>*******
>
>Now here's a snippet from Write.java auto-generated from WSDL
>
>package com.invigo.ws;
>
>public class Write  implements java.io.Serializable {
>    private java.lang.String user;
>    private java.lang.String password;
>    private java.lang.String table;
>    private com.invigo.ws.ArrayOfDataNode dataNodes;
>
>    public Write() {
>    }
>
>    public Write(
>           java.lang.String user,
>           java.lang.String password,
>           java.lang.String table,
>           com.invigo.ws.ArrayOfDataNode dataNodes) {
>           this.user = user;
>           this.password = password;
>           this.table = table;
>           this.dataNodes = dataNodes;
>    }
>
>Seems like it's expecting the array to be packaged inside an object??? I'm
>not sure.
>
>Nando
>
>
>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>Behalf Of Roland Collins
>>Sent: Saturday, October 15, 2005 1:02 AM
>>To: [email protected]
>>Subject: RE: [CFCDev] communicating with a .NET web service
>>
>>
>>Did you try creating a CFC named DataNode and using cfproperty to
>>define all
>>of the elements in the DataNode class?  We use a similar method to
>>communicate to a fairly complex WS.
>>
>>Try the attached files...
>>
>>Roland
>>
>>
>
>
>
>
>
>----------------------------------------------------------
>You are subscribed to cfcdev. To unsubscribe, send an email to
>[email protected] with the words 'unsubscribe cfcdev' as the
>subject of the
>email.
>
>CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
>(www.cfxhosting.com).
>
>CFCDev is supported by New Atlanta, makers of BlueDragon
>http://www.newatlanta.com/products/bluedragon/index.cfm
>
>An archive of the CFCDev list is available at
>www.mail-archive.com/[email protected]
>
>
>
>
>
>
>
>----------------------------------------------------------
>You are subscribed to cfcdev. To unsubscribe, send an email to
>[email protected] with the words 'unsubscribe cfcdev' as the
>subject of the email.
>
>CFCDev is run by CFCZone (www.cfczone.org) and supported by
>CFXHosting (www.cfxhosting.com).
>
>CFCDev is supported by New Atlanta, makers of BlueDragon
>http://www.newatlanta.com/products/bluedragon/index.cfm
>
>An archive of the CFCDev list is available at
>www.mail-archive.com/[email protected]
>
>





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to