I'm not so new to CF, but very new to using it with SOAP web services and need
some pointers.
I know what my XML needs to look like when calling a particular web service,
but I'm not so sure how to format the variables to feed into the web service
object.
Right now, I'm not able to use the standard cfinvoke technique for the
webservice because I need to pass in a SOAP header. (BTW, I'm using CF 7). So
my code looks like this:
<cfset aCallParameters=StructNew()>
<cfset aCallParameters.name="subject">
<cfscript>
ws = CreateObject("webservice", "http://abc.com/somews?wsdl");
authHeader = XmlNew();
//...bunch o lines for adding to the authentication header
addSOAPRequestHeader(ws, "ignoredNameSpace", "ignoredName", authHeader);
response = ws.find("#aCallParameters#");
</cfscript>
This works OK (no errors at least), but I need to add to my input so the
resulting XML request behind the scenes will look like:
<?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:Header>
...
</soap:Header>
<soap:Body>
<FindSubject xmlns="http://abc.com">
<subject version="string" subjectID="string" subjectGUID="string"
name="string" number="string" description="string" targetAudience="string"
contact="string" downloadedContentEncrypted="string">
<Item.Agenda version="string" url="string" name="string"
encoding="string" />
</subject>
</FindSubject>
</soap:Body>
</soap:Envelope>
I'm unsure how to set up the "aCallParameters" structure to represent the
subject and item.agenda data. I've also tried looking the the wsdl as it gets
interpreted by Dreamweaver but that didn't really help either.
Thanks in advance!
Scott
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3009
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15