If a session bean is the endpoint of a Web service, the session bean must include a remote interface. Only methods of this interface can be exposed as WS operations. The following types are not allowed anywhere in the endpoint of a Web service:
· Remote objects (EJBs)
· Classes extending into another class and implementing an interface
· Hashed table-like types
· Classes/objects that cannot be serialized
Interfaces and abstract classes that occur anywhere in an endpoint are allowed only if at least one extending class for runtime behavior is specified. For more information, refer to the section Maintaining SOAP Extensions.
Constructor methods with parameters are not included in the virtual interface of a Web service.
If you are using a session EJBs, you should use a constructor method without parameters and you should depict everything else through business methods. This applies particularly when entity beans are wrapped by session beans.
The following types from java*.packages are supported in endpoints of Web Services:
Simple Types Wrappers |
java.lang.Void java.lang.Boolean java.lang.Byte java.lang.Short java.lang.Integer java.lang.Long java.lang.Float java.lang.Double java.lang.String |
Marker Interfaces |
java.io.Serializable java.lang.Cloneable java.lang.Comparable |
Array classes |
java.util.ArrayList java.util.HashSet java.util.LinkedList java.util.List java.util.Stack java.util.Vector |
Date/Time |
java.util.Calendar java.util.Date java.util.GregorianCalendar java.sql.Date java.sql.Time |
Long numbers |
java.math.BigInteger java.math.BigDecimal |
Exception |
java.lang.Throwable java.lang.Exception java.rmi.RemoteException |
Object |
java.lang.Object |