mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix test
This commit is contained in:
parent
6e3bad82d0
commit
2129881efb
@ -10,7 +10,7 @@ import javax.xml.soap.SOAPMessage;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SOAP相关单元测试
|
* SOAP相关单元测试
|
||||||
*
|
*
|
||||||
* @author looly
|
* @author looly
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -23,19 +23,19 @@ public class SoapClientTest {
|
|||||||
.setMethod("web:getCountryCityByIp", "http://WebXml.com.cn/")
|
.setMethod("web:getCountryCityByIp", "http://WebXml.com.cn/")
|
||||||
.setCharset(CharsetUtil.CHARSET_GBK)
|
.setCharset(CharsetUtil.CHARSET_GBK)
|
||||||
.setParam("theIpAddress", "218.21.240.106");
|
.setParam("theIpAddress", "218.21.240.106");
|
||||||
|
|
||||||
Console.log(client.getMsgStr(true));
|
Console.log(client.getMsgStr(true));
|
||||||
|
|
||||||
Console.log(client.send(true));
|
Console.log(client.send(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
@Ignore
|
||||||
public void requestForMessageTest() throws SOAPException {
|
public void requestForMessageTest() throws SOAPException {
|
||||||
SoapClient client = SoapClient.create("http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx")
|
SoapClient client = SoapClient.create("http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx")
|
||||||
.setMethod("web:getCountryCityByIp", "http://WebXml.com.cn/")
|
.setMethod("web:getCountryCityByIp", "http://WebXml.com.cn/")
|
||||||
.setParam("theIpAddress", "218.21.240.106");
|
.setParam("theIpAddress", "218.21.240.106");
|
||||||
|
|
||||||
SOAPMessage message = client.sendForMessage();
|
SOAPMessage message = client.sendForMessage();
|
||||||
Console.log(message.getSOAPBody().getTextContent());
|
Console.log(message.getSOAPBody().getTextContent());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user