RE: xml post
Status: Alpha
Brought to you by:
coroberti
From: Matt L. <mat...@av...> - 2008-10-29 11:26:23
|
Below is a conf file I have tried to use (unsuccessfully) to post an xml file. ########### GENERAL SECTION ################################ BATCH_NAME= nomadeskpoll CLIENTS_NUM_MAX=1 # Same as CLIENTS_NUM INTERFACE=eth0 NETMASK=16 IP_ADDR_MIN= 192.168.2.71 IP_ADDR_MAX= 192.168.2.128 CYCLES_NUM=1 URLS_NUM= 1 ########### URL SECTION #################################### URL=http://192.168.2.56/nomadesk/index.phpTask?Navigator::Task=ReceiveMe ssage URL_SHORT_NAME="Poll" REQUEST_TYPE=POST UPLOAD_FILE=./conf-examples/poll2.xml TIMER_URL_COMPLETION = 5000 TIMER_AFTER_URL_SLEEP = 5000 The xml file looks like this: <?xml version="1.0" encoding="utf-8" standalone="yes"?><Poll><Accounts><Account><AccountName>nmua000014</Acco untName><Password>aventiv23</Password></Account></Accounts><LocationID>b f42425f-fcef-11a3-aaab-199121138cb3</LocationID><ClientVersion>2.6.0.13< /ClientVersion><CreationTstamp>10/28/2008 7:00:30 AM</CreationTstamp></Poll> And my command line: curl-loader -f ./conf-examples/nomadeskpoll.conf wireshark sees this: 761.972165 Vmware_d6:4b:dd -> Broadcast ARP Who has 192.168.2.56? Tell 192.168.2.71 761.972667 Vmware_b9:1e:c2 -> Vmware_d6:4b:dd ARP 192.168.2.56 is at 00:0c:29:b9:1e:c2 761.972672 192.168.2.71 -> 192.168.2.56 TCP 47403 > http [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=167834233 TSER=0 WS=7 761.972832 192.168.2.56 -> 192.168.2.71 TCP http > 47403 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=167910328 TSER=167834233 WS=7 761.972854 192.168.2.71 -> 192.168.2.56 TCP 47403 > http [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=167834235 TSER=167910328 761.973090 192.168.2.71 -> 192.168.2.56 TCP [TCP segment of a reassembled PDU] 761.973265 192.168.2.56 -> 192.168.2.71 TCP http > 47403 [ACK] Seq=1 Ack=212 Win=6912 Len=0 TSV=167910329 TSER=167834235 761.973660 192.168.2.56 -> 192.168.2.71 HTTP HTTP/1.1 100 Continue 761.973665 192.168.2.71 -> 192.168.2.56 TCP 47403 > http [ACK] Seq=212 Ack=26 Win=5888 Len=0 TSV=167834236 TSER=167910329 761.973907 192.168.2.71 -> 192.168.2.56 HTTP PUT /nomadesk/index.phpTask?Navigator::Task=ReceiveMessage HTTP/1.1 761.974298 192.168.2.56 -> 192.168.2.71 HTTP HTTP/1.1 405 Method Not Allowed (text/html) 761.974431 192.168.2.56 -> 192.168.2.71 TCP http > 47403 [FIN, ACK] Seq=570 Ack=595 Win=7936 Len=0 TSV=167910330 TSER=167834236 761.974435 192.168.2.71 -> 192.168.2.56 TCP 47403 > http [ACK] Seq=595 Ack=571 Win=7040 Len=0 TSV=167834237 TSER=167910330 761.974609 192.168.2.71 -> 192.168.2.56 TCP 47403 > http [FIN, ACK] Seq=595 Ack=571 Win=7040 Len=0 TSV=167834237 TSER=167910330 761.974734 192.168.2.56 -> 192.168.2.71 TCP http > 47403 [ACK] Seq=571 Ack=596 Win=7936 Len=0 TSV=167910330 TSER=167834237 In the sourceforge TODO doc for curl-loader I see that "transparent support for POST-ing some file, e.g. a SOAP file" is on the TODO list for the next beta. This seems to be exactly what I need. So would there be a non-transparent way (workaround) to achieve this same thing in the current release? Thank you, Matt Love From: Robert Iakobashvili [mailto:cor...@gm...] Sent: Wednesday, October 29, 2008 10:50 AM To: curl-loader-devel Subject: Re: xml post Hi Matt, On Tue, Oct 28, 2008 at 5:59 PM, Matt Love <mat...@av...> wrote: I am trying to do an xml post with curl-loader similar to the curl commad below: curl -F file=@/tmp/addexistingaccount.xml http://localhost/nomadesk/index.php?TaskNavigator::Task=ReceiveMessage How is a similar command created in curl-loader .conf file? I have tried setting the UPLOAD_FILE tag, to no avail. I am trying to guess, what you are doing, since PRF was not provided, which is normally including your configuration, command-line, etc Could it be, that you missed that it should be POST or POST after GET? You may wish to run your curl command line, collect the capture by wireshark and attach it. There are several examples in curl-loader examples, like: curl-loader/conf-examples/post-form-tokens-fr-file.conf Still, without the PRF and the capture, it is just guessing. Sincerely, Robert Iakobashvili |