Interstage Portalworks 管理者ガイド |
目次
索引
![]() ![]() |
第4章 WebサービスUSPの管理 | > 4.4 Webサービスの利用 |
利用するWebサービスを検索する手段、および決定したWebサービスを導入するための方法について説明します。
運用管理者は、必要な要件を満足するWeb サービスを探し出し、WS USPの設定に必要な情報を入手する必要があります。
インターネット上には、 Webサービスを検索するためのディレクトリサービスとして、以下が提供されています。代表的なディレクトリサービスはUDDIです。
日本では、WebService.jp(http://www.webservice.jp)が試験的に辞書引きのWebサービスを提供しています。
WebサービスをWS USPとして利用するには、以下の情報を入手する必要があります。
情報 |
備考 |
---|---|
WSDL の URL |
必須です。 |
WebサービスサーバのURL(AccessPoint) |
WSDLにservice要素が指定されている場合は不要です。 |
なお、以下のWebサービスは、WS USPとして利用できません。
以降の説明では、利用するWebサービスの例として、XMethods(http://www.xmethods.com/)が提供している「翻訳Webサービス」を利用します。
このWebサービスのWSDLは、「http://www.xmethods.net/sd/2001/BabelFishService.wsdl」にあり、その内容は次のようになっています。
<?xml version="1.0"?> <definitions name="BabelFishService" xmlns:tns=http://www.xmethods.net/sd/BabelFishService.wsdl targetNamespace=http://www.xmethods.net/sd/BabelFishService.wsdl xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/ xmlns="http://schemas.xmlsoap.org/wsdl/"> <message name="BabelFishRequest"> <part name="translationmode" type="xsd:string"/> <part name="sourcedata" type="xsd:string"/> </message> <message name="BabelFishResponse"> <part name="return" type="xsd:string"/> </message> <portType name="BabelFishPortType"> <operation name="BabelFish"> <input message="tns:BabelFishRequest" /> <output message="tns:BabelFishResponse" /> </operation> </portType> <binding name="BabelFishBinding" type="tns:BabelFishPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="BabelFish"> <soap:operation soapAction="urn:xmethodsBabelFish#BabelFish"/> <input> <soap:body use="encoded" namespace="urn:xmethodsBabelFish" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:xmethodsBabelFish" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="BabelFishService"> <documentation>Translates text of up to 5k in length, between a variety of languages.</documentation> <port name="BabelFishPort" binding="tns:BabelFishBinding"> <soap:address location="http://services.xmethods.net:80/perl/soaplite.cgi"/> </port> </service> </definitions> |
上記のように、WSDLの内容は複雑ですが、 “4.4.2 Webサービスの導入(WS USPの別名作成)”に示すWS USPの別名機能を利用すれば、WSDLの詳細を理解しなくてもWebサービスを利用することができます。
目次
索引
![]() ![]() |