java.lang.Object
org.miaixz.bus.http.SoapX
A utility class for SOAP-related operations.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SoapBuilderCreates a SOAP client with the default SOAP 1.2 protocol.static SoapBuilderCreates a SOAP client with a specified protocol.static SoapBuilderCreates a SOAP client with a specified protocol and namespace URI.static StringtoString(jakarta.xml.soap.SOAPMessage message, boolean pretty) Converts aSOAPMessageto its string representation.static StringConverts aSOAPMessageto its string representation with a specified character set.
-
Constructor Details
-
SoapX
public SoapX()
-
-
Method Details
-
create
Creates a SOAP client with the default SOAP 1.2 protocol.- Parameters:
url- The URL of the web service.- Returns:
- a new
SoapBuilderinstance.
-
create
Creates a SOAP client with a specified protocol.- Parameters:
url- The URL of the web service.protocol- The SOAP protocol to use (e.g., SOAP 1.1 or 1.2).- Returns:
- a new
SoapBuilderinstance.
-
create
public static SoapBuilder create(String url, org.miaixz.bus.core.net.Protocol protocol, String namespaceURI) Creates a SOAP client with a specified protocol and namespace URI.- Parameters:
url- The URL of the web service.protocol- The SOAP protocol to use.namespaceURI- The namespace URI for the SOAP method.- Returns:
- a new
SoapBuilderinstance.
-
toString
Converts aSOAPMessageto its string representation.- Parameters:
message- The SOAP message object.pretty- Whether to format the output XML.- Returns:
- The SOAP XML as a string.
-
toString
public static String toString(jakarta.xml.soap.SOAPMessage message, boolean pretty, Charset charset) Converts aSOAPMessageto its string representation with a specified character set.- Parameters:
message- The SOAP message object.pretty- Whether to format the output XML.charset- The character set to use for encoding.- Returns:
- The SOAP XML as a string.
-