SOAP - Google Maps & Javascript - Connecting to a Web Service

I need to connect to an asmx webservice using javascript. the webservice accepts and returns a response to the soap. im looking for an example bit of code on how i can connect to the webservice using javascript. it returns lat and long details which I will then use to generate markers on google map. I also have a cross-domain scripting problem ...

should i provide an example of a soap answer?

thank.

+1


source to share


2 answers


There are some SOAP client libraries for JavaScript:



These libraries will allow you to easily make a SOAP request and process the results.

+1


source


I highly recommend that you implement a SOAP client on your web domain. Let JS call your server, which in turn calls ASMX. The web service response must then be converted to suitable JSON on your server before sending it to the client.



This way you get rid of your cross-domain problems, you don't load the SOAP client into the browser, you pass less verbose data to the client, and you have the ability to cache web service calls on your server to speed things up if you want.

0


source







All Articles