Object Conversion from Strings and Byte Arrays
Java and .NET Services automatically attempt to convert String/byte[]s to and from Objects when necessary. This is useful when calling these Services from a different language, or when using Service Runners from Batches.
If an argument is not a String or byte[], and it is passed in as such, an attempt is made to convert it. If the data is a byte[], it is first converted to a String. Then the String is converted to the Object as follows:
|
Input Argument |
String Argument-to-Object Conversion |
|
Primitives |
The primitive wrapper class’s parse method |
|
|
|
|
|
|
|
|
Uses the parse method from the DocumentBuilder given by |
|
|
|
|
Other |
If the class has a constructor that takes a single |
If the return value is not a String/byte[], and the client is not of the same language as the Service, the returned value is converted to a String, as follows:
|
Return Type |
Returned Object-to-String Conversion |
|
Primitives |
The object-equivalent |
|
|
|
|
|
|
|
|
The transform method from the Transformer given by |
|
|
|
|
Other |
The |