First, see the documentation for more info. Second, what you are constructing with the CFML data is something that the runtime can translate in to the *Java* arguments to the web service stub generated by the Apache Axis web service engine that lies at the heart of the CFMX web service support.
The Axis WSDL2Java command is executed on the WSDL file specified in the admin or the cfinvoke. This produces Java source files which are then compiled (only the first time) and examined for the function signature that matches the arguments you passed in to cfinvoke. For instance if you have the following schema in your WSDL: <complexType name="SOAPStruct"> <all> <element name="varString" type="string"/> <element name="varInt" type="int"/> <element name="varFloat" type="float"/> </all> </complexType> This causes a JavaBean to be created that has 3 data items in it: String varString; int varInt; float varFloat; If this were one of the arguments to an operation, say echo, then the Java function that CFMX is looking at could have the signature: SOAPStruct echo(SOAPStruct in) If you create a CFML structure like this: s = StructNew(); s.varString = "hi"; s.varInt = 123; s.varFloat = 45.678; Then CFMX will call the setter method for each of the keys in the struct and create a SOAPStruct Java object that it will pass in to the function. As far as attributes (not child elements) are concerned, the JavaBean will be created by Axis with setter functions for the attributes as well as the children. So for example if there was an attribute in the schema named myattr, you would add s.myattr = "value"; and CFMX would just treat it like another value in the JavaBean. Axis on the other hand will have the metadata to know that it should be serialized on the wire as an attribute. Hope that helps. Tom Jordahl Macromedia Server Development -----Original Message----- From: Lawrence B. Afrin, M.D. [mailto:[EMAIL PROTECTED] Sent: Friday, March 04, 2005 1:53 PM To: CF-Talk Subject: Re: Document Literal WebService with CFMX6.1 Tom -- Recently you noted in this forum that a CFML Struct can be crafted to correspond to any arbitrary XML document required as input to any arbitrary (i.e., not necessarily CF-based) web service. However, it remains unclear how one can craft a CFML Struct that will be transformed by the CF web services engine into both the necessary XML element tags, element subtags, element text, and element attributes for services that require such complex input. Would you please give an example of how to create a CFML Struct that would lead to the following XML document being passed as an input argument? ----the XML document the web service needs to receive as the input1 arg: ----- <tag attr1="attr1val"> <subtag attr2="attr2val">subtagtext</subtag> </tag> ------cfml struct build and cfinvoke: --------- <cfset xml_doc = #StructNew()#> <!--- what goes here? ---> <cfinvoke webservice="someURLthatreturnsaWSDL" input1 = #xml_doc# </cfinvoke> It would be enormously helpful if you could please fill in the "what goes here?" part, as the CF documentation doesn't provide an example for this tricky variant of complex-within-complex typing that some of us are facing in our dealings with foreign web services. Thank you! -- Larry Afrin Medical University of South Carolina ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): 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:197534 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54