Retrieving raw, unstructured data from 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 retrieve from its response unstructured, raw data.

Retrieving binary data (such as files), 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 Output, add a 'Part' of mime:content Binding Type

http rest legacy.retraw.metadataPart

Now you have three possibilties to retrieve the raw response of the Web Service invocation.

This can also be done in a 'Fault' node

Using the string Type

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

http rest legacy.retraw.stringTypeMetadata

You can then map it as usual in a Mapping.

http rest legacy.retraw.stringTypeMapping

Using the base64Binary Type

If you want to retrieve raw binary data, such as a file for instance, and store it in a table, use the base64Binary Type.

http rest legacy.retraw.binary64TypeMetadata

You can then map it as usual in a Mapping.

http rest legacy.retraw.binary64TypeMapping

Using the anyUri Type

If you want to store the output in a file, use the anyUri Type.

http rest legacy.retraw.anyUriTypeMetadata

At invocation, the content of the response will be automatically stored in a file, created in the Runtime temporary directory.

To retrieve the exact file name and path, you can map this field to a target table.

The file’s path will then be stored in this table.

http rest legacy.retraw.anyUriTypeMapping