public class OpenWebServiceComponentImpl extends AbstractManagedComponentImpl implements OpenWebServiceComponent
SOAPElement
request and return a SOAPElement
response. By extending the AbstractManagedComponentImpl
,
this component implementation only deals with who main actions. It parses the request, and it maps it to
an interface and a set of request properties to execute a service command. The logic to handle transaction
management is performed by the superclass which will call the appropriate extensions for decision management and
response processing. The end result will be to execute the controller command and call the composition
service to execute a JSP
that will generate the responding XML
. The responding
XML
from the composition service will be wrapped in the SOAPElement
as the response
of the web service request.Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
DEVICE_FORMAT
The device format for web service requests.
|
static java.util.Vector |
DEVICE_FORMAT_VECTOR
The vector representing the device format id for web service responses views.
|
static java.lang.String |
KEY_SUCCESS
The response property key to indicate whether processing was successful or a failure.
|
static java.lang.String |
REQUEST_DOCUMENT_PARAM
Constant representing the key used in the request parameters of the JSP
that will have the original XML element of the request.
|
static java.lang.String |
RESPONSE_ONLY_PARAM
Constant representing that the purpose of the service request
is just to present information and no business logic needs to be
executed.
|
static java.lang.String |
WEBSERVICE_MESSAGE_MAPPER
The message mapper used by the web service implementation.
|
Constructor and Description |
---|
OpenWebServiceComponentImpl()
This is the default constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
javax.xml.soap.SOAPElement |
executeService(javax.xml.soap.SOAPElement soapElementRequest)
This method invokes the web service request by processing the
SOAPElement request. |
javax.xml.soap.SOAPElement |
getSOAPElementRequest()
This method returns the
SOAP element associated with the web service request. |
javax.xml.soap.SOAPElement |
getSOAPElementResponse()
This method returns the response of the web service request in the form of a
SOAP
element. |
javax.xml.soap.SOAPEnvelope |
getSOAPEnvelope()
This method returns the
SOAP envelope associated with the web service request. |
static TypedProperty |
mergeMaps(TypedProperty initialMap,
TypedProperty additionalMap)
This method merges the source parameters with the initial parameters.
|
void |
setSOAPElementRequest(javax.xml.soap.SOAPElement soapElementRequest)
This method sets the
SOAP element that represents the request of the web service. |
void |
setSOAPElementResponse(javax.xml.soap.SOAPElement soapElementResponse)
This method sets the
SOAP element that represents the response of the web service. |
executeServiceCommand
public static final java.lang.Integer DEVICE_FORMAT
public static final java.util.Vector DEVICE_FORMAT_VECTOR
public static final java.lang.String WEBSERVICE_MESSAGE_MAPPER
public static final java.lang.String REQUEST_DOCUMENT_PARAM
public static final java.lang.String RESPONSE_ONLY_PARAM
public static final java.lang.String KEY_SUCCESS
public OpenWebServiceComponentImpl()
public final javax.xml.soap.SOAPElement executeService(javax.xml.soap.SOAPElement soapElementRequest) throws ServiceException
SOAPElement
request.
It determines the corresponding interface and the request parameters to which the request can be converted.
This conversion is performed by a plugable message mapper. It will accept an XML
element
object and return the name/value pair representation of the request. Once the conversion is complete, the
executeServiceCommand
method is called. It will invoke the controller command which will
call out the appropriate response methods to generate the response. After execution, the response
SOAPElement
will be returned.executeService
in interface OpenWebServiceComponent
soapElementRequest
- The message of the request that needs to be processed. This
is the part of the SOAP
request that has been mapped in the JAX-RPC
mapping as
the content of the message.SOAPElement
.ServiceException
- Thrown if there is a generic processing where the open web service component
cannot recover.OpenWebServiceComponent.executeService(javax.xml.soap.SOAPElement)
public static TypedProperty mergeMaps(TypedProperty initialMap, TypedProperty additionalMap)
initialMap
- The initial map that contains the values.additionalMap
- The additional map from which to add elements that do not exist in the initial map.Map
objects.public javax.xml.soap.SOAPElement getSOAPElementRequest()
SOAP
element associated with the web service request.
This is the original request object that may be referenced later on during the processing.SOAP
element that represents the request.public javax.xml.soap.SOAPElement getSOAPElementResponse()
SOAP
element.SOAP
element that represents the response of the
web service request.public void setSOAPElementRequest(javax.xml.soap.SOAPElement soapElementRequest)
SOAP
element that represents the request of the web service.soapElementRequest
- The SOAP
element request.public void setSOAPElementResponse(javax.xml.soap.SOAPElement soapElementResponse)
SOAP
element that represents the response of the web service.soapElementResponse
- The SOAP
element response.public javax.xml.soap.SOAPEnvelope getSOAPEnvelope()
SOAP
envelope associated with the web service request.
This is the original request object that may be referenced later on during the processing.SOAP
envelope that represents the request.