0

I am using a very particular language named “Magik”, I used to use MSXML2 to run web services but in one of my projects I failed to use MSXML, I tried a lot of thing to make it work from changing MSXML.DLL and testing different version of MSXML, using MSXMLHttpServer and all the things you may think of, I somehow ate MSDN website but didn’t find anything helpfull.

Now I am looking for other ways of calling a SOAP webservice, someone said you may post your XML to web method address by parsing and using a query string, But I didn’t succeed to do so.

I can also negotiate via TCP/IP, Can I send my XML to a web service using a TCP/IP connection?

If there is any other way that do the job I really appreciate it.

Currently I am connecting Magik to a Java application and when I need to call a web service I send my request to that Java application (there is a Jar file which creates a data-bus between a Magik session and a Java Application) I have also wrote the Java part using Axis technology. But this is a very hard job and I should change a lot of things to only keep my project up and match with a small change in web service that I consume. Using MSXML were so easy formerly, sadly it does not work now!

1 Answer 1

0

First note that you can not use GET to call SOAP web services only POST will work with SOAP, GET can be used for REST but you mentioned SOAP only.

I can introduce you two method that you may use to call a web service instead of your MSXML which does not work anymore.

Using Test Form (Web Service Test Page)

  1. You may ask your .Net web services provider to create a test form for his own web service and you create a query string which suppose to emulate the data on the form, actually you are using the web services tester page to send your data via query string to it and it will complete the rest for you.

Using TCPIP

  1. use a TCP/IP Connection, in this method you need to create a header above your xml to set the parameters that a web service consumer should fill (remember MSXML and Content-Type, Content-Length, SOAPAction, Host, …….) then translate your string to a byte vector since all programming language which can create a TCPIP Socket just accept a byte vector while inputing or outputing data to that connection. after translating the string you are ready to send the data to your web services address. take a look at the following example of how you may create a string to send to a TCPIP socket.
POST /globalweather.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.webserviceX.NET/GetCitiesByCountry"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance 
    xmlns:xsd=http://www.w3.org/2001/XMLSchema 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
        <GetCitiesByCountry xmlns="http://www.webserviceX.NET">
             <CountryName>Egypt</CountryName>
        </GetCitiesByCountry>
  </soap:Body>
</soap:Envelope>

You may send above string to http://www.webservicex.net/globalweather.asmx

You may check to following link if you need detailed information about how to consume a web service using TCPIP

http://www.codeproject.com/Articles/312530/Calling-Webservice-Using-TCP-IP-from-any-Programmi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.