mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix code
This commit is contained in:
parent
29bb4773b4
commit
d4d81e3dd2
@ -50,6 +50,12 @@
|
|||||||
<version>2.0.1</version>
|
<version>2.0.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun.xml.messaging.saaj</groupId>
|
||||||
|
<artifactId>saaj-impl</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Servlet -->
|
<!-- Servlet -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -71,7 +71,13 @@ public enum HeaderName {
|
|||||||
*/
|
*/
|
||||||
PRAGMA("Pragma"),
|
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"),
|
CONTENT_TYPE("Content-Type"),
|
||||||
|
|
||||||
|
@ -26,7 +26,10 @@ import org.dromara.hutool.http.client.Response;
|
|||||||
|
|
||||||
import javax.xml.XMLConstants;
|
import javax.xml.XMLConstants;
|
||||||
import javax.xml.namespace.QName;
|
import javax.xml.namespace.QName;
|
||||||
|
|
||||||
import jakarta.xml.soap.*;
|
import jakarta.xml.soap.*;
|
||||||
|
import org.dromara.hutool.http.meta.Method;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
@ -586,10 +589,11 @@ public class SoapClient implements HeaderOperation<SoapClient> {
|
|||||||
*/
|
*/
|
||||||
public Response sendForResponse() {
|
public Response sendForResponse() {
|
||||||
final Request request = Request.of(this.url)
|
final Request request = Request.of(this.url)
|
||||||
.setMaxRedirectCount(2)
|
.method(Method.POST)
|
||||||
.contentType(getXmlContentType())
|
.setMaxRedirectCount(2)
|
||||||
.header(this.headers, false)
|
.contentType(getXmlContentType())
|
||||||
.body(getMsgStr(false));
|
.header(this.headers, false)
|
||||||
|
.body(getMsgStr(false));
|
||||||
return request.send();
|
return request.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user