com.ibm.commerce.webservices

Class OpenWebServiceComponentImpl

  • All Implemented Interfaces:
    BaseComponent, OpenWebServiceComponent


    public class OpenWebServiceComponentImpl
    extends AbstractManagedComponentImpl
    implements OpenWebServiceComponent
    This class is an implementation of the open web service component. It will accept any 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.
    • Field Summary

      Fields 
      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.
      • Fields inherited from class com.ibm.commerce.component.BaseComponentImpl

        KEY_CMD_STOREID
    • Constructor Summary

      Constructors 
      Constructor and Description
      OpenWebServiceComponentImpl()
      This is the default constructor for this class.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class com.ibm.commerce.component.BaseComponentImpl

        getContextService
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEVICE_FORMAT

        public static final java.lang.Integer DEVICE_FORMAT
        The device format for web service requests.
      • DEVICE_FORMAT_VECTOR

        public static final java.util.Vector DEVICE_FORMAT_VECTOR
        The vector representing the device format id for web service responses views.
      • WEBSERVICE_MESSAGE_MAPPER

        public static final java.lang.String WEBSERVICE_MESSAGE_MAPPER
        The message mapper used by the web service implementation.
      • REQUEST_DOCUMENT_PARAM

        public static final 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.
      • RESPONSE_ONLY_PARAM

        public static final 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. In this case the command will not be executed but the standard response handling will still apply.
      • KEY_SUCCESS

        public static final java.lang.String KEY_SUCCESS
        The response property key to indicate whether processing was successful or a failure.
    • Constructor Detail

      • OpenWebServiceComponentImpl

        public OpenWebServiceComponentImpl()
        This is the default constructor for this class. It calls the constructor from the superclass.
    • Method Detail

      • executeService

        public final javax.xml.soap.SOAPElement executeService(javax.xml.soap.SOAPElement soapElementRequest)
                                                        throws ServiceException
        This method invokes the web service request by processing the 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.
        Specified by:
        executeService in interface OpenWebServiceComponent
        Parameters:
        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.
        Returns:
        The response of the web service in the format of a SOAPElement.
        Throws:
        ServiceException - Thrown if there is a generic processing where the open web service component cannot recover.
        See Also:
        OpenWebServiceComponent.executeService(javax.xml.soap.SOAPElement)
      • mergeMaps

        public static TypedProperty mergeMaps(TypedProperty initialMap,
                                              TypedProperty additionalMap)
        This method merges the source parameters with the initial parameters. If the property already exists in the initial parameters, it will not be overwritten with the value in the additional parameters.
        Parameters:
        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.
        Returns:
        The resulting map of combining the two Map objects.
      • getSOAPElementRequest

        public javax.xml.soap.SOAPElement getSOAPElementRequest()
        This method returns the SOAP element associated with the web service request. This is the original request object that may be referenced later on during the processing.
        Returns:
        This method returns the SOAP element that represents the request.
      • getSOAPElementResponse

        public javax.xml.soap.SOAPElement getSOAPElementResponse()
        This method returns the response of the web service request in the form of a SOAP element.
        Returns:
        This method returns the SOAP element that represents the response of the web service request.
      • setSOAPElementRequest

        public void setSOAPElementRequest(javax.xml.soap.SOAPElement soapElementRequest)
        This method sets the SOAP element that represents the request of the web service.
        Parameters:
        soapElementRequest - The SOAP element request.
      • setSOAPElementResponse

        public void setSOAPElementResponse(javax.xml.soap.SOAPElement soapElementResponse)
        This method sets the SOAP element that represents the response of the web service.
        Parameters:
        soapElementResponse - The SOAP element response.
      • getSOAPEnvelope

        public javax.xml.soap.SOAPEnvelope getSOAPEnvelope()
        This method returns the SOAP envelope associated with the web service request. This is the original request object that may be referenced later on during the processing.
        Returns:
        This method returns the SOAP envelope that represents the request.