You may see it at you browser e.g. at FIREFOX if you use a plugin like FIREBUG.
If you type in your request, you will see that the browser will send a GET request.
2nd you will see that the mime type you are sending is not text/xml as normally used for SOAP requests.
The request handler you deal with is not build as “normal” SOAP handler, which would take text/xml, POST and a complete SOAP envelope, but as special handler that deal with GET (may POST) and “standard” HTML data response.
You may test with a normal html page, and add a form with a input field named XML where you type in your xml data and a submit button named API with a value set to CityStateLookup.
Now you can test with GET and POST, depending at the FORM attribute
METHOD.
If your server only accepts GET requests,
you have to write your request document like this:
REQUEST DOCUMENT FROM 'http://SERVERNAME/ShippingAPITest.dll?'-
'API=CityStateLookup&'-
'XML=<CityStateLooku><ZipCode><Zip5>90210</Zip5></ZipCode></CityStateLookupRequest>'
RETURN
PAGE #RESPONSE
RESPONSE #HTTP-ERROR
Then Natural will perform a standard GET request.
NOTE:
You may have to URL-encode our data if it contains special character.
If your sever can response to a POST request too, you may write:
REQUEST DOCUMENT FROM 'http://SERVERNAME/ShippingAPITest.dll'
WITH DATA
NAME 'API' VALUE 'CityStateLookup'
NAME 'XML' VALUE '<CityStateLooku><ZipCode><Zip5>90210</Zip5></ZipCode></CityStateLookupRequest>'
RETURN
PAGE #RESPONSE
RESPONSE #HTTP-ERROR
Then Natural will perform a standard POST request.
NOTE:
You may have to URL-encode our data if it contains special character.
If you have a look, http server handle dynamic generated request, you will find out, that the http server needs to be extended with a program, a module or a scripts.
If the used HTTP server is a IIS, then there you can write extensions using the ISAPI interface. This extensions will be a .dll that can be addressed in many different ways. One simple way is to copy the .dll to a specific directory and then use a url using just this .dll name…
… no magic - just standard http business.
For further reading, may search wikipedia for “http”, “isapi”, “Url encoding” or “Percent-encoding”.