webMethods Microsoft Package 9.0 | webMethods Package for Microsoft .NET Documentation | webMethods Package for Microsoft .NET Installation and User’s Documentation | Using Designer with the webMethods Microsoft Package | Invoking a .NET Service from Designer | Marshalling Data
 
Marshalling Data
Marshalling is the process of packing one or more items of data into a message buffer prior to transmitting that message buffer over a communication channel.
If Integration Server were to call a .NET method and it returned an object, such as a SQL connection, Integration Server could not process the object because it has meaning only within .NET. There are two ways to marshall data across the division between Integration Server and .NET. The first way is to use a reference ID, or an instance ID. Instead of bringing the object over, Integration Server assigns an ID. If it is necessary to make another method call that uses that object as an input, Integration Server uses the reference ID. If you want to keep using the same object, such as SQL connection, you should use the reference ID. Note that the reference ID is valid only for the same application domain.
The other way to marshall data is by passing XML. .NET has a built-in XML serializer that takes that object, examines it, and turns it into an XML string. Integration Server can manipulate the XML string and modify data, and then use that XML string as input to another method. If you need to manipulate the object in Java in some way, use XML, but you should be aware of the possible drawbacks. The use of XML is inefficient because you are passing a large string instead of a single ID. Also you need to be careful in designing the manipulation of data within Integration Server because the .NET XML serializer may create an invalid object upon its return. For information on how to choose the marshalling type, see Running a .NET Service in Designer next in this chapter.