com.mycompany.myproject.capi
Class CAPI

java.lang.Object
  extended byorg.xins.client.AbstractCAPI
      extended bycom.mycompany.myproject.capi.CAPI

public final class CAPI
extends AbstractCAPI

Stub for the myproject API.


Constructor Summary
CAPI(Descriptor descriptor)
          Constructs a new CAPI object, using the specified Descriptor.
CAPI(PropertyReader properties)
          Constructs a new CAPI object for the specified API from a set of properties.
CAPI(PropertyReader properties, String apiName)
          Constructs a new CAPI object for the specified API from a set of properties, specifying the API name to assume.
 
Method Summary
 MyFunctionResult callMyFunction(Gender.Item gender, String personLastName)
          Calls the MyFunction function with the specified parameters.
 MyFunctionResult callMyFunction(MyFunctionRequest request)
          Calls the MyFunction function using the specified request object.
 String getXINSVersion()
          Returns the version of XINS used to generate this CAPI class.
 
Methods inherited from class org.xins.client.AbstractCAPI
getAPIName, getAPISpecification, getXINSCallConfig, setXINSCallConfig
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CAPI

public CAPI(PropertyReader properties)
     throws IllegalArgumentException,
            MissingRequiredPropertyException,
            InvalidPropertyValueException
Constructs a new CAPI object for the specified API from a set of properties.

Parameters:
properties - the properties to create a CAPI object for, cannot be null.
Throws:
IllegalArgumentException - if properties == null.
MissingRequiredPropertyException - if a required property is missing in the specified properties set.
InvalidPropertyValueException - if one of the properties in the specified properties set is used to create a CAPI instance but its value is considered invalid.

CAPI

public CAPI(PropertyReader properties,
            String apiName)
     throws IllegalArgumentException,
            MissingRequiredPropertyException,
            InvalidPropertyValueException
Constructs a new CAPI object for the specified API from a set of properties, specifying the API name to assume.

Parameters:
properties - the properties to create a CAPI object for, cannot be null.
apiName - the name of the API, cannot be null and must be a valid API name.
Throws:
IllegalArgumentException - if properties == null || apiName == null or if apiName is not considered to be a valid API name.
MissingRequiredPropertyException - if a required property is missing in the specified properties set.
InvalidPropertyValueException - if one of the properties in the specified properties set is used to create a CAPI instance but its value is considered invalid.

CAPI

public CAPI(Descriptor descriptor)
     throws IllegalArgumentException,
            UnsupportedProtocolException
Constructs a new CAPI object, using the specified Descriptor.

Parameters:
descriptor - the descriptor for the service(s), cannot be null.
Throws:
IllegalArgumentException - if descriptor == null.
UnsupportedProtocolException - if any of the target descriptors specifies an unsupported protocol (since XINS 1.1.0).
Method Detail

callMyFunction

public MyFunctionResult callMyFunction(MyFunctionRequest request)
                                throws IllegalArgumentException,
                                       UnacceptableRequestException,
                                       GenericCallException,
                                       HTTPCallException,
                                       NoVowelException,
                                       XINSCallException
Calls the MyFunction function using the specified request object.

Description: A simple function that return a "hello" message to the person.

Generated from function specification version 1.8.

Parameters:
request - the request, cannot be null.
Returns:
the result, not null.
Throws:
IllegalArgumentException - if request == null.
UnacceptableRequestException - if the request is considered to be unacceptable; this is determined by calling request.checkParameters().
GenericCallException - if the first call attempt failed due to a generic reason and all the other call attempts (if any) failed as well.
HTTPCallException - if the first call attempt failed due to an HTTP-related reason and all the other call attempts (if any) failed as well.
NoVowelException - if the first call attempt failed due to the error code NoVowel being returned by the other end; and all the other call attempts (if any) failed as well; note that this exception is derived from XINSCallException, so if that one is caught, then this one is also caught.
XINSCallException - if the first call attempt failed due to a XINS-related reason and all the other call attempts (if any) failed as well.

callMyFunction

public MyFunctionResult callMyFunction(Gender.Item gender,
                                       String personLastName)
                                throws GenericCallException,
                                       HTTPCallException,
                                       XINSCallException
Calls the MyFunction function with the specified parameters.

Description: A simple function that return a "hello" message to the person.

Generated from function specification version 1.8.

Parameters:
gender - the gender of the person. Cannot be null.
personLastName - the last name of the person. Cannot be null.
Returns:
the result, not null.
Throws:
GenericCallException - if the first call attempt failed due to a generic reason and all the other call attempts (if any) failed as well.
HTTPCallException - if the first call attempt failed due to an HTTP-related reason and all the other call attempts (if any) failed as well.
XINSCallException - if the first call attempt failed due to a XINS-related reason and all the other call attempts (if any) failed as well.

getXINSVersion

public String getXINSVersion()
Returns the version of XINS used to generate this CAPI class.

Returns:
the version as a String, e.g. "2.0-rc2-dev"; never null.