I have to deal with various technology everyday while doing telco job. One of technology involve the use of webservice, called SOAP. Some application have GUI interface, but some are not. There’re some open source application to be used out there, soapui is one of the best. However, in our customer here the system using encryption to establish communicate between soap server and soap client application. I had ever deal with soapui customer service and their technical support but got nothing. I am not sure if soapui can support encryption in our environment, but I myself lack on knowledge of how our system dealing with encryption so can’t explain more to soapui technical support.
After trial period finish, I still can’t connect using soapui to encrypted server.
The old man say, to understand more, you have to deal with code directly and built the apps yourself :p. So on my spare time, I tried to read more about soap technology and various implementation using programming language such as ruby, java, etc. Last night I tried savon, amongst other, savon is the most recommended for dealing with soap technology in ruby.
I gave it a try and it’s pretty good,
#!/usr/bin/ruby require 'savon' client = Savon::Client.new do wsdl.document = "http://<ip_address>:8081/ProvisioningGateway/services/xxxxxxxxxxxx?wsdl" end response = client.request :do_ping p response
The response is immediate,
D, [2012-04-13T17:11:49.401346 #19463] DEBUG -- : HTTPI executes HTTP GET using the httpclient adapter D, [2012-04-13T17:11:49.484548 #19463] DEBUG -- : SOAP request: http://ndspgtbd401:8081/ProvisioningGateway/services/xxxxxxxxx D, [2012-04-13T17:11:49.484650 #19463] DEBUG -- : SOAPAction: "doPing", Content-Type: text/xml;charset=UTF-8, Content-Length: 332 D, [2012-04-13T17:11:49.484690 #19463] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="urn:xxxxxxxxxxxxxxx" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="urn:xxxxxxxxxxxx"><env:Body><doPing></doPing></env:Body></env:Envelope> D, [2012-04-13T17:11:49.484749 #19463] DEBUG -- : HTTPI executes HTTP POST using the httpclient adapter D, [2012-04-13T17:11:49.559922 #19463] DEBUG -- : SOAP response (status 200): D, [2012-04-13T17:11:49.560018 #19463] DEBUG -- : <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><doPingResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><doPingReturn href="#id0"/></doPingResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type=xxxxxxxxxxxx"><statusCode xsi:type="xsd:int">0</statusCode><statusHint xsi:type="soapenc:string"><strong>ProvGw is OK</strong></statusHint></multiRef></soapenv:Body></soapenv:Envelope>
Of course without solving the problem related to encryption the script will be useless (much better using soapui), but let’s see if it can be implemented using ruby…