How to Send an Xml File to a Web Service

11 Answers 11

Get the Firefox Poster add-on.

A developer tool for interacting with web services and other web resources that lets you make HTTP requests, set the entity body, and content type. This allows you to interact with web services and inspect the results.

Tomalak

314k 62 gold badges 496 silver badges 605 bronze badges

answered Aug 7 '09 at 12:36

2

  • There's Chrome Poster too. It doesn't support POST variables - not sure if the FF one does.

    Feb 28 '12 at 5:05

  • Firefox Poster is not compatible with Firefox 57 (Quantum).

    Nov 14 '17 at 20:07

I used wget for that, there are Windows and Linux versions. Not GUI either but no need of graphical interface for such simple task.

For example:

                wget "http://url_of_my_web_service?param1=123&param2=abc" --post-file="xmlTestFile.xml" --header="Content-Type:text/xml"                              

Where the xmlTestFile.xml it's an xml file in the same directory you run the wget command.

If you want to send a xml string instead of a xml file, use --post-data="string"

answered Aug 7 '09 at 12:34

2

  • You probably want Content-Type: application/x-www-form-urlencoded if, per the OP, you're POSTing a parameter.

    Aug 8 '09 at 7:38

  • Use --output-document=FILE and perhaps --server-response

    May 11 '11 at 20:22

soapUI has support for RESTful services, as well as for SOAP-based services.

answered Aug 7 '09 at 13:35

0

Chrome's DHC by Restlet is pretty good. For some reason the "form" and "transformation" options are disabled for me though.

josliber

42.5k 12 gold badges 91 silver badges 129 bronze badges

answered Feb 28 '12 at 5:07

SOAPUI is very nice tool for testing web services (with gui)

answered Aug 7 '09 at 13:36

not a gui, but curl is a popular tool.

answered Aug 7 '09 at 12:29

1

  • curl -d@filename.xml 'url'

    Aug 8 '09 at 7:36

Obviously an old question, but google brought me here so I wanted to add another resource:

http://www.hurl.it/

Tell it where to send the info, how you want it posted and the data you want to send and it will print out the response from the website.

answered Jan 14 '13 at 14:09

Just an addition to the Firefox add-on, since Poster seems out of date, you may try HttpRequester .

answered Aug 29 '14 at 7:53

answered Feb 2 '10 at 22:39

If you're using Eclipse, it has a built in Web Services client. I had to switch to the Java EE perspective and then find the right button on the main menu bar to launch it.

Once it's up, create a new WSDL page, enter the WSDL url, and then from there you can browse the web service and make requests. If you click the source button in the top right you can manually enter the XML you want to send.

http://www.eclipse.org/webtools/jst/components/ws/M4/tutorials/WebServiceExplorer.html

answered Jul 28 '11 at 23:04

HttpMaster can be used for this testing scenario.

It supports XML posting (with possible parameters, if you need multiple requests in one batch) and viewers (raw and friendly) to view response. If you need only simple post and get, then it's quite possible that such full-fledged tools are simply too much; maybe some browser plugin could be sufficient for simple requests.

answered Sep 7 '15 at 19:52

Not the answer you're looking for? Browse other questions tagged xml web-services post or ask your own question.

How to Send an Xml File to a Web Service

Source: https://stackoverflow.com/questions/1244433/how-do-i-post-an-xml-string-to-a-webservice-for-testing

0 Response to "How to Send an Xml File to a Web Service"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel