I’ve now tried 2 different methods of sending a soap message (read in
from a file) at a server, one using the net/http library the other a
socket.
require ‘soap/wsdlDriver’
require ‘rexml/document’
#require ‘net/http’
require ‘socket’
include Socket::Constants
file = File.new(“PDSUpdate.xml”)
doc = REXML::Document.new(file)
#puts doc
#http.post(“http://inpsesrh02.inpses.co.uk:7778”, doc)
socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
sockaddr = Socket.pack_sockaddr_in( 7779,
‘inpsesrh02.inpses.co.uk/orabpel/default/’ )
socket.connect( sockaddr )
socket.puts doc
socket.close
Can anyone please tell me the simplest way of sending a SOAP message
directly at an address and port. I don’t need the WSDL as I already know
the available methods, and just want to write a test stub.