You have to build the entire soap xml, envelope and payload as expected by the webservice.

Basically, a soap client like the one you are using in CF is hitting the WSDL and getting info about methods and such, builds the soap envelope and payload for you based on your method and parameter you set. Then it looks in the WSDL for the URL to hit to call that method.

With witango you need to do all that manually. Also, you need to build the soap xml as text, not a DOM because witango DOM doesn't support namespaces properly when building xml.

You also have to hack the @url tag a bit which I sent you an example of.

Also, this:

http://webservices.eventinventory.com/ticketsearch?WSDL

Is probably NOT the action, or the method URL, you have to dig in the WSDL to figure that one out.

--

Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/

On May 21, 2008, at 12:39 PM, Rick Sanders wrote:

Would it be something like this:

<@ASSIGN request$WebService
"http://webservices.eventinventory.com/ticketsearch?WSDL";>

<@ASSIGN request$SOAPAction
"http://webservices.eventinventory.com/ticketsearch?WSDL";>



<@ASSIGN request$SoapPayload 'SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/1999/XMLSchema";
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";>

<@ASSIGN request$myResult <@DOM value="<@URL LOCATION='@@request $WebService' WAITFORRESULT='true' USERAGENT='Witango <@VERSION> <@PLATFORM><@CRLF>Content-Type:text/xml<@CRLF>SOAPAction: @@request $SOAPAction' POSTARGS='1.0<@DQ> encoding=<@DQ>UTF-8<@DQ>?><@CRLF><@VAR request $SoapPayload>'>">>

Then I parse the @@request$myresult array?

Thanks,

<image001.jpg>
Rick Sanders
Webenergy
Canada: 902-431-7279
USA:       919-799-9076
Canada: www.webenergy.ca
USA:       www.webenergyusa.com

From: Robert Garcia [mailto:[EMAIL PROTECTED]
Sent: May-21-08 2:26 PM
To: [email protected]
Subject: Re: Witango-Talk: Invoking a Web Service

You are using something like a SOAP class, that reads the WSDL and does all the work for you. You have to do it entirely manually in witango. You have to build the soap envelope, and use @URL, and there is a hack to specify text/xml in http header.

--

Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/

On May 21, 2008, at 10:22 AM, Rick Sanders wrote:


Hey guys,

I’ve been programming in Cold fusion way too long now, lol... I need to invoke a web service from WiTango and then update the database.

In CF the code is something like this:
<cfinvoke webservice="http://webservices.eventinventory.com/ticketsearch?WSDL " method="ListEvents_Active" returnvariable="XMLResult">
 <cfinvokeargument name="APPCLIENT_ID" value="1475"/>
</cfinvoke>
<CFSET myXMLDoc = XMLParse(XMLResult._any[1])>
<CFSET toloop = ArrayLen(myXMLDoc.XMLRoot.XMLChildren[2].XMLChildren)>
<CFLOOP from="1" to="#toloop#" index="Loop">
<cfquery name="Events" datasource="SportsWorld">
INSERT INTO ActiveEvents (EventID,EventName,EventType) VALUES ('<cfoutput>#myXMLDoc.XMLRoot.XMLChildren[2].XMLChildren[Loop].XMLAttributes.EID#</cfoutput>','<cfoutput>#myXMLDoc.XMLRoot.XMLChildren[2].XMLChildren[Loop].XMLAttributes.E_Name#</cfoutput>','<cfoutput>#myXMLDoc.XMLRoot.XMLChildren[2].XMLChildren[Loop].XMLAttributes.E_Type#</cfoutput>')
</cfquery>
</CFLOOP>

How would I invoke a Web Service in WiTango, and parse it to an array using the above example?

Thanks!

<image002.jpg>
Rick Sanders
Webenergy
Canada: 902-431-7279
USA:       919-799-9076
Canada: www.webenergy.ca
USA:       www.webenergyusa.com

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to