郵便配達Webサービスのテスト

1、URLを設定します

2、モード設定要求:ポスト

図3に示すように、提供されたヘッダーを:追加  コンテンツタイプを text / xmlであり、;のcharset = UTF- 8

4、ボディを設定:生をチェック

5.本文の内容を入力します。

本体ケース:

次のポイントは、場所を交換するように変更することになっています。

<ソープ:ボディ>親ノードは固定です

HTTP://WebXml.com.cn/などのxmlns識別、名前空間

getWeatherノードは下:<SOAP本体は>メソッドのノード名は、Webサービスを呼び出すことです

<getWeather>パラメータtheCityCodeウェブserivce法下ノード送信される、theUserIDメソッドパラメータ

ウェブserivce要求されたボディ構造

<?xml version = "1.0"エンコード= "UTF-8"?>
<SOAP:エンベロープのxmlns:XSI = "http://www.w3.org/2001/XMLSchema-instance"のxmlns:XSD = "HTTP:/ /www.w3.org/2001/XMLSchema "のxmlns:石鹸= "http://schemas.xmlsoap.org/soap/envelope/">
  <ソープ:ボディ>
    <getWeatherのxmlns =" http://WebXml.com。 CN / "> 
      <theCityCode>文字列</ theCityCode>
      <theUserID>文字列</ theUserID>
    </ getWeather>
  </ SOAP:BODY>
</石鹸:封筒>

ボディ構造のWebサービスの応答時間:

<?xml version = "1.0"エンコード= "UTF-8"?>
<SOAP:エンベロープのxmlns:XSI = "http://www.w3.org/2001/XMLSchema-instance"のxmlns:XSD = "HTTP:/ /www.w3.org/2001/XMLSchema "のxmlns:石鹸= "http://schemas.xmlsoap.org/soap/envelope/">
  <ソープ:ボディ>
    <getWeatherResponseのxmlns =" http://WebXml.com。 CN / ">
      <getWeatherResult>
        <文字列>文字列</文字列>
        <文字列>文字列</文字列>
      </ getWeatherResult>
    </ getWeatherResponse>
  </ SOAP:BODY>
</石鹸:封筒>

戻り値は、コンテンツの処理ですgetWeatherResult

おすすめ

転載: www.cnblogs.com/dxmdiy/p/11127567.html