Just a thought, and it depends on the .NET service, but would WDDX help?

J


On Mon, 17 Jan 2005 08:00:05 -0500, Matthew Small <[EMAIL PROTECTED]> wrote:
> Does anybody have any idea how to send a complex datatype from CF to a .NET
> webservice? I've tried creating an object in CF that directly maps to the
> same structure in .NET but all I get is a data type mismatch error.  This
> really stinks.   I have my example code below.
> 
> Thank you,
> Matt Small
> 
> CF Code:
> 
> ComplexObject.cfc
> ======================================
> <cfcomponent>
>   <cfproperty name="Val1" type="String"/>
>   <cfproperty name="Val2" type="String"/>
>   <cfproperty name="Val3" type="String"/>
> </cfcomponent>
> 
> ComplexObjService.cfc
> ========================================
> <cfcomponent>
>         <cffunction name="getComplexObject" returntype="ComplexObject">
>                 <cfobject name="CObj" component="ComplexObject">
>                 <cfset CObj.val1 = "FirstName">
>                 <cfset CObj.val2 = "MiddleName">
>                 <cfset CObj.val3 = "LastName">
>                 <cfreturn CObj>
>         </cffunction>
> </cfcomponent>
> 
> Index.cfm
> ==========================================
> <cfobject component="ComplexObjService" name="CObj">
> 
> <cfinvoke webservice="http://msserver:85/bulkmailwebservices.asmx?WSDL";
> method="GetEmailObject" returnvariable="theResult">
>         <cfinvokeargument name="CObj" value=CObj.getComplexObject() >
> </cfinvoke>
> 
> <cfoutput>
>         #theResult#
> </cfoutput>
> 
> .NET Code
> ==========================================
> 
> Public Class ComplexObject
>         Public Val1 As String
>         Public Val2 As String
>         Public Val3 As String
>     End Class
> 
> <WebMethod()> Public Function GetEmailObject(ByVal CObj As ComplexObject) As
> String
>         Return "Val1 = " + CObj.Val1 + "<br>" + _
>                 "Val2 = " + CObj.Val2 + "<br>" + _
>                 "Val3 = " + CObj.Val3 + "<br>"
>  End Function
> 
> Thank you,
> Matthew Small
> 


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.blogspot.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190764
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to