# SOAP attachments and WSDL

**URL:** <https://www.ruby-forum.com/t/soap-attachments-and-wsdl/121348>\
**Category:** Ruby\
**Created:** [November 27, 2007, 4:21am UTC](https://www.ruby-forum.com/t/soap-attachments-and-wsdl/121348 "2007-11-27T04:21:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikisvaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@mikisvaz](https://www.ruby-forum.com/u/mikisvaz)\
**Post date:** [November 27, 2007, 4:21am UTC](https://www.ruby-forum.com/t/soap-attachments-and-wsdl/121348/1 "2007-11-27T04:21:54Z")

</div>

Hi all,

I’m doing a webservice that needs to transfer large files, so I’m using  
the SOAP::Attachment class. It works fine. However I would like to  
present a WSDL and I don’t know how to declare a function parameter as  
an attachment. The only thing useful I have found in the web suggests  
doing this

\<xsd:schema targetNamespace=“[Index of /profiles/basic/1.1/xsd](http://ws-i.org/profiles/basic/1.1/xsd)”  
xmlns:xs=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”\>  
\<xsd:simpleType name=“swaRef”\>  
\<xsd:restriction base=“xs:anyURI” /\>  
\</xsd:simpleType\>  
\</xsd:schema\>

from

[http://webservices.xml.com/pub/a/ws/2003/09/16/wsbp.html?page=last](http://webservices.xml.com/pub/a/ws/2003/09/16/wsbp.html?page=last)

it says something about using the profile in

[http://ws-i.org/profiles/basic/1.1/xsd](http://ws-i.org/profiles/basic/1.1/xsd)

I don’t know what that is, but doing:

```
  <import
      namespace="http://ws-i.org/profiles/basic/1.1/xsd"
      schemaLocation="http://ws-i.org/profiles/basic/1.1/xsd"/>

```

fails miserably as the URL

[http://ws-i.org/profiles/basic/1.1/xsd](http://ws-i.org/profiles/basic/1.1/xsd)

is forbidden for some reason.

Any suggestions?

Thanks for your time

-Miki

---

<div class="post-metadata">

**Author:** ![mikisvaz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@mikisvaz](https://www.ruby-forum.com/u/mikisvaz)\
**Post date:** [November 28, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/soap-attachments-and-wsdl/121348/2 "2007-11-28T16:14:26Z")

</div>

I’m droping attachments altogether and passing the matrix as a string,  
so don’t need this anymore. Seems like wsdl support for mime in soap4r  
is lacking, so I thought: ‘if its a pain for me, it will probably be a  
pain for the users’

Oh well…

-Miki
