Thursday, October 27, 2005

WL : Posting SOAP request directly to the SOAP server

It's often useful to make changes to the SOAP request to see what happens. Normally, you have to do this via code and then re-compile the client.

However, you can do this via the command line.

Run the Weblogic "setDomainEnv.cmd" first to set up the environment and then:

java "file name"

where "file name" is a file that contains the SOAP request.

Using this you can add / change the request parameters by simply using a text editor.

Much simpler.

An example of the file format is:

POST ...method... HTTP/1.1
Content-Type: text/xml
SOAPAction: ""
User-Agent: Java/1.4.2_06
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

#?xml version="1.0" encoding="utf-8"?*
#env:Envelope xmlns:env="" xmlns:xsi="" xmlns:soapenc="" xmlns:xsd=""*


# = Left square bracket
* = Right square bracket


No comments: