The datatypes that you use for parameters and return types in your Java Service depend on whether you plan to deploy to Service Container or to the EAServer WST container.
If you are deploying to the Service Container runtime server, you must limit the methods in the exposed service interface to use only those types supported by Service Container. To call Java methods that use unsupported types, create a wrapper method using the allowed datatypes. Expose the wrapper method in the service interface and code the wrapper method to call the Java method that uses unsupported types.
The table below lists the Java datatypes that are predefined for use in the Service Container runtime server. Java datatypes that are objects (not primitive types) map to nullable XML types, meaning that the value can be null at runtime.
Java datatype |
---|
boolean |
byte |
double |
float |
int |
long |
short |
java.lang.Boolean |
java.lang.Byte |
java.lang.Double |
java.lang.Float |
java.lang.Integer |
java.lang.Long |
java.lang.Short |
java.lang.String |
java.math.BigInteger |
java.math.BigDecimal |
java.util.Calendar |
java.util.Date |
javax.xml.namespace.QName |
If you are deploying to the EAServer WST runtime server, you can use additional Java datatypes in the service interface. However, if you use types that are not listed in the table below, you must configure type mappings in the EAServer Services Package Profile.
Java datatype |
---|
boolean |
byte |
double |
float |
int |
long |
short |
java.lang.Boolean |
java.lang.Byte |
java.lang.Double |
java.lang.Float |
java.lang.Integer |
java.lang.Long |
java.lang.Short |
java.lang.String |
java.awt.Image |
java.math.BigInteger |
java.math.BigDecimal |
java.net.URI |
java.util.ArrayList |
java.util.Calendar |
java.util.Collection |
java.util.Date |
java.util.HashMap |
java.util.Hashtable |
java.util.Map |
java.util.Vector |
javax.activation.DataHandler |
javax.mail.internet.MimeMultipart |
javax.xml.namespace.QName |
javax.xml.transform.Source |
org.apache.axis.attachments.OctetStream |
org.apache.axis.types.Day |
org.apache.axis.types.Duration |
org.apache.axis.types.Entities |
org.apache.axis.types.Entity |
org.apache.axis.types.Id |
org.apache.axis.types.IDRef |
org.apache.axis.types.Language |
org.apache.axis.types.Month |
org.apache.axis.types.MonthDay |
org.apache.axis.types.Name |
org.apache.axis.types.NCName |
org.apache.axis.types.NegativeInteger |
org.apache.axis.types.NMToken |
org.apache.axis.types.NMTokens |
org.apache.axis.types.NonNegativeInteger |
org.apache.axis.types.NonPositiveInteger |
org.apache.axis.types.NormalizedString |
org.apache.axis.types.Notation |
org.apache.axis.types.PositiveInteger |
org.apache.axis.types.Schema |
org.apache.axis.types.Time |
org.apache.axis.types.Token |
org.apache.axis.types.UnsignedByte |
org.apache.axis.types.UnsignedInt |
org.apache.axis.types.UnsignedLong |
org.apache.axis.types.UnsignedShort |
org.apache.axis.types.URI |
org.apache.axis.types.Year |
org.apache.axis.types.YearMonth |
org.w3c.dom.Document |
org.w3c.dom.Element |
Java classes in the default Java package can be used as return values or parameters. Classes must belong to a named Java package.
Input-output parameters and holder classes
Java service operations can have input-output parameters. An operation may have one output parameter that corresponds to the return value of the corresponding Java method.
Java methods that are exposed as service operations cannot use JAX-RPC holder classes, that is, Java classes that implement the javax.xml.rpc.holders.Holder interface. Holder classes allow passing and returning values for input and output parameters. If your Java service calls services of other types, you may see holder types used in the Java proxy methods for the service that you are invoking.
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.