So most day’s I’m an infrastructure and apps guy. Which means a bit of:
- And a heap of general IT
So then comes a long a project which requires coding…
And because my ERP spits out and receives XML and Internet browsers are very friendly with the stuff. I have to learn to:
- Java Script
Incredibly powerful but I have a lot to learn.
One of the first things I’ve stumbled on is that modern browser implementations will not in any way allow scripted requests to resources outside their current domain. Even when the domain is the same but the port is different, you are in for a big dose of FAIL. This is because of the Same Origin Policy.
The work around is to host a script on the domain you are on which takes the client request and then passes it on to the remote resource, receives the reply, and passes it back to the client.
So this is my first hurdle. Sending an XML SOAP request using the HTTP POST method to a proxy script and then getting back the reply.
I’m currently looking at using PHP which has a libcurl interface
The script should recognize and pass on the necessary SOAP Headers. At the moment I’m scouring the web looking for hints on how to implement it all… There are some very good samples at www.bennadel.com.
Funny thing is, when you come across someone who really understands a subject and can verbalize it correctly, but uses slightly different tools and frameworks. Then you have to translate how they are doing it correctly across to the Opensource tools you are trying to use.