Garry -- Howdy. You're welcome to help yourself to the now-shelved pharmacopoeia of antipsychotics I amassed while trying myself to solve this problem many moons ago. Alternatively, here are some non-pharmaceutical resources that may help you:
If you check the LiveDocs for the "Handling complex data types" topic (http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001554.htm), you'll see some helpful starting tips there plus, at the bottom, an added comment of mine which leads to a support forum thread (one of a few I posted on this topic over the last couple of years or so) which again poses the question I think you're asking -- and the solution. However, there are formatting constraints in the support forums, and a better formatted version of the solution is also posted elsewhere (http://hcc.musc.edu/research/shared_resources/xml_complex_types_to_cf_structure_notes.cfm). I hope this helps. Alternatively, you can let me know whether you'd rather have the Haldol or Risperdal out of my medicine cabinet; I don't think they've hit their expiration dates yet. :-) -- Larry Afrin, M.D. Associate Professor of Medicine, Division of Hematology/Oncology Director of Information Technology, Hollings Cancer Center Medical University of South Carolina [EMAIL PROTECTED] "Garry Viner (GV)" wrote: > Hi there. I hope someone can help me with this problem before I slowly go > insane. > > I am trying to consume a webservice, where the input parameter is defined as > a collection. > > The documentation looks like this: > > <?xml version="1.0" encoding="utf-8"?> > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Body> > <DummyTestMethod4 xmlns="http://www.at2.com.au/Member/webservices/"> > <testCollection> > <testStruct> > <_testStruct> > <strTest>string</strTest> > <bolTest>boolean</bolTest> > </_testStruct> > <_testStruct> > <strTest>string</strTest> > <bolTest>boolean</bolTest> > </_testStruct> > </testStruct> > </testCollection> > </DummyTestMethod4> > </soap:Body> > </soap:Envelope> > > Alternatively, the wsdl file looks like this: > > <s:element name="DummyTestMethod4"> > <s:complexType> > <s:sequence> > <s:element minOccurs="1" maxOccurs="1" name="testCollection" > type="s0:_testCollection" /> > </s:sequence> > </s:complexType> > </s:element> > > <s:complexType name="_testCollection"> > <s:sequence> > <s:element minOccurs="0" maxOccurs="1" name="testStruct" > type="s0:ArrayOf_testStruct" /> > </s:sequence> > </s:complexType> > > <s:complexType name="ArrayOf_testStruct"> > <s:sequence> > <s:element minOccurs="0" maxOccurs="unbounded" name="_testStruct" > type="s0:_testStruct" /> > > </s:sequence> > </s:complexType> > > <s:complexType name="_testStruct"> > <s:sequence> > <s:element minOccurs="0" maxOccurs="1" name="strTest" type="s:string" /> > > <s:element minOccurs="1" maxOccurs="1" name="bolTest" type="s:boolean" > /> > </s:sequence> > </s:complexType> > > > > I would have assumed that I needed to create the parameter as follows: > > <cfset stCollection=StructNew()> > <cfset stTest=StructNew()> > <cfset aTest=ArrayNew(1)> > <cfloop index="Count" from="1" to="2"> > <cfset stInner=StructNew()> > <cfset stInner.strTest="foo"> > <cfset stInner.bolTest="false"> > <cfset ArrayAppend(aTest,stInner)> > </cfloop> > <cfset stTest.testStruct=aTest> > <cfset stCollection.testCollection=stTest> > > <cfinvoke > webservice="http://www.at2.com.au/member/webservices/wsCreateMember.asmx?wsd > l" > method="DummyTestMethod4" > returnvariable="returnVar"> > > <cfinvokeargument name="testCollection" value="#stCollection#"> > > </cfinvoke> > > > > However I get the following error message: > > Web service operation "DummyTestMethod4" with parameters > {testCollection={{TESTCOLLECTION={{TESTSTRUCT={[{STRTEST={foo},BOLTEST={fals > e}}, {STRTEST={foo},BOLTEST={false}}]}}}}}} could not be found. > > In fact, no matter how I use structures and arrays to create a parameter for > this web service, I get the same error. It's driving me insane. > > Anyone able to help me here please? > > Garry > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:221330 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

