uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

method(String method, Class<T> c, Object requestEntity) method

Description

This method invokes an HTTP method. The method(String method, Class<T> c, Object requestEntity) method does not include any entity in the request, but receives a response entity.

Syntax

public <T> T method(String method,

Class<T> c,

Object requestEntity)

throws UniformInterfaceException

Parameters

method
This is an HTTP method.

c
This is the type of an HTTP response entity.

requestEntity
This is an HTTP request entity.

Return value

The method returns the object of the specified type.

Exception

UniformInterfaceException
This exception is thrown if any of the following conditions is fulfilled. The error message KDJJ18888-E is output to the log.
  • If the status code of the HTTP response is 204
  • If the status code of the HTTP response is 300 or more and the c parameter is not of the ClientResponse type

Notes