NOAA SOAP Question
ericmedley
Posts: 4,177
Hey all,
after about 5 hours of gnawing my own leg off...
I'm trying to POST into the SOAP server at NOAA.
I'm pretty sure I have the header correct since it does work with other SOAP severs but cannot suss out the URI I need.
Has anyone done this and have the URI or some helpful hints?
Here's what I have with one of the many failed URIs.
I (obviously) calculate the length of the SOAP XML message included and stick that at the end of the 'Content Length: ' line with a CRLF.
I can keep guessing as there are only 28 letters in the alphabet X 2 for lower case/caps and 10 digits. I might be able to guess the URI in about 397 years or so. But, if one of you scholarly fellows can throw me a bone, I'd appreciate it.
Thanks!
e
after about 5 hours of gnawing my own leg off...
I'm trying to POST into the SOAP server at NOAA.
I'm pretty sure I have the header correct since it does work with other SOAP severs but cannot suss out the URI I need.
Has anyone done this and have the URI or some helpful hints?
Here's what I have with one of the many failed URIs.
SOAP_Server_URL='graphical.weather.gov' SOAP_Header=" 'POST /xml/DWMLgen/ HTTP/1.1',13,10, 'Host: http://graphical.weather.gov',13,10, 'Content-Type: application/soap+xml; charset=utf-8',13,10, 'Content-Length: ' "
I (obviously) calculate the length of the SOAP XML message included and stick that at the end of the 'Content Length: ' line with a CRLF.
I can keep guessing as there are only 28 letters in the alphabet X 2 for lower case/caps and 10 digits. I might be able to guess the URI in about 397 years or so. But, if one of you scholarly fellows can throw me a bone, I'd appreciate it.
Thanks!
e
0
Comments
I tried your code w/o the HTTP/1.1',13,10, since my old code didn't use it and some new stuff I'm working with wouldn't work if that was included either. This is what I get running as a GET and POST.
I also tried with just the GET/POST & Host and got the same bad request so maybe if I new what you're trying to retrieve with /xml/DWMLgen I might be of more help.
http://graphical.weather.gov/xml/DWMLgen/schema/meta_data.xsd and learned DWML stands for:
"Digital Weather Markup Language"
Seems like DWML might be in the path to what you're looking for but not the end location.
Thanks for the reply!
The message I'm sending is a SOAP XML request. It's a preformatted XML file that tells the server to send back a whole slew of information in a SOAP XML response.
SOAP works on the same port as web traffic. (port 80) It works similarly to an SQL query and/or php? request. The requested information is embedded in the request.
What I'm finding online is similar to what I run into all the time with trying to get AMX to talk to a computer.
all the discussion is very computer centric. So, for example when I look for the actual format of the SOAP request I get reams of discussion about which calls to make in UNIX or how to properly call the built-in SOAP utility in VBasic or the part about the SOAP container. It's hard to find what the whole message being sent by the client looks like. "Because who does that crap anymore??? sheesh! Ask for the time and you want to build me a clock.."
It took me hours just to find an actual working example that I could test on a real server.
anyway... so the POST command is what's mentioned in all the examples of invoking a SOAP conversation.
Thanks for trying!
e
here's a sample SOAP conversation.
http://graphical.weather.gov/xml/
Nope, no and maybe in that order.
I would suggest the following:
1. Get it working using the Poster plugin for Firefox first. It's not going to help you determine the URI, but once you make a properly formed post using Poster, you can check the transactions using Wireshark so that you can implement the posts unchanged in Netlinx. Poster should take out a lot of the variables and speed things up.
https://addons.mozilla.org/en-US/firefox/addon/poster/
2. Check that you are using the right line endings in the content you are posting. From memory, likely to be CR/LF pairs in the header and CR's (no LF) in the content.
You might have done the following, but it's not entirely clear from your OP... (Sorry if I'm stating the obvious.) Did you include the additional CRLF between the http header and body? It should look something like this:
Yours,
Roger McLean
Swinburne University
In most cases I did try all those things. Suffice it to say I ended up going a slightly different route. There is a way to use their database query with simple PHP and HTTP that gets me the same result. I parked the SOAP idea for a while until I can get to it. My only worry is that at some point they might get around to rewriting the query script and thatbwill break my code. The SOAP solution is more permanent.
Anyway, thanks so much!
Eric