mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
webservice SOAP 弃用javaEE xml saop 使用jakarta xml soap
This commit is contained in:
@@ -26,7 +26,7 @@ import org.dromara.hutool.http.client.Response;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.soap.*;
|
||||
import jakarta.xml.soap.*;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.http.webservice;
|
||||
|
||||
import javax.xml.soap.SOAPConstants;
|
||||
import jakarta.xml.soap.SOAPConstants;
|
||||
|
||||
/**
|
||||
* SOAP协议版本枚举
|
||||
|
@@ -17,8 +17,8 @@ import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import javax.xml.soap.SOAPException;
|
||||
import javax.xml.soap.SOAPMessage;
|
||||
import jakarta.xml.soap.SOAPException;
|
||||
import jakarta.xml.soap.SOAPMessage;
|
||||
|
||||
import org.dromara.hutool.core.exception.HutoolException;
|
||||
import org.dromara.hutool.core.util.CharsetUtil;
|
||||
|
@@ -17,8 +17,8 @@ import org.dromara.hutool.core.util.CharsetUtil;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import javax.xml.soap.SOAPException;
|
||||
import javax.xml.soap.SOAPMessage;
|
||||
import jakarta.xml.soap.SOAPException;
|
||||
import jakarta.xml.soap.SOAPMessage;
|
||||
|
||||
/**
|
||||
* SOAP相关单元测试
|
||||
@@ -32,7 +32,7 @@ public class SoapClientTest {
|
||||
@Disabled
|
||||
public void requestTest() {
|
||||
final SoapClient client = SoapClient.of("http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx")
|
||||
.setMethod("web:getCountryCityByIp", "http://WebXml.com.cn/")
|
||||
.setMethod("getCountryCityByIp", "http://WebXml.com.cn/")
|
||||
.charset(CharsetUtil.GBK)
|
||||
.setParam("theIpAddress", "218.21.240.106");
|
||||
|
||||
|
Reference in New Issue
Block a user