# A newbie query about Soap4R and dot net web services

**URL:** <https://rubytalk.org/t/a-newbie-query-about-soap4r-and-dot-net-web-services/8889>\
**Category:** ruby-talk\
**Created:** [18 November 2003 14:12 UTC](https://rubytalk.org/t/a-newbie-query-about-soap4r-and-dot-net-web-services/8889 "2003-11-18T14:12:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davem1957](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@Davem1957](https://rubytalk.org/u/Davem1957)\
**Post date:** [18 November 2003 14:12 UTC](https://rubytalk.org/t/a-newbie-query-about-soap4r-and-dot-net-web-services/8889/1 "2003-11-18T14:12:25Z")

</div>

Can anyone help me with this Soap4r problem?

I have created a simple web service in dot net using Visual studio and  
have modified a sample program from the Soap4r distribution to access  
it.

Here’s the program:

require ‘soap/rpc/driver’

class Exchange  
ForeignServer = "[http://dmoorexp/calcwebservice/service1.asmx](http://dmoorexp/calcwebservice/service1.asmx)"  
MyServiceNamespace = ‘[http://dlogic.com/dmwebservices](http://dlogic.com/dmwebservices)’

def initialize  
@drv = SOAP::RPC::Driver.new(ForeignServer, MyServiceNamespace)  
@drv.add\_method(“Mul”, “x”, “y”)  
end

def mul(x, y)  
@drv.call(Mul)  
return @drv.Mul(x, y)  
end  
end

e = Exchange.new()  
e.mul(10,20)

when run I get the message:

#SOAP::Mapping::Object:0x2dd5d90: Server did not recognize the value  
of HTTP Header  
SOAPAction: . (SOAP::FaultError)

Here is the soap header that the visual studio diagnostic program says  
is expected.

POST /calcwebservice/service1.asmx HTTP/1.1  
Host: dmoorexp  
Content-Type: text/xml; charset=utf-8  
Content-Length: length  
SOAPAction: “[http://dlogic.com/dmwebservices/Mul](http://dlogic.com/dmwebservices/Mul)”

Any suggestions as to how I can diagnose what is going wrong? I am a  
newcomer to Soap and Soap4r. Is there any good tutorial material  
covering how to access dot net webservices?

Thanks for anything!  
David Moore

---

<div class="post-metadata">

**Author:** ![NAKAMURA\_Hiroshi4](https://avatars.discourse-cdn.com/v4/letter/n/3ab097/32.png) [@NAKAMURA\_Hiroshi4](https://rubytalk.org/u/NAKAMURA_Hiroshi4)\
**Post date:** [18 November 2003 14:44 UTC](https://rubytalk.org/t/a-newbie-query-about-soap4r-and-dot-net-web-services/8889/2 "2003-11-18T14:44:54Z")

</div>

Hi,

> From: “David Moore” [davem1957@yahoo.com](mailto:davem1957@yahoo.com)  
> Sent: Tuesday, November 18, 2003 11:12 PM

> ```
> @drv = SOAP::RPC::Driver.new(ForeignServer, MyServiceNamespace) 
> @drv.add_method("Mul", "x", "y")
> 
> ```

Try this;  
@drv.add\_method\_with\_soapaction(“Mul”, “[http://dlogic.com/dmwebservices/Mul](http://dlogic.com/dmwebservices/Mul)”, “x”, “y”)

Regards,  
// NaHi
