Module bus.http

Class SoapX

java.lang.Object
org.miaixz.bus.http.SoapX

public class SoapX extends Object
A utility class for SOAP-related operations.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a SOAP client with the default SOAP 1.2 protocol.
    create(String url, org.miaixz.bus.core.net.Protocol protocol)
    Creates a SOAP client with a specified protocol.
    create(String url, org.miaixz.bus.core.net.Protocol protocol, String namespaceURI)
    Creates a SOAP client with a specified protocol and namespace URI.
    static String
    toString(jakarta.xml.soap.SOAPMessage message, boolean pretty)
    Converts a SOAPMessage to its string representation.
    static String
    toString(jakarta.xml.soap.SOAPMessage message, boolean pretty, Charset charset)
    Converts a SOAPMessage to its string representation with a specified character set.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SoapX

      public SoapX()
  • Method Details

    • create

      public static SoapBuilder create(String url)
      Creates a SOAP client with the default SOAP 1.2 protocol.
      Parameters:
      url - The URL of the web service.
      Returns:
      a new SoapBuilder instance.
    • create

      public static SoapBuilder create(String url, org.miaixz.bus.core.net.Protocol protocol)
      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 SoapBuilder instance.
    • 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 SoapBuilder instance.
    • toString

      public static String toString(jakarta.xml.soap.SOAPMessage message, boolean pretty)
      Converts a SOAPMessage to 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 a SOAPMessage to 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.