HI Doug, I'm not sure how easy it is to use WebMock to stub specifically soap requests but WebMock except Net::HTTP based clients supports Patron and HTTPclient. Afaik soap4r uses HTTPClient to make http requests so it should work fine with soap4r.
Bartosz On 20 Apr, 15:58, doug livesey <[email protected]> wrote: > Hi -- sorry for the cross-post, but ... Well, I wanted to cover my bases, if > I'm honest. > I've been trying (with varying degrees of success) to integrate the > Salesforce API into various apps at work for some time, now. > I've tried ActiveSalesforce, SOAP4R, and other things, and decided that the > best way to go is, in the end, to craft everything using Handsoap, so that I > stand a chance of finding out where the inevitable plethora of errors come > from. > That said, I've got a salesforce service logging in and out successfully, > which is encouraging. > Now, however, it's time to let BDD drive my exploration/development, so I > need to be able to mock the service. I've tried webmock, but that only works > with Net::HTTP, which I guess isn't used for SOAP requests. So I've turned > to soapUI, which is supposed to be able to take your wsdl and run a mock > service (that you can customise with Groovy) on port 8088. > I've done all this, and set it going, and changed the endpoint of my SOAP > client for the tests to match the mock service, and I'm getting this: > > E, [2010-04-20T15:45:03.753748 #2865] ERROR -- : Login failed with: > #<Handsoap::Fault: Handsoap::Fault { :code => 'Server', :reason => 'Missing > operation for soapAction [login] and body element [{urn: > enterprise.soap.sforce.com}login] with SOAP Version [SOAP 1.1]' }> > > Like I say, the operation works with the real service. > Is there something I'm missing to do in soapUI? Do I need to explicitly tell > it what values will be passed in as parameters for the mock to work (like an > expectation) or something? > Running the request from soapUI generates the response I've told it to. > Any & all advice gratefully received -- I've been on this since half six > this morning! :) > Cheers, > Doug. > > -- > You received this message because you are subscribed to the Google Groups > "NWRUG" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/nwrug-members?hl=en. -- You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nwrug-members?hl=en.
