Sending raw, unstructured data to a web service

This page is legacy documentation. For the current HTTP REST connector, see its dedicated section.

When invoking a Web Service, you may have the requirement to send unstructured, raw data.

Sending a file, binary data, or plain text, for instance.

This can be performed quite easily with Semarchy xDI, as explained in this article.

Metadata Configuration

As usual, design the Web Service operation with the WSDL Metadata.

Then, in the Input, add a 'Part' of mime:content Binding Type

http rest legacy.sendraw.metadataPart

Now you have three possibilties to send raw / unstructured data.

Using the string Type

If you want to send raw string data, plain text, for instance, use the string Type.

http rest legacy.sendraw.stringTypeMetadata

You can then map it as usual in a Mapping.

http rest legacy.sendraw.stringTypeMapping

Using the base64Binary Type

If you want to send raw binary data, such as a file stored in a blob column in a database, use the base64Binary Type.

http rest legacy.sendraw.base64BinaryTypeMetadata

You can then map it as usual in a Mapping.

http rest legacy.sendraw.base64BinaryTypeMapping

Using the anyUri Type

If you have a local file that you want to send with the invocation, use the the anyUri Type.

http rest legacy.sendraw.anyUriTypeMetadata

In the Mapping, set it to the file’s path to send, with an uri path, such as:

http rest legacy.sendraw.anyUriTypeMapping