postman发送webService请求


Post方法发送url:

http://www.oorsprong.org/websamples.countryinfo/countryinfoservice.wso?WSDL

header添加键值对:

Content-Type
application/x-www-form-urlencoded   

如果报错:服务器无法为请求提供服务,因为不支持该媒体类型。
试试 text/xml; charset=UTF-8

body内容为:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
        <CountryFlag xmlns="http://www.oorsprong.org/websamples.countryinfo">
            <sCountryISOCode>CN</sCountryISOCode>
        </CountryFlag>
    </Body>
</Envelope>

返回中的http就是结果地址:
在这里插入图片描述

如何传递帐号密码

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
你可以使用Postman来发起一个请求Webservice接口。首先,打开Postman并新建一个Request请求。填写Webservice地址,将其粘贴到地址栏中,例如:【http://xxx:xx/xx/xx/xx?WSDL】。请确保请求方式设置为POST,并在请求头headers参数中添加Content-Type,其值为text/xml;charset=utf-8。请求报文和返回报文都是XML格式,所以你需要将请求报文以XML格式进行编写。具体的请求报文可以参考提供的示例,如下所示: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Login xmlns="http://tempuri.org/"> <user>admin</user> <psd>123456</psd> </Login> </soap:Body> </soap:Envelope> 请将上述XML报文作为参数传递给Webservice接口。这样,你就可以使用Postman发送请求Webservice接口了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [使用PostMan测试WebService接口](https://blog.csdn.net/duleilewuhen/article/details/127931631)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [接口测试工具Postman](https://download.csdn.net/download/weixin_38629391/15437504)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [postman请求webService](https://blog.csdn.net/u013314974/article/details/126083353)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值