Actually, you can do it easily with Witango. I do it all the time. There
is just one little trick that you need to use to get around the issue of
not being able to set content-type as an argument for @URL.

You do this by "overloading" the useragent parameter thusly:

useragent="Witango Server <@version><@crlf>Content-Type: application/x-www-form-urlencoded"

(the above may wrap).  In my case, this was the content-type that I needed.
You can substitute some other type instead. Of course, it would be nice
if version 6 would include a content-type argument to the @URL function
so that we didn't have to use this kludge, but it does work.

Stefan

At 05:00 AM 4/15/2008, you wrote:
This can be easily done with other languages, like .NET and PHP and
JAVA with a http request class. However, witango does not have this
ability. It has <@url>, but it doesn't allow you to specify the
content-type, which usually must be text/xml. You can try with
witango, using <@url> and plugging in the xml to the POSTARGS
parameter, but I don't think it will work.

If mac os x is the server platform, you should be able to do this with
curl and some nifty command line paramaters.

Your best bet is to write a bash script that will take the XML in as
an environment variable and do the request, and spit back the output
to stdout, which witango can process.

Or, write a java bean that does this, and takes a string of xml as the
input paramater and outputs the result.

You could also write a RealBasic console application, which would be
VERY simple using the HTTPSocket class. It would accept a environment
variable as the xml in.

--

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 Apr 15, 2008, at 12:06 AM, Wayne Irvine wrote:

Alan Wolfe at [EMAIL PROTECTED] wrote:

Do they say at all how to send it, did they mention SOAP or a
webservice or maybe some place to upload a file of your xml data,
or a
web page to POST the xml data to?

Looks like it's a POST:

POST /test/payment HTTP/1.1
host: www.securepay.com.au
content-type: text/xml
content-length: 677
<?xml version="1.0" encoding="UTF-
8"? > < SecurePayMessage ><MessageInfo><messageID>8af793f9af34bea0cf40f5fc011e0c
</me
ssageID><messageTimestamp>20041904145505116000+600</ messageTimestamp><timeou
tVal
ue>60</timeoutValue><apiVersion>xml-
4.2</apiVersion></MessageInfo><MerchantInfo><merchantID>abc0001</ merchantID>
<pas
sword>abc123</password></MerchantInfo><RequestType>Payment</ RequestType><Pay
ment
<TxnList count="1"><Txn
ID="1"><txnType>0</txnType><txnSource>23</txnSource><amount>200</ amount><pur
chas
eOrderNo>test</ purchaseOrderNo><CreditCardInfo><cardNumber>4242424242424242<
/car
dNumber><expiryDate>07/06</expiryDate></CreditCardInfo></Txn></ TxnList></Pay
ment
</SecurePayMessage>


                 Byte Services Pty Ltd
              http://www.byteserve.com.au/
                 [EMAIL PROTECTED]
  Ph 02 9960 6099   Mob 0409 960 609   Fax 02 9960 6088

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

=====================================================
Database WebWorks: Dynamic web sites through database integration
http://www.DatabaseWebWorks.com

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

Reply via email to