WSDM リソース用の WebSphere Application Server モニターの作成 (非推奨)

バージョン 6.1 Feature Pack for Web Services で提供される Web Services Distributed Management (WSDM) モニター・サポートは、外部管理ソフトウェアを使用します。 しかし、WSDM 用のカスタム WebSphere® Application Server モニターを作成する方が便利です。このタスクを使用して、Java API for XML Web Services (JAX-WS) プログラミング・モデルを基にした WSDM モニターを作成します。

始める前に

非推奨の機能 (Deprecated feature) 非推奨の機能 (Deprecated feature): Web Services Distributed Management (WSDM) は、この製品では非推奨の機能です。 このタスクのトピックおよび WSDM のトピックの関連リンクは、7.0 より後のバージョンで更新される予定がありません。 WSDM を使用する代わりに、管理コンソールまたはスクリプトを使用して Web サービス・アプリケーションを管理できます。depfeat
ベスト・プラクティス ベスト・プラクティス: IBM® WebSphere Application Server は、 Java™ API for XML-Based Web Services (JAX-WS) プログラミング・モデルおよび Java API for XML-based RPC (JAX-RPC) プログラミング・モデルをサポートします。 JAX-WS は、JAX-RPC プログラミング・モデルが提供する基盤を拡張する、次世代の Web サービス・プログラミング・モデルです。戦略的 JAX-WS プログラミング・モデルを使用すると、標準ベースの注釈モデルのサポートによって、Web サービスおよび Web クライアントの開発が容易になります。JAX-RPC プログラミング・モデルとアプリケーションは引き続きサポートされますが、Web サービス・アプリケーションおよびクライアントを新規に開発する場合は、実装が容易な JAX-WS プログラミング・モデルをご利用ください。best-practices

このタスクについて

以下のステップを実行して、WSDM モニターを作成します。

手順

  1. 相対 URL を取得します。 以下の表には、製品内のサポートされる各リソースごとに Web サービス記述言語 (WSDL) ファイルを取得するために使用できる URL がリストされています。
    表 1. WSDM WSDL ファイルへの相対 URL. この URL リストを使用して、製品内のサポート対象リソースごとに Web サービス記述言語 (WSDL) ファイルを取得します。
    リソース URL
    サービス・グループ /websphere-management/services/service-group?wsdl
    アプリケーション /websphere-management/services/application?wsdl
    アプリケーション・サーバー /websphere-management/services/applicationserver?wsdl
    データ・ソース /websphere-management/services/datasource?wsdl
    Enterprise JavaBeans /websphere-management/services/ejb?wsdl
    Java 仮想マシン (Java virtual machine (JVM)) /websphere-management/services/jvm?wsdl
    サーブレット /websphere-management/services/servlet?wsdl
    WebSphere クラスター /websphere-management/services/webspherecluster?wsdl
    WebSphere ドメイン /websphere-management/services/webspheredomain?wsdl
    Web サービス /websphere-management/services/webservices?wsdl
  2. Web サービス・クライアント用のサービス・エンドポイント・インターフェース (SEI) ファイルのスケルトン・コードを作成します。 相対 URL を取得した後、WSDM WSDL ファイルに対して WSDL to Java ツールを実行して、SEI ファイルのスケルトン・コードを作成します。このタスクは、IBM Rational Application Developer を使用して実行することも、wsimport コマンド・ユーティリティーを使用して実行することもできます。 取得した WSDL ファイルに対して、wsimport ユーティリティーを実行します。
    重要: 少なくとも、サービス・グループ・リソース用の WSDL ファイルと、必要なリソースをコンパイルする必要があります。
    このステップを完了すると、サービス・プロバイダーとの通信に使用されるクライアント・コードが作成され、これが WSDM サービス・エンドポイントになります。
  3. JAX-WS WSDM クライアント用のコードを作成します。 以下の JAX-WS WSDM クライアント用サンプル・コードを確認してから、クライアント・コードの作成を開始します。 サンプル・クライアント・コードでは、リソースの統計のポーリングに適しているクライアントの完全な実装が示されています。 このコードは、WS-Addressing のリソース参照、要求処理、および応答処理のセットアップの代行に使用されます。

    サンプル WSDM JAX-WS クライアント

    import java.net.URI;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
    
    import javax.xml.bind.JAXBElement;
    import javax.xml.namespace.QName;
    import javax.xml.ws.BindingProvider;
    
    import org.oasis_open.docs.wsrf.rp_2.GetResourcePropertyResponse;
    import org.oasis_open.docs.wsrf.sg_2.EntryType;
    import org.oasis_open.docs.wsrf.sgw_2.ServiceGroupPortType;
    import org.oasis_open.docs.wsrf.sgw_2.ServiceGroupService;
    import org.w3c.dom.Element;
    
    import com.ibm.wsspi.wsaddressing.AttributedURI;
    import com.ibm.wsspi.wsaddressing.EndpointReference;
    import com.ibm.wsspi.wsaddressing.EndpointReferenceManager;
    import com.ibm.wsspi.wsaddressing.WSAConstants;
    import com.ibm.wsspi.wsaddressing.WSAddressingFactory;
    import com.ibm.xmlns.prod.websphere.management.servlet.ServletPortType;
    import com.ibm.xmlns.prod.websphere.management.servlet.ServletService;
    
    public class WsdmJaxWsClient {
    
    		static QName WAS_MBEAN_ID = new QName("http://ibm.com/2006/v1.3", "WAS_Resource_MbeanIdentifier");
    		static QName WAS_RESOURCE_ID = new QName("http://ibm.com/2006/v1.3", "WAS_Resource_MRID");
    		static QName WAS_RESOURCE_TYPE = new QName("http://ibm.com/2006/v1.3", "WAS_Resource_Type");
    		private String ServerAndHost = null;
    
    		public WsdmJaxWsClient(String serverAndHost) {
    				this.ServerAndHost = serverAndHost;
    	}
    
    	/**
    	 	 * Get a list of available resources from WSDM application
    	 */
    		public List<EntryType> getResources() throws Exception {
    				// Create service and obtain service reference
    				ServiceGroupService sgs = new ServiceGroupService();
    				ServiceGroupPortType sgp = sgs.getServiceGroupPort();
    
    		// Create wsa:Action
    				URI actionUri = new URI(
    										"http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest");
    				AttributedURI wsaAction = WSAddressingFactory
    								.createAttributedURI(actionUri);
    
    				// Create wsa:To and populate reference parameters
    				String sgServicePortURI = "http://" + ServerAndHost
    								+ "/websphere-management/services/service-group";
    				QName resourceId = new QName("http://ws.apache.org/muse/addressing",
    								"ResourceId", "muse-wsa");
    		EndpointReference wsaDestinationEpr = EndpointReferenceManager
    								.createEndpointReference(new URI(sgServicePortURI));
    				wsaDestinationEpr.setReferenceParameter(resourceId, "MuseResource-1");
    
    		// Populate requestContext
    				Map<String, Object> rc = ((BindingProvider) sgp).getRequestContext();
    				rc.put(WSAConstants.WSADDRESSING_ACTION, wsaAction);
    				rc.put(WSAConstants.WSADDRESSING_DESTINATION_EPR, wsaDestinationEpr);
    				rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
    		rc
    				.put(
    												BindingProvider.SOAPACTION_URI_PROPERTY,
    												"http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest");
    				rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, sgServicePortURI);
    
    				// Retrieve a list of available resources
    				QName entryQName = new QName("http://docs.oasis-open.org/wsrf/sg-2",
    								"Entry");
    				GetResourcePropertyResponse grpr = sgp.getResourceProperty(entryQName);
    
    				// The returned list<object> must be converted to a more meaningful type
    				List<Object> inputList = grpr.getAny();
    				List<EntryType> outputList = new ArrayList<EntryType>(inputList.size());
    
    				// Complete the element by element conversion
    				for (Object obj : inputList) {
    						JAXBElement jbe = (JAXBElement) obj;
    						EntryType entry = (EntryType) jbe.getValue();
    
    						outputList.add(entry);
    		}
    
    				return outputList;
    	}
    
    	/**
    	 	 * Read a property of specified entry
    	 */
    		public Object getResourceProperty(EntryType entry, QName property)
    						throws Exception {
    				// Create service and obtain service reference
    				ServletService rs = new ServletService();
    				ServletPortType rp = rs.getServletPort();
    
    		// Create wsa:Action
    				URI actionUri = new URI(
    										"http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest");
    				AttributedURI wsaAction = WSAddressingFactory
    								.createAttributedURI(actionUri);
    
    				// Create wsa:To and populate resource parameters
    				String servicePortURI = getResourceAddress(entry);
    				// QName resourceId = new QName("http://ws.apache.org/muse/addressing",
    				// "ResourceId", "muse-wsa");
    				EndpointReference wsaDestinationEpr = EndpointReferenceManager
    								.createEndpointReference(new URI(servicePortURI));
    				wsaDestinationEpr.setReferenceParameter(WAS_RESOURCE_ID,
    								findListMember(entry, WAS_RESOURCE_ID));
    				wsaDestinationEpr.setReferenceParameter(WAS_MBEAN_ID, findListMember(
    								entry, WAS_MBEAN_ID));
    				wsaDestinationEpr.setReferenceParameter(WAS_RESOURCE_TYPE,
    								findListMember(entry, WAS_RESOURCE_TYPE));
    
    		// Populate requestContext
    				Map<String, Object> rc = ((BindingProvider) rp).getRequestContext();
    				rc.put(WSAConstants.WSADDRESSING_ACTION, wsaAction);
    				rc.put(WSAConstants.WSADDRESSING_DESTINATION_EPR, wsaDestinationEpr);
    				rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
    		rc
    				.put(
    												BindingProvider.SOAPACTION_URI_PROPERTY,
    												"http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest");
    				rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, servicePortURI);
    
    				// Retrieve a list of available resources
    				GetResourcePropertyResponse response = null;
    				response = rp.getResourceProperty(property);
    
    		// Return the property
    		if (response != null) {
    						return ((JAXBElement) response.getAny().get(0)).getValue();
    		} else {
    			return null;
    		}
    	}
    
    		public String getResourceMBeanID(EntryType entry) {
    				return findListMember(entry, WAS_MBEAN_ID);
    	}
    
    		public String getResourceMRID(EntryType entry) {
    				return findListMember(entry, WAS_RESOURCE_ID);
    	}
    
    		public String getResourceType(EntryType entry) {
    				return findListMember(entry, WAS_RESOURCE_TYPE);
    	}
    
    	/**
    	 	 * Extract the ERPs address
    	 */
    		public String getResourceAddress(EntryType entry) {
    		if (entry == null)
    			return null;
    		else
    						return entry.getMemberServiceEPR().getAddress().getValue();
    	}
    
    	/**
    	 	 * EPRs cannot be looked up by their QName. This method does a linear search
    	 	 * of the EPR to find a particular reference parameter
    	 */
    		private String findListMember(EntryType entry, QName name) {
    
    				if (name == null || entry == null) return null;
    
    				List<Object> res = entry.getMemberServiceEPR().getReferenceParameters()
    								.getAny();
    
    				for (Object ob : res) {
    						Element e = (Element) ob;
    						if (name.getLocalPart().equals(e.getNodeName()))
    								return e.getTextContent();
    		}
    
    		return null;
    	}
    }	 
  4. WSDM モニターを作成します。 以下の例では、サーブレットをポーリングし、そのサーブレットが応答中の要求数を取得しています。

    WSDM モニター

    // Instantiate the client and instruct it to poll
    // the server at localhost:9080
    WsdmJaxWsClient wjc = new WsdmJaxWsClient(“localhost:9080”);
    		
    // Get a list of all available resources
    List<EntryType> entries = wjc.getResources();
    
    // Iterate through available resources until you find
    // a servlet resource
    EntryType servlet = null;
    for (EntryType entry: entries){
    		if ("servlet".equals(wjc.getResourceType(entry))){
    				servlet = entry;
    				System.out.println("URL " + wjc.getResourceAddress(entry));
    				System.out.println("Type " + wjc.getResourceType(entry));
    				System.out.println("MbeanID" + wjc.getResourceMBeanID(entry));
    				System.out.println("ResourceID " + wjc.getResourceMRID(entry));
    		break;
    	}
    }
    
    // Request Concurrent Requests PMI statistics from this servlet
    Object servletConcurrentRequests =
    		wjc.getResourceProperty(servlet, J2EEConstants.CONCURRENT_REQUESTS_QNAME);
    
    System.out.println(servletConcurrentRequests);	 
  5. 使用可能なリソースのリストを入手します。 コード例 1 で提供されるサンプル JAX-WS WSDM クライアントは、使用可能なリソースのリストを示します。 リストは、これらのリソース・オブジェクトから一部のリソースおよび統計を取得するようにフィルターに掛けられます。 このステップでは、クライアントはローカル・マシンにインストールされたアプリケーション・サーバーに対して初期化され、ポート 9080 で HTTP 要求を処理しています。

    WSDM クライアントの初期化

    // Instantiate the client and instruct it to poll
    // the server at localhost:9080
    WsdmJaxWsClient wjc = new WsdmJaxWsClient(“localhost:9080”);
    		
    // Get a list of all available resources
    List<EntryType> entries = wjc.getResources();
  6. 使用可能なリソースをフィルターに掛けます。 getResources 呼び出しで戻されるリソースのリストは、長いリストになります。この呼び出しにより、現在使用可能なすべてのリソースのリストが戻されます。これは、必ずしもユーザーの関心の対象となる特定のリソース・タイプではありません。

    リソースのフィルター処理

    // Iterate through available resources until you find a servlet resource
    EntryType servlet = null;
    for (EntryType entry: entries){
    		if ("servlet".equals(wjc.getResourceType(entry))){
    				servlet = entry;
    				System.out.println("URL " + wjc.getResourceAddress(entry));
    				System.out.println("Type " + wjc.getResourceType(entry));
    				System.out.println("MbeanID" + wjc.getResourceMBeanID(entry));
    				System.out.println("ResourceID " + wjc.getResourceMRID(entry));
    		break;
    	}
    }
    
     
    この例を拡張して、使用可能な最初のサーブレットを検索せずに、特定のリソースを検索することができます。 このアクションを完了するには、getResourceMBeanID を基にしたフィルター処理をさらに行う必要があります。リソースを示すストリングは、以下のコード例に類似したものになります。

    サンプル・リソース MBean ID ストリング

    WebSphere:WebModule=WSDMDemo.war,name=myServlet,process=server1,Application=wsdm-demo,platform=dynamicproxy,
    J2EEApplication=wsdmdDemo,node=demoNode01,J2EEName=wsdm-demo#WSDMDemo.war#mySelvlet,j2eeType=Servlet,
    J2EEServer=server1,Server=server1,version=6.1.0.7,type=Servlet,mbeanIdentifier=
    wsdm-demo#WSDMDemo.war#myServlet,cell=demoCell01,spec=1.0
  7. 統計用にリソースをポーリングします。 これで、リソース・プロパティーを要求できるようになります。 対象のリソースの使用可能な URL のリストは、表 1 の WSDL ファイルから入手できます。以下の例は、サーブレット用のプロパティーのリストです。

    サーブレット・リソース用の使用可能なプロパティー

    <xsd:element name="ServletResourceProperties">
    xsd:complexType>
    		xsd:sequence>
    
    		!--  WSDM MUWS Part 1 - Identity -->
    		<xsd:element ref="muws1:ResourceId"></xsd:element>
    
    		!--  WSDM MUWS Part 1 - ManageabilityCharacteristics -->
    		<xsd:element ref="muws1:ManageabilityCapability" minOccurs="0" maxOccurs="unbounded"></xsd:element>
    	
    		!--  WSDM MUWS Part 2 - Description -->
    		<xsd:element ref="muws2:Caption" minOccurs="0" maxOccurs="unbounded"></xsd:element>
    		<xsd:element ref="muws2:Description" minOccurs="0" maxOccurs="unbounded"></xsd:element>
    		<xsd:element ref="muws2:Version" minOccurs="0"></xsd:element>
    
    		!--  WSDM MUWS Part 2 - Metrics -->
    		<xsd:element ref="muws2:CurrentTime"></xsd:element>
    
    		!--  J2EE Servlet -->
    		<xsd:element ref="servlet:ConcurrentRequests"></xsd:element>
    		<xsd:element ref="servlet:TotalRequests"></xsd:element>
    		<xsd:element ref="servlet:NumberOfErrors"></xsd:element>
    		<xsd:element ref="servlet:ResponseTime"></xsd:element>
    
    	
    		!--  J2EE ManagedObject -->
    		<xsd:element ref="j2ee:ObjectName"></xsd:element>
    		<xsd:element ref="j2ee:StateManageable"></xsd:element>
    		<xsd:element ref="j2ee:EventProvider"></xsd:element>
    		<xsd:element ref="j2ee:StatisticsProvider"></xsd:element>
    
    	</xsd:sequence>
    </xsd:complexType>
    </xsd:element>
  8. 統計を取得します。 以下のコード例を使用して、並行する要求のプロパティーに対するポーリングを行うことができます。 その後、QName にプロパティーを解決し、プロパティーをクライアントに渡すことができます。

    統計の取得

    // Request Concurrent Requests PMI statistics from this servlet
    Object servletConcurrentRequests =
    		wjc.getResourceProperty(servlet, new QName(“http://www.ibm.com/xmlns/prod/websphere/management/j2ee/servlet”, “ConcurrentRequests”));
    
    System.out.println(servletConcurrentRequests);	 

タスクの結果

リソースの管理および制御に使用できるカスタム WSDM モニターが作成されました。

コード例を使用すると、SOAP 会話コード例などのカスタム・モニターを作成する際に役立ちます。

これらのコード例に加え、サーブレット・リソースの統計の取得に使用できる組み込みコード・サンプルが製品内にあります。 このサンプルを実行するには、java –classpath wsdm-demo.jar;<your_JAX-WS_thin_client_install_directory>/com.ibm.jaxws.thinclient_8.5.0.jar samples.wsdm.servlet.WsdmDemo を実行します。

SOAP 会話例

以下のコード例は、使用可能なすべてのリソースを要求する方法を示します。
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
	<soap:Header>
    <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://test.ibm.com:8080/websphere-management/services/service-group</wsa:To>
				  <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
        http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest</wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:2f1abf03-ef3e-0837-b8e6-d34dc8e352e2</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Address>
            http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address></wsa:From>
<muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing" xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter=
"true">MuseResource-1</muse-wsa:ResourceId>
</soap:Header>
	<soap:Body>
		<wsrf-rp:GetResourceProperty xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:wsrf-sg=
"http://docs.oasis-open.org/wsrf/sg-2">wsrf-sg:Entry</wsrf-rp:GetResourceProperty>
	</soap:Body>
</soap:Envelope>
以下は、wsrf-sg:Entry XML エレメントとして表される 2 つの使用可能なリソースを持つ応答の例です。
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:soapenc="http:www.w3.org/2003/05/soap-encoding"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<env:Header>
				<wsa:To>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To>
				<wsa:Action>http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyResponse</wsa:Action>
				<wsa:MessageID>uuid:4eda30ea-c8ca-2998-2c9f-e2519175a1aa</wsa:MessageID>
				<wsa:RelatesTo RelationshipType="wsa:Reply">uuid:2f1abf03-ef3e-0837-b8e6-d34dc8e352e2</wsa:RelatesTo>
				<wsa:From>
						<wsa:Address>http://test.ibm.com:8080/websphere-management/services/service-group</wsa:Address>
						<wsa:ReferenceParameters><muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing" IsReferenceParameter="true">
								MuseResource-1</muse-wsa:ResourceId></was:From>
						<was:RelatesTo>uuid:2f1abf03-ef3e-0837-b8e6-d34dc8e352e2</was:RelatesTo>

</env:Header>
<env:Body>
	<wsrf-rp:GetResourcePropertyResponse xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
		<wsrf-rp:Entry xmlns:wsrf-sg="http://docs.oasis-open.org/wsrf/sg-2"
		<wsrf-sg:ServiceGroupEntryEPR
		<wsa:Address>	"http://test.ibm.com:8080/websphere-management/services/service-group-entry</wsa:Address>
		<wsa:ReferenceParameters><muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">MuseResource-103</muse-wsa:ResourceId>
	</wsa:ReferenceParameters>
		</wsrf-sg:ServiceGroupEntryEPR>
		<wsrf-sg:MemberServiceEPR>
		<wsa:Address>http://test.ibm.com:8080/websphere-management/services/ejb</wsa:Address>
	<wsa:ReferenceParameters>
												<was-wsdm:WAS_Resource_Type>
												<was-wsdm:WAS_Resource_ManagedNodeID xmlns:was-wsdm="http://ibm.com/2006/v1.3"
												<was-wsdm:WAS_Resource_Type xmlns:was-wsdm="http://ibm.com/2006/v1.3">ejb					<was-wsdm:WAS_Resource_MbeanIdentifier
 xmlns:was-wsdm="http://ibm.com/2006/v1.3">
WebSphere:name=EjbClient,process=server1,Application=jms-client,platform=dynamicproxy,J2EEApplication=jms-client,node=
Node01,J2EEName=jms-client#jms-ejb-client.jar#EjbClient,j2eeType=StatelessSessionBean,J2EEServer=server1,Server=server1,version=
7.0.0.0,type=StatelessSessionBean,mbeanIdentifier=jms-client#jms-ejb-client.jar#EjbClient,EJBModule=jms-ejb-client.jar,cell=
Cell01,spec=1.0</was-wsdm:WAS_Resource_MbeanIdentifier>
												<was-wsdm:WAS_Resource_MRID xmlns:was-wsdm="http://ibm.com/2006/v1.3">
ejb:WebSphere:name=EjbClient,process=server1,Application=jms-client,platform=dynamicproxy,J2EEApplication=jms-client,node=
Node01,J2EEName=jms-client#jms-ejb-client.jar#EjbClient,j2eeType=StatelessSessionBean,J2EEServer=server1,Server=server1,version=
7.0.0.0,type=StatelessSessionBean,mbeanIdentifier=jms-client#jms-ejb-client.jar#EjbClient,EJBModule=jms-ejb-client.jar,cell=
Cell01,spec=1.0</was-wsdm:WAS_Resource_MRID>
				</wsa:ReferenceParameters>
								</wsrf-sg:MemberServiceEPR>
								<wsrf-sg:Content/>
								</wsrf-sg:Entry>
								<wsrf-sg:Entry xmlns:wsrf-sg="http://docs.oasis-open.org/wsrf/sg-2">
								<wsrf-sg:ServiceGroupEntryEPR><wsa:Address>http://test.ibm.com:8080/websphere-management/services/service-group-entry</wsa:Address>
								<wsa:ReferenceParameters><muse-wsa:ResourceId xmlns:mus-wsa="http://ws.apache.org/muse/addressing"<MuseResource-97</muse-wsa:
ResourceId></wsa:ReferenceParameters>				
					</wsrf-sg:ServiceGroupEntryEPR>
					<wsrf-sg:MemberServiceEPR>
								<wsa:Address>http://test.ibm.com:8080/websphere-management/services/datasource</wsa:Address>
				<wsa:ReferenceParameters>
										<was-wsdm:WAS_Resource_ManagedNodeID xmlns:was-wsdm="http://ibm.com/2006/v1.3"/>
										<was-wsdm:WAS_Resource_Type xmlns:was-wsdm="http://ibm.com/2006/v1.3">datasource</was-wsdm:WAS_Resource_Type>
										<was-wsdm:WAS_Resource_MbeanIdentifier xmlns:was-wsdm="http://ibm.com/2006/v1.3">WebSphere:name=Default Datasource,process=
server1,platform=dynamicproxy,node=Node01,JDBCProvider=Derby JDBC Provider,diagnosticProvider=true,j2eeType=JDBCDataSource,J2EEServer=
server1,Server=server1,version=7.0.0.0,type=DataSource,mbeanIdentifier=cells/Cell01/nodes/Node01/servers/server1/resources.xml#DataSource_1,
JDBCResource=Derby JDBC Provider,cell=Cell01,spec=1.0</was-wsdm:WAS_Resource_MbeanIdentifier>
										<was-wsdm:WAS_Resource_MRID xmlns:was-wsdm="http://ibm.com/2006/v1.3">datasource:WebSphere:name=Default Datasource,process=
server1,platform=dynamicproxy,node=Node01,JDBCProvider=Derby JDBC Provider,diagnosticProvider=true,j2eeType=JDBCDataSource,J2EEServer=
server1,Server=server1,version=7.0.0.0,type=DataSource,mbeanIdentifier=cells/Cell01/nodes/Node01/servers/server1/resources.xml#DataSource_1,
JDBCResource=Derby JDBC Provider,cell=Cell01,spec=1.0</was-wsdm:WAS_Resource_MRID>
					</wsa:ReferenceParameters>
									</wsrf-sg:MemberServiceEPR>
									<wsrf-sg:Content/>
									</wsrf-sg:Entry>
					</wsrf-rp:GetResourcePropertyResponse>
</env:Body>
</env:Envelope>
以下の例は、サーブレット・リソースから concurrentRequests メトリックを要求する方法を示しています。ここで関心の対象となるリソースは、SOAP ヘッダーで参照パラメーターとして指定されています。これらのパラメーターは、太字のフォントで表示してあります。
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://test.ibm.com:8080/websphere-management/services/servlet</wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/
GetResourcePropertyRequest</wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:2737b4e1-31af-5b0d-cb6e-17e2c812ffbb</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
        <wsa-wsdm:WAS_Resource_ManagedNodeID xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter=
"true" xmlns:was-wsdm="http://ibm.com/2006/v1.3">
<was-wsdm:WAS_Resource_Type xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:was-wsdm=
"http://ibm.com/2006/v1.3">
        servlet</was-wsdm:WAS_Resource_Type>

<was-wsdm:WAS_Resource_MbeanIdentifier xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true"
 xmlns:was-wsdm="http://ibm.com/2006/v1.3">WebSphere:WebModule=WSDMUtil.war,name=ejb,process=server1,Application=
wsdm-util,platform=dynamicproxy,J2EEApplication=wsdm-util,node=Node01,J2EEName=wsdm-util#WSDMUtil.war#ejb,j2eeType=
Servlet,J2EEServer=server1,Server=server1,version=7.0.0.0,type=Servlet,mbeanIdentifier=wsdm-util#WSDMUtil.war#ejb,cell=
Cell01,spec=1.0</was-wsdm:WAS_Resource_MbeanIdentifier>

<was-wsdm:WAS_Resource_MRID xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:was-wsdm=
"http://ibm.com/2006/v1.3">servlet:WebSphere:WebModule=WSDMUtil.war,name=ejb,process=server1,Application=wsdm-util,platform=
dynamicproxy,J2EEApplication=wsdm-util,node=Node01,J2EEName=wsdm-util#WSDMUtil.war#ejb,j2eeType=Servlet,J2EEServer=server1,Server=
server1,version=7.0.0.0,type=Servlet,mbeanIdentifier=wsdm-util#WSDMUtil.war#ejb,cell=Cell01,spec=1.0</was-wsdm:WAS_Resource_MRID>
    
    <soap:Body>
<wsrf-rp:GetResourceProperty xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:servlet=
"http://www.ibm.com/xmlns/prod/websphere/management/j2ee/servlet">servlet:ConcurrentRequests</wsrf-rp:GetResourceProperty>
    	</soap:Body>
		</soap:Envelope>
以下は、サーバー応答の例です。 正確なリソースは SOAP ヘッダーで識別され、メトリックは SOAP 本体で使用可能です。
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:xsd="http://www.w3.org/20001/XMLSchema-instance">
<env:Header>
		<wsa:To>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To>
		<wsa:Action>http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyResponse</wsa:Action>
<wsa:MessageID>uuid:91400c29-8c50-9f62-7df2-1bb0212083f1</wsa:MessageID>
<wsa:RelatesTo RelationshipType="wsa:Reply">uuid:2737b4e1-31af-5b0d-cb6e-17e2c812ffbb</wsa:RelatesTo>
		<wsa:From>
<wsa:Address>http://test.ibm.com:8080/websphere-management/services/servlet</wsa:Address>
<wsa:ReferenceParameters>
<was-wsdm:WAS_Resource_ManagedNodID xmlns:was-wsdm="http://ibm.com/2006/v1.3" IsReferenceParameter="true"
<was-wsdm:WAS_Resource_Type xmlns:was-wsdm="http://ibm.com/2006/v1.3" IsReferenceParameter="true">servlet</was-wsdm:WAS_Resource_Type>
<was-wsdm:WAS_Resource_MbeanIdentifier xmlns:was-wsdm="http://ibm.com/2006/v1.3" IsReferenceParameter="true">
WebSphere:WebModule=WSDMUtil.war,name=ejb,process=server1,Application=wsdm-util,platform=dynamicproxy,J2EEApplication=wsdm-util,node=
Node01,J2EEName=wsdm-util#WSDMUtil.war#ejb,j2eeType=Servlet,J2EEServer=server1,Server=server1,version=7.0.0.0,type=
Servlet,mbeanIdentifier=wsdm-util#WSDMUtil.war#ejb,cell=Cell01,spec=1.0</was-wsdm:WAS_Resource_MbeanIdentifier>
<was-wsdm:WAS_Resource_MRID xmlns:was-wsdm="http://ibm.com/2006/v1.3" IsReferenceParameter="true">servlet:WebSphere:WebModule=
WSDMUtil.war,name=ejb,process=server1,Application=wsdm-util,platform=dynamicproxy,J2EEApplication=wsdm-util,node=Node01,J2EEName=
wsdm-util#WSDMUtil.war#ejb,j2eeType=Servlet,J2EEServer=server1,Server=server1,version=7.0.0.0,type=Servlet,mbeanIdentifier=
wsdm-util#WSDMUtil.war#ejb,cell=Cell01,spec=1.0</was-wsdm:WAS_Resource_MRID>
</wsa:ReferenceParameters>
</wsa:From>
<wsa:RelatesTo>uuid:2737b4e1-31af-5b0d-cb6e-17e2c812ffbb</wsa:RelatesTo>
</env:Header>
<env:Body>
<wsrf-rp:GetResourcePropertyResponse xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
<servlet:ConcurrentRequests
xmlns:servlet="http://www.ibm.com/xmlns/prod/websphere/management/j2ee/servlet>11</servlet:ConcurrentRequests>
</wsrf-rp:GetResourcePropertyResponse>
</env:Body>
</env:Envelope>

トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twbs_wsdmresmonitor
ファイル名:twbs_wsdmresmonitor.html