You can create Web services from most Nucleus methods, both from components ATG provides and components that you write. There are, however, some methods that cannot be exposed as valid Web services. The Web Service Creation Wizard will not create Web services from these methods. In particular, it enforces the following restrictions by preventing you from selecting these methods:
You cannot create a Web service from any method that has a parameter or return type that is an abstract data type (such as a
Map
,Collection
,Interface
, abstract class, or an object with abstract data type properties).You cannot create a Web service from any method that has a parameter or return type that is a wrapper class for a primitive data type. The prohibited classes are
Byte
,Boolean
,Character
,Integer
,Short
,Long
,Float
, andDouble
. Note, however, that methods that use actual primitives are valid. If there is a method that you want to expose that has one of these wrapper classes as a parameter or return type, you can either rewrite the method to use a primitive instead (if the method’s class is your own custom code), or else subclass the method’s class (if it is a class provided by ATG) and overload the method with a version that uses primitives.
In addition, you cannot create a Web service from a method that has the same name and signature as any of the methods of atg.webservice.ManagedComponentProperties
or java.lang.Object
. Attempting to do so results in a naming conflict, because the service implementation class of each Web service subclasses atg.webservice.ManagedComponentProperties
, which subclasses java.lang.Object
. Note that the wizard does not prevent you from selecting these methods, but when you try to generate a Web service, an exception is thrown and the service generation fails.