webservice SOAP 弃用javaEE xml saop 使用jakarta xml soap

This commit is contained in:
dazer007
2023-12-28 19:00:45 +08:00
parent 00eaaeae2d
commit c874210568
6 changed files with 18 additions and 18 deletions

View File

@@ -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;

View File

@@ -12,7 +12,7 @@
package org.dromara.hutool.http.webservice;
import javax.xml.soap.SOAPConstants;
import jakarta.xml.soap.SOAPConstants;
/**
* SOAP协议版本枚举

View File

@@ -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;

View File

@@ -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");