Entering content frame

Procedure documentation Creating a Web Service with Attachments Locate the document in its SAP Library structure

Use

This section describes how you add an attachment to your Web service.

Caution

Only String and byte[] type parameters are supported for sending as attachments.

Prerequisites

·        Endpoint implementation

·        VI and WSD files for the endpoint

Procedure

...

       1.      Select the EJB Module project and choose Web Service Deployment Descriptor in the context menu. 

This graphic is explained in the accompanying text

       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.

This graphic is explained in the accompanying text

       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.

This graphic is explained in the accompanying text

       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

This graphic is explained in the accompanying text

 

Configuring Outgoing Parameter

This graphic is explained in the accompanying text

       5.      Choose Save.

Leaving content frame