2013-07-29 17 views
6

というメソッドを持つdll webservice(Delphi製)があります。リストは、文字列のリスト(widestring)を返します。テストのためにWebサービスメソッドを呼び出す方法。ブラウザから

サービスを使用するためのクライアントアプリケーションを作成することなく、そのサービスを呼び出す方法はありますか。

例:http://misitio.com:8080/miwebservice.dll?methodname=list

+1

私は質問を理解していません。あなたは、クライアントアプリケーションを記述せずにws内のメソッドを呼びたいのですか?あなたはブラウザを使って、それともカールすることさえできませんか? – Birger

+1

この記事を見てみましょう http://stackoverflow.com/questions/578306/simple-free-soap-client-for-testing-web-services – AlexSC

+2

あなたはSOAP UIまたは同等物のようなアプリケーションを使用する必要があります。 – whosrdaddy

答えて

8

ChromeアプリPostmanは、SOAPリクエストを送信することができます。 WebサービスのURLを指定し、POSTを選択し、適切なコンテンツタイプヘッダー(text/xml、application/soap + xmlなど)を設定し、リクエストに適切なxml SOAP本体を提供するだけです。 [送信]をクリックします。

以下は、free weather web serviceに投稿するリクエストの例です。

enter image description here

-2

あなたの要求のようなものが考えられます。

POST /WeatherWS/Weather.asmx/GetCityWeatherByZIP HTTP/1.1 
Host: wsf.cdyne.com 
Cache-Control: no-cache 
Postman-Token: e5bc46a4-71ac-f357-78a7-c4b4de894afb 
Content-Type: application/x-www-form-urlencoded 

ZIP=90210 

、応答は次のようになります。

<?xml version="1.0" encoding="utf-8"?> 
<WeatherReturn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://ws.cdyne.com/WeatherWS/"> 
    <Success>true</Success> 
    <ResponseText>City Found</ResponseText> 
    <State>CA</State> 
    <City>Beverly Hills</City> 
    <WeatherStationCity>Van Nuys</WeatherStationCity> 
    <WeatherID>4</WeatherID> 
    <Description>Sunny</Description> 
    <Temperature>68</Temperature> 
    <RelativeHumidity>54</RelativeHumidity> 
    <Wind>CALM</Wind> 
    <Pressure>29.89R</Pressure> 
    <Visibility /> 
    <WindChill /> 
    <Remarks /> 
</WeatherReturn> 
関連する問題