# Web Services problem: URI library / address location

**URL:** <https://www.ruby-forum.com/t/web-services-problem-uri-library-address-location/106018>\
**Category:** Ruby\
**Created:** [June 5, 2007, 6:39pm UTC](https://www.ruby-forum.com/t/web-services-problem-uri-library-address-location/106018 "2007-06-05T18:39:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Alphen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@David\_Alphen](https://www.ruby-forum.com/u/David_Alphen)\
**Post date:** [June 5, 2007, 6:39pm UTC](https://www.ruby-forum.com/t/web-services-problem-uri-library-address-location/106018/1 "2007-06-05T18:39:04Z")

</div>

Hi,

When I use address location in my wsdl without http:// and with a port  
like  
:

my.location:7800

in

\<wsdl:service name=“WebServices”\>  
\<wsdl:port name=“WebServicesPort” binding=“aws:WebServicesBinding”\>  
\<soap:address location=“my.location:7800”/\>  
\</wsdl:port\>  
\</wsdl:service\>

I have an error from C:\ruby\lib\ruby\site\_ruby\1.8\http-access2\http.rb

from the function

def create\_query\_uri(uri, query)  
path = uri.path.dup  
path = ‘/’ if path.empty?  
query\_str = nil

The error is : Exception `TypeError’ at  
C:/ruby/lib/ruby/site\_ruby/1.8/http-access2/http.rb:270 - can’t dup  
NilClass

because uri.path returns nil.

So is there a way to use that kind of location or is it a Ruby lack?  
Thanks.

---

<div class="post-metadata">

**Author:** ![David\_Alphen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@David\_Alphen](https://www.ruby-forum.com/u/David_Alphen)\
**Post date:** [June 6, 2007, 8:55am UTC](https://www.ruby-forum.com/t/web-services-problem-uri-library-address-location/106018/2 "2007-06-06T08:55:15Z")

</div>

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

Hi,

David Alphen wrote:

> \</wsdl:port\>  
> \</wsdl:service\>

soap:address requires an URI so you must supply ‘http://’, ‘https://’,  
etc. here. Is there any reason why you can’t do that?

Anyway, http-access2 should raise more friendly error message.

Regards,  
// NaHi

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.5 (Cygwin)

iQEVAwUBRmZZxB9L2jg5EEGlAQIc4Qf/SDug5hWZVnhDVe06akswkTTwVz/aOPY6  
g6TJRAbgrflEPy1MaNi6aS4/huGFrmapL+0hrCtGR0HJbnsmY8bxvLOyr9NFgkBQ  
Ro+xg+22ee2I/UY/sAnOhCbDv8NrDHcJia8vfkS45owih1pr4Wgfv0xpvgsRoRXE  
F7ibi0nsXpW4m0VF1I51yUyz3gxbBRildme7jHB9xrQ02qgb6F2UeMK2ls68m8gx  
mizFMdHSMpDlaEbOIgAmGezvg1GewWB7IisWpAnCVCZ655NeWcke5Q4eCe6g12p7  
VsnWp38NIXciJv4ELa2+Y1kKEkBCtqcVBEC0ZKj/r21HWz7QUKK+Zw==  
=pJyl  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![David\_Alphen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@David\_Alphen](https://www.ruby-forum.com/u/David_Alphen)\
**Post date:** [June 6, 2007, 10:51am UTC](https://www.ruby-forum.com/t/web-services-problem-uri-library-address-location/106018/3 "2007-06-06T10:51:28Z")

</div>

> soap:address requires an URI so you must supply ‘http://’, ‘https://’,  
> etc. here. Is there any reason why you can’t do that?

I’ve just check the W3C documentation for the wsdl syntax (  
[Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language](http://www.w3.org/TR/wsdl)) and I think it is my mistake. The URI must  
have a  
scheme: http:// https:// ftp:// mailto:// …

So we have to modify our soap address location so that we can access  
them  
through http protocol.

Cheers,
