Thanks Chuck will try the Soap4r group
Eric On Tue, Apr 14, 2009 at 1:18 PM, Chuck van der Linden <sqa...@gmail.com>wrote: > > I think you might need to head over to a ruby forum and ask about > this. > > Watir is a web browser driver. it doens't interact with the server at > the HTTP level, it lets the browser do that. > > now if you can intereact with your web service via the browser, and do > what you want entirely through the browser, then watir can you you > automate it. > > Or want to make website that does that and use watir to drive the > browser to interact with the website.. (ok just having said that I > think it's a really bad idea, far too many points of failure), again > watir could help you out. > > But I think your best solution is likely to be making direct HTTP > requests of the service using ruby, and then parsing the responses > manually.. > > So at the point you do that, you are past the expertise of most folks > here, and are much more likely to get a useful answer from a more > mainstream ruby forum, or perhaps a group like this one: > http://groups.google.com/group/soap4r which is really into using ruby > to do SOAP stuff. > > > > On Apr 14, 11:57 am, eric <ewmo...@wildblue.net> wrote: > > I am trying to test a web service and I am unadble to get the security > > header in the envelope. Below is an example of the soap envelope I am > > trying to create followed by an example of the code I have written and > > what the service is returning > > > > Example Soap envelope:. > > > > <soapenv:Envelope xmlns:ser="http://server.domain.com/" > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > > <soapenv:Header> > > <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http:// > > docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity- > > secext-1.0.xsd"> > > <wsu:Timestamp wsu:Id="Timestamp-17852335" xmlns:wsu="http:// > > docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity- > > utility-1.0.xsd"> > > <wsu:Created>2009-04-14T15:10:12Z</wsu:Created> > > <wsu:Expires>2009-04-14T15:15:12Z</wsu:Expires> > > </wsu:Timestamp> > > <wsse:UsernameToken wsu:Id="UsernameToken-12478552" > > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss- > > wssecurity-utility-1.0.xsd"> > > <wsse:Username>wball</wsse:Username> > > <wsse:Password Type="http://docs.oasis-open.org/wss/ > > 2004/01/oasis-200401-wss-username-token- > > profile-1.0#PasswordText">wball</wsse:Password> > > <wsse:Nonce>VpJSJ78ArCIR4sWMbmSKJA==</wsse:Nonce> > > <wsu:Created>2009-04-14T15:10:12.562Z</wsu:Created> > > </wsse:UsernameToken> > > </wsse:Security> > > </soapenv:Header> > > <soapenv:Body> > > <ser:findCustomersByMacAddress> > > <!--Optional:--> > > <macAddress>00:A0:BC:07:56:DC</macAddress> > > </ser:findCustomersByMacAddress> > > </soapenv:Body> > > </soapenv:Envelope> > > > > Example of my code: > > > > require 'soap/wsdlDriver' > > require "soap/rpc/driver" > > > > URL = "http://something.something.something.net:7771/WebServices/ > > services/CustomerSearch?wsdl" > > > > factory = SOAP::WSDLDriverFactory.new(URL) > > driver = factory.create_rpc_driver > > driver.wiredump_dev = STDERR > > > > begin > > > > result = driver.findCustomersByName("Eric"),("Morris") > > puts result > > > > end > > > > Response from Service: > > > > Wire dump: > > > > = Request > > > > ! CONNECT TO something.something.something.net:7771 > > ! CONNECTION ESTABLISHED > > POST /WebServices/services/CustomerSearch HTTP/1.1 > > > > SOAPAction: "urn:findCustomersByName" > > > > Content-Type: text/xml; charset=utf-8 > > > > User-Agent: SOAP4R/1.5.5 (httpclient.rb/269, ruby 1.8.6 (2007-09-24) > > [i386-mswin32]) > > > > Date: Tue, 14 Apr 2009 18:48:57 GMT > > > > Content-Length: 369 > > > > Host: somethign.something.something.net:7771 > > > > <?xml version="1.0" encoding="utf-8" ?> > > <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > <env:Body> > > <n1:findCustomersByName xmlns:n1="http:// > > services.webservice.something.com/"> > > </n1:findCustomersByName> > > </env:Body> > > </env:Envelope> > > > > = Response > > > > HTTP/1.1 500 Internal Server Error > > > > Date: Tue, 14 Apr 2009 18:48:58 GMT > > > > Transfer-Encoding: chunked > > > > Content-Type: text/xml; charset=UTF-8 > > > > X-Powered-By: Servlet/2.4 JSP/2.0 > > > > 00f5 > > > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/ > > envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</ > > faultcode><faultstring>Request does not contain required Security > > header.</faultstring></soap:Fault></soap:Body></soap:Envelope> > > > > 0000 > > > > ! CONNECTION CLOSED > > > > : Request does not contain required Security header. > > (SOAP::FaultError) > > > > >Exit code: 1 > > > > Any help would be greatly appreciated, > > > > Eric Morris > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---