createWSGWProxyService command

Use the createWSGWProxyService command to set the gateway to act as a proxy for your service, then use JAX-RPC handlers to set the endpoints for incoming request messages for the service.

You can create a new proxy service configuration by using the wsadmin tool as described in this topic, or by using the administrative console as described in Creating a new proxy service configuration.

如果要執行這個指令,請使用 wsadmin Scripting 用戶端AdminTask 物件

[IBM i][IBM i]wsadmin Scripting 用戶端是從 Qshell 執行. [IBM i]如需相關資訊,請參閱利用 wsadmin Script 配置 Qshell 來執行 WebSphere Script.

服務整合匯流排指令有指令行說明:
  • 如需可用的閘道指令清單,以及每個指令的簡要說明,請在 wsadmin 提示下,輸入下列指令:

    print AdminTask.help('WSGateway')

  • 如需給定指令的概觀說明,請在 wsadmin 提示下,輸入下列指令:

    print AdminTask.help('command_name')

使用指令之後,請利用下列指令,儲存對主要配置所做的變更:

AdminConfig.save()

Purpose

This command creates a new ProxyService object with an associated InboundService object, and a TargetService object with an associated OutboundService object.

You then use a service integration bus-enabled web services command to add any InboundPort objects that are associated with the InboundService object. For more information, see the worked example at the end of this topic.

Target object

ObjectName of the gateway instance within which the proxy service is created.

The command creates the proxy request destination and corresponding reply destination. The proxy request destination is configured to update the reply path to add the proxy reply destination. If a destination with the specified or default names already exists, the command fails.

If a gateway service or proxy service with the same name already exists, the command fails.

If you specify the name of the proxy request destination, the proxy service destination and port destinations are created with names derived from the proxy request destination name. Otherwise, the proxy service destination and port destinations are created with names derived from the proxy service name. The proxy service destination name is created by adding "ProxyService" to the proxy request destination or proxy service name. Each proxy port destination is then named after the proxy service destination, followed by a colon (":"), followed by the port name, followed by "Port". If a destination with any of these names already exists, the command fails.

Either specify the node and server, or specify the cluster. If there is no messaging engine defined for the specified node and server or cluster, the command fails.

The command creates an OutboundService object, with the same name as the proxy service. This new outbound service uses the created destinations, the supplied localization, and either the default proxy WSDL location for the gateway instance or (if specified) the location of the proxy WSDL file. The new outbound service is associated with the ProxyService object.

The proxy WSDL must have only a single service element. If there are multiple ports within the single service element, an outbound port object is created for each one.

The proxy WSDL should never come from UDDI, so only a web address is supported for the default and overridden proxy WSDL location.

The command uses the proxy destination to create an InboundService object with the same name as the proxy service, and uses the default or specified proxy WSDL location as the template WSDL location.

Required parameters

-name
The proxy service name.

Conditional parameters

-node
The node in which the destinations is localized.
-server
The server in which the destinations is localized.
-cluster
The cluster in which the destinations is localized.

Optional parameters

-requestDestination
The name of the proxy request destination.
-replyDestination
The name of the proxy reply destination.
-wsdlLocation
The location of the proxy WSDL file. This is a web address.

Example

The following is a minimal example of a sequence of commands to create a fully-functional proxy service with inbound and outbound SOAP over HTTP protocol attachments:
  1. Create the proxy service, where wsgw is the gateway instance:
    • Using Jython:
      proxyService = AdminTask.createWSGWProxyService(wsgw, ["-name",
       "MyProxyService", "-node", "MyNode", "-server", "server1"])
    • Using Jacl:
      set proxyService [$AdminTask createWSGWProxyService $wsgw {-name
       "ProxyService" -node "MyNode" -server "server1"}]
  2. Get the inbound service for the gateway service, where busName is the name of the service integration bus:
    • Using Jython:
      inServiceName = AdminConfig.showAttribute(proxyService, 
       "inboundServiceName")
      inService = AdminConfig.getid("/
       SIBus:"+busName+"/SIBWSInboundService:"+inServiceName+"/")
    • Using Jacl:
      set inServiceName [$AdminConfig showAttribute $proxyService
       "inboundServiceName"]
      set inService [$AdminConfig getid 
      /SIBus:$busName/SIBWSInboundService:$inServiceName/]
  3. Add a SOAP over HTTP port, where the SOAP over HTTP 1 endpoint listener is already configured:
    • Using Jython:
      inPort = AdminTask.addSIBWSInboundPort(inPort, ["-name", "SOAPHTTPPort",
       "-endpointListener", "soaphttp1", "-node", "MyNode", "-server", "server1"])
    • Using Jacl:
      set inPort [$AdminTask addSIBWSInboundPort $inPort {-name "SOAPHTTPPort"
       -endpointListener "soaphttp1" -node "MyNode" -server "server1"}]
  4. Complete the configuration of the inbound and outbound services and ports. For example, apply JAX-RPC handlers or WS-Security.
Note:
請確定所有服務要求者都在 Proxy 服務的位址中,附加了 operationMode 查詢字串參數。這個參數值是 onewayrequestResponse,預設值是 requestResponse。 例如:
  • 對於 HTTP 作業,如果 Proxy 服務的網址是
    http://host_name:port_number/wsgwsoaphttp1/soaphttpengine
    /your_bus/ProxyService/ProxyServiceInboundPort
    發出要求的用戶端就會利用下列 URL 來指示它們是在傳送單向要求:
    http://host_name:port_number/wsgwsoaphttp1/soaphttpengine
    /your_bus/ProxyService/ProxyServiceInboundPort?operationMode=oneway
  • 對於 JMS 作業,如果 Proxy 服務的 JMS 位址是
    jms:/queue?destination=jndi_queue&connectionFactory=
    jndi_factory&targetService=your_bus/ProxyService/ProxyServiceInboundPort
    發出要求的用戶端就會利用下列 URL 來指示它們是在傳送單向要求:
    jms:/queue?destination=jndi_queue&connectionFactory=
    jndi_factory&targetService=
    your_bus/ProxyService/ProxyServiceInboundPort&operationMode=oneway

指出主題類型的圖示 參照主題



時間戳記圖示 前次更新: July 9, 2016 11:14
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rwsg_cli_proxy_new
檔名:rwsg_cli_proxy_new.html