IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Integrating with web services, Java and databases > Create outbound integrations > Integrating with web services

Serialization of IBM BPM objects for use in web services

You can add metadata to IBM BPM objects to control how those objects are serialized into XML elements in a SOAP request for web services.

When sending complex types as input parameters to web services, IBM BPM often needs hints as to how to structure the data. These methods are built on the structure because a structure is, by definition, a Complex type.

Serializing IBM BPM objects for use in web services is primarily for advanced users, and is now required only when using Record objects with web services instead of the generated types.

The following methods have been added to the tw.object.Record() object to assist in forming the SOAP request:


Example

You are passing an object of type NameUpdateRequest as an argument to a web service. This object is defined in the namespace http://www.lombardisoftware.com/schemas/NameUpdateRequest . The NameUpdateRequest object contains two properties, First (string) and Last (string).

Following is example code to generate the XML that is part of the SOAP call:

<# out = new tw.object.Record(); out.setSOAPElementNS("http://www.lombardisoftware.com/schemas/ NameUpdateRequest"); out.setSOAPElementName("NameUpdateRequest"); out.defineSOAPProperty("First", "http://www.w3.org/2001/ XMLSchema", "string", false, ""); out.defineSOAPProperty("Last", "http://www.w3.org/2001/ XMLSchema", "string", false, ""); out.First = "John"; out.Last = "Smith"; #>

This generates the following XML element:

<NameUpdateRequest xmlns="http://www.lombardisoftware.com/schemas/ NameUpdateRequest"> <first xmlns="">John</first> <last xmlns="">Smith</last> </NameUpdateRequest>

Create outbound integrations to web services