!--a11y-->
Creating a Web Service with
Attachments 
This section describes how you add an attachment to your Web service.

Only String and byte[] type parameters are supported for sending as attachments.
· Endpoint implementation
· VI and WSD files for the endpoint
...
1. Select the EJB Module project and choose Web Service Deployment Descriptor in the context menu.

2. In the window that is displayed, highlight Web Service Configurations and choose Add. Enter the required information for creating your Web service and choose Finish.

3. From the Web Service Configurations tree, select your Web service and choose Add to create a new WS configuration. In the Transport Binding menu, select HTTP SOAP with Attachments and choose Finish.

4. Open the configuration that you have created and select Attachments.
On the left-hand side, there are tabs named after the operations. For each operation, Input and Output subtabs are available, listing “in” and “out” parameters. If you want a parameter to be sent as an attachment, select the checkbox of that parameter.
a. In the Content Type field, enter the type of the attachment.
This value will be used in the WSDL as well as in the HTTP message. By default, for byte[] parameters this type is application/octetstream and for String parameters – text/plain.
b. In the Content Transfer Encoding field (available only for outgoing parameters), enter the encoding of the attachment data in the message returned by the server. By default, binary is used for byte[] and 8bit for String.
Configuring Incoming Parameter

Configuring Outgoing Parameter

5. Choose Save.
