Ruby Talking to MBT SoapInput Node

This is a basic Ruby Script to engage with SoapInput Node running on localhost 7800 with MBT

require 'net/http'
require 'net/https'

# Create te http object
http ='localhost', 7800)
http.use_ssl = false
path = '/acmeOrders/WADDR/ProcessOrders'

# Create the SOAP Envelope
data = <<-EOF
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=""


<submitPORequest xmlns="">
<partNo xmlns="">11</partNo>
<partQuantity xmlns="">0</partQuantity>
<personName xmlns="">
<firstName>Trevor</firstName><lastName>O Connell</lastName>
<address xmlns="">

# Post the request
resp, data =, data)

# Output the results
puts 'Code = ' + resp.code
puts 'Message = ' + resp.message
resp.each { |key, val| puts key + ' = ' + val }
puts data

Expected results

Code = 200
Message = OK
connection = close
content-length = 366
content-type = text/xml;charset=utf-8
date = Sun, 29 Jan 2012 20:53:54 GMT
server = Apache-Coyote/1.1
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="">
<NS1:submitPOResponse xmlns:NS1="">


Popular posts from this blog

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS

Automated Service Monitoring with F5, Consul and Python F5 SDK