# Soap wsa:To

**URL:** <https://www.ruby-forum.com/t/soap-wsa-to/69372>\
**Category:** Ruby\
**Created:** [September 20, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/soap-wsa-to/69372 "2006-09-20T17:15:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [September 20, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/soap-wsa-to/69372/1 "2006-09-20T17:15:01Z")

</div>

When I’m trying to use a webservice provided by a .NET server from a  
ruby client I get the following error when calling the method:  
Server was unable to process the request - The message must contain a  
wsa:To header.

How can I instruct ruby to add this header? My code currently looks like  
this:

## factory = SOAP::WSDLDriverFactory.new(url) soap\_client = factory.create\_rpc\_driver soap\_client.Method({:arg1 =\> 1, :arg2 =\> 2})

_Jeremy W._  
Serval Systems Ltd.

[www.servalsystems.co.uk](http://www.servalsystems.co.uk) [http://www.servalsystems.co.uk](http://www.servalsystems.co.uk)  
Tel: 01342 331940  
Fax: 01342 331950

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [September 24, 2006, 4:25pm UTC](https://www.ruby-forum.com/t/soap-wsa-to/69372/2 "2006-09-24T16:25:53Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi,

Jeremy W. wrote:

> soap\_client.Method({:arg1 =\> 1, :arg2 =\> 2})  
> You need to define a header handler for wsa:To. A sample header handler  
> is in [http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader](http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader) .  
> Please let me know in case you can create a header handler for wsa:To.  
> I want to add it as a sample of soap4r distribution for other users…

Regards,  
// NaHi  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRRaUyx9L2jg5EEGlAQJBWwf/dW9efnhfaQ5tP1xGqA1kyVKJdYBHZuaG  
/NtMjC0wnGikIINe+k/cutMFWOtS7c1oCYaPd4hQEQGxkzMvRI7KpQsUJsC6Dana  
qoLGeKGdTK43P41Hc6IUkQp97927pTfh5dnbPwm2hXUY5JUM4+jf707+8skN843r  
Q3T8FCdJ8IHNHKVETjcxNgJELi/leqG3wq5mYSUT+Utx9cDqNT1563hlHcLHGzlH  
3er/ISHlb7ACiLpV0nm4hinQBRcMh25e/v8i1JqdT187VN2sTe/LEuBmAGuwNIIs  
xrenbLg53MmhIjiC6tRwFhIFv7XsKPx6R6+WsqNL8EHJ3XHM68iQ1A==  
=3Ttf  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [September 25, 2006, 11:21am UTC](https://www.ruby-forum.com/t/soap-wsa-to/69372/3 "2006-09-25T11:21:46Z")

</div>

NAKAMURA, Hiroshi wrote:

> Hi,
> 
> You need to define a header handler for wsa:To. A sample header handler  
> is in [http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader](http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader) .  
> Please let me know in case you can create a header handler for wsa:To.  
> I want to add it as a sample of soap4r distribution for other users…

Hi, thanks for your reply. I tried adding that header, in fact I had to  
try to add the whole addressing header bit from the ws specifications on  
Microsofts site. It still didn’t work. One question I have is how do you  
add xmlns:wsa=“whatever” to the soap tag to tell it the wsa namespace?

Eventually I gave up, as the product I’m using provides a soap 1.1  
webservices bit as well, which provides less features, I used that  
instead. I’ll wait until ruby fills in this type of header  
automatically.

---

<div class="post-metadata">

**Author:** ![nuby2ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Post date:** [November 25, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/soap-wsa-to/69372/4 "2008-11-25T13:32:16Z")

</div>

Jeremy W. wrote:

> NAKAMURA, Hiroshi wrote:
> 
> > Hi,
> > 
> > You need to define a header handler for wsa:To. A sample header handler  
> > is in [http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader](http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader) .  
> > Please let me know in case you can create a header handler for wsa:To.  
> > I want to add it as a sample of soap4r distribution for other users…
> 
> Hi, thanks for your reply. I tried adding that header, in fact I had to  
> try to add the whole addressing header bit from the ws specifications on  
> Microsofts site. It still didn’t work. One question I have is how do you  
> add xmlns:wsa=“whatever” to the soap tag to tell it the wsa namespace?
> 
> Eventually I gave up, as the product I’m using provides a soap 1.1  
> webservices bit as well, which provides less features, I used that  
> instead. I’ll wait until ruby fills in this type of header  
> automatically.

Hi ,  
I need to define a wsa header tag in my soap request … i though that  
this post could help me but i can not reach the page behind the link :  
[http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader](http://dev.ctor.org/soap4r/browser/trunk/sample/soap/authheader).

can some one give me a valid link to this page.

thanks.
