Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop SCA composites > Specify bindings in an SCA environment


Route HTTP requests to an SCA service when using an external web server

If you are using an external web server to route requests to an SCA service that is exposed over the SCA web services, Atom or HTTP binding, define the endpoints of the SCA service to the Web Server HTTP plug-in.

Requests to services that are exposed over the SCA binding that use the proxy server type provided with WAS are routed over the specified proxy by default.

However, if the configuration uses an external web server with the HTTP plug-in for WAS and you want requests to services that are exposed over the SCA binding to route through the external web server, define the endpoints for the SCA service by adding the service URL patterns to the plugin-cfg.xml file for the Application Server.


Procedure

  1. Obtain the URL patterns for each service.

    You can obtain the URL patterns in one of the following ways:

    • Use the message, which is located in the server log file, that indicates the web application is successfully created.

      During service startup, for each service that is exposed over an SCA binding, a dynamic web application is created and configured with the URI of the service. This process is described as an informational message within the server log file as shown in the following example.

      In the following example message, the helloworldws composition unit contains the AsyncTranslatorService service, which is exposed over the SCA web service binding. This message provides the necessary context root and URL pattern for the service, which add to the plugin-cfg.xml file.

      /AsynchTranslatorComponent/AsynchTranslatorService/*
      
      [[11/18/08 10:10:52:156 EST] 00000070 servlet I com.ibm.ws.webcontainer.servlet.ServletWrapper init
      SRVE0242I: [helloworldws]
      [/AsynchTranslatorComponent/AsynchTranslatorService]
      [SCA_WS_BINDING_IMPL_CLASS_PLACEHOLDER]: Initialization successful.
      [11/18/08 10:10:52:156 EST] 00000070 WASAxis2Exten I
      WSWS7037I: The /* URL pattern was configured for the SCA_WS_BINDING_IMPL_CLASS_PLACEHOLDER servlet located
      in the SCAWSBindSERV_AsynchTranslatorComponent_AsynchTranslatorService.war web module.
      
    • Use the warinfo.props WebSphere configuration repository file.

      For each composition unit that has at least one service or reference exposed over the binding, a single warinfo.props file is generated during deployment. This file contains configuration information for each dynamic web application that starts during the server startup process.

      The warinfo.props file is located in, for example, the $PROFILE_ROOT/SOAAppSrv01\config\cells\ cell1\cus\helloworldws\cver\BASE\meta\warinfo.props directory.

      The file contains an entry for each dynamic web application. For example:

      #
      #Tue Nov 18 10:10:37 EST 2008
      SCAWSBindSERV_AsynchTranslatorComponent_
      AsynchTranslatorService.war=AsynchTranslatorComponent/
      AsynchTranslatorService\:default_host\:false\:false\:false
      
      The value immediately following the war= and ending prior to the \: is the context root for the web application. In this example, the context root is AsynchTranslatorComponent/AsynchTranslatorService.

  2. Add the values for each dynamic web application to the plugin-cfg.xml file.

    After obtaining all of the entries from each of the services to define to the proxy server, add the values to the plugin-cfg.xml file. It is important that you add the URI to the specific UriGroup that contains a server and hosts the proxied service because multiple UriGroups might exist. If this process is not done correctly, an HTTP 404 message results.

    In the following example, see the AsynchTranslatorComponent/AsynchTranslatorService entry that has been added to the list of URI patterns:

    <UriGroup Name="default_host_Cluster2_URIs"> ?
    <Uri AffinityCookie="JSESSIONID"
    AffinityURLIdentifier="jsessionid"
    Name="/IBM_WS_SYS_RESPONSESERVLET/*" /> ?
    <Uri AffinityCookie="JSESSIONID"
    AffinityURLIdentifier="jsessionid"
    Name="/IBM_WS_SYS_RESPONSESERVLET/*.jsp" /> ?
    <Uri AffinityCookie="JSESSIONID"
    AffinityURLIdentifier="jsessionid"
    Name="/IBM_WS_SYS_RESPONSESERVLET/*.jsv" /> ?
    <Uri AffinityCookie="JSESSIONID"
    AffinityURLIdentifier="jsessionid"
    Name="/IBM_WS_SYS_RESPONSESERVLET/*.jsw" /> ?
    <Uri AffinityCookie="JSESSIONID"
    AffinityURLIdentifier="jsessionid"
    Name="/IBM_WS_SYS_RESPONSESERVLET/j_security_check" /> ?
    <Uri AffinityCookie="JSESSIONID"
    AffinityURLIdentifier="jsessionid"
    Name="/IBM_WS_SYS_RESPONSESERVLET/ibm_security_logout" />
    ?  
    <Uri AffinityCookie="JSESSIONID"
    AffinityURLIdentifier="jsessionid"
    Name="/AsynchTranslatorComponent/AsynchTranslatorService/*" />
    </UriGroup> 


Results

You have configured the endpoints for SCA services to route requests through an external web server configured with the HTTP plug-in for WAS
Configure the SCA web services binding
Use Atom bindings in SCA applications
Use HTTP bindings in SCA applications


Related


plugin-cfg.xml file
Service Component Architecture specifications and APIs

+

Search Tips   |   Advanced Search