Argument Types
Almost any public Java or .NET class with a public, no-argument constructor can be made into a Service with little or no modification. Each public method of the class can be accessed remotely through a Service operation. The input and output arguments must be either Serializable objects, support setter-getter interfaces in Java (beans) or public data members in .NET, or be pure strings — accessible as String in Java, string in .NET, std::string in C++, or (char*, int) in C. A dynamic library can be made into a Service if the functions exported as Service operations follow a simple string interface convention. The characteristics of each argument calling type are:
|
•
|
Serializable — Services can use rich objects with serialization being accomplished through .NET and Java-specific data protocols. This is the simplest and most efficient way of exchanging data, but disallows interoperability between languages; for example, Java clients can only use Java Services and .NET clients can only use .NET Services. |
|
•
|
XML Serializable — .NET and Java objects can be written in such a way that they can be used with each other by converting them to XML. |
|
•
|
Strings — This approach allows for maximum interoperability among clients and Services implemented in different languages. For example, .NET clients can talk to Java or C++/C Services, and so on. Also, automatic string conversion allows Java and .NET Services with non-string arguments to be called using String arguments. |