Andrew,

 I had the same question about a month ago and I was given a ton of help, 
but most of which I couldn't use. I eventually with some digging and a 
little help from my local cfug I was able to pass a complex datatype to a 
..NET web service and get a return.

Here is what I did:
First download and install a program called Oxygen 
(http://www/oxygenxml.com) use this only for the WSDL analyzer that is has. 
Use this to build your xml soap packet to send to the .net service. Because 
coldfusion builds the soap in a way that the .net sees it as a variable that 
is not listed and empty, you have to hand craft the soap your self to send.


Here is the code that builds the soap: (Be sure to copy the xml in the 
analyzer as a base to build from)
<!---(START) Build Soap--->
<cfoutput>
<cfsavecontent variable='xmlSOAPcontent'>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <CheckStoppingRule xmlns="TrialIVBuMel">
        <aPatients>
  <cfloop from="1" to="#arrayLen(aPatients)#" index="i"><Patient>
   <TimeOnTest>#apatients[i].TimeOnTest#</TimeOnTest>
   <SubGroup>#apatients[i].SubGroup#</SubGroup>
   <HasDied>#apatients[i].HasDied#</HasDied>
  </Patient></cfloop>
  </aPatients>
            <aSubGroupContinueIndicators>
   <cfloop from="1" to="5" index="i"><boolean>true</boolean></cfloop>
            </aSubGroupContinueIndicators>
            <sErrors>this is the error string</sErrors>
        </CheckStoppingRule>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</cfsavecontent>
</cfoutput>
<!---(END) Build Soap--->

Use CFHTTP to post the soap you just created here is my code:
<!---(START) Post Request --->
<cfoutput>Posting SOAP Request...
<cfhttp url="#BioStatURL#" method="POST" resolveurl="YES">
 <cfhttpparam type="Header" name="Content-Type" value="text/xml; 
charset=utf-8">
 <cfhttpparam type="Header" name="POST" 
value="/IVBuMelWebSvc/TrialConductor.asmx HTTP/1.1">
 <cfhttpparam type="Header" name="Host" 
value="http://biostat252.mdacc.tmc.edu";>
 <cfhttpparam type="Header" name="SOAPAction" 
value="TrialIVBuMel/CheckStoppingRule">
 <cfhttpparam type="HEADER" name="Content-Length" 
value="#len(tostring(xmlSOAPcontent))#">
 <cfhttpparam type="XML" name="CGI" value="#xmlSOAPcontent#">
</cfhttp>
</cfoutput>
<!---(END) Post Request --->


In closing this is the building and sending of the soap, if you want a more 
detailed example please send me an e-mail.
Ernest Pena Jr.
Sr. Application Developer
Blood and Marrow Transplantation
University of Texas M. D. Anderson Cancer Center
FC5.3061.02
713-563-8933 Work
713-404-6147 Pager
713-745-1277 Fax
Interoffice Mail: Unit 423
[EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:206860
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