mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-24 18:04:54 +08:00
fix code
This commit is contained in:
parent
29bb4773b4
commit
d4d81e3dd2
@ -50,6 +50,12 @@
|
||||
<version>2.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.messaging.saaj</groupId>
|
||||
<artifactId>saaj-impl</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Servlet -->
|
||||
<dependency>
|
||||
|
@ -71,7 +71,13 @@ public enum HeaderName {
|
||||
*/
|
||||
PRAGMA("Pragma"),
|
||||
/**
|
||||
* 请求表示提交内容类型或返回返回内容的MIME类型
|
||||
* 请求表示提交内容类型或返回返回内容的MIME类型,例如:
|
||||
* <ul>
|
||||
* <li>Content-Type:application/json; charset=utf-8</li>
|
||||
* <li>Content-Type:application/x-www-form-urlencoded; charset=utf-8</li>
|
||||
* <li>Content-Type:text/xml; charset=utf-8</li>
|
||||
* <li>Content-Type:application/soap+xml</li>
|
||||
* </ul>
|
||||
*/
|
||||
CONTENT_TYPE("Content-Type"),
|
||||
|
||||
|
@ -26,7 +26,10 @@ import org.dromara.hutool.http.client.Response;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import jakarta.xml.soap.*;
|
||||
import org.dromara.hutool.http.meta.Method;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
@ -586,10 +589,11 @@ public class SoapClient implements HeaderOperation<SoapClient> {
|
||||
*/
|
||||
public Response sendForResponse() {
|
||||
final Request request = Request.of(this.url)
|
||||
.setMaxRedirectCount(2)
|
||||
.contentType(getXmlContentType())
|
||||
.header(this.headers, false)
|
||||
.body(getMsgStr(false));
|
||||
.method(Method.POST)
|
||||
.setMaxRedirectCount(2)
|
||||
.contentType(getXmlContentType())
|
||||
.header(this.headers, false)
|
||||
.body(getMsgStr(false));
|
||||
return request.send();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user