Package org.apache.axis2.util
Class WSDLSerializationUtil
- java.lang.Object
-
- org.apache.axis2.util.WSDLSerializationUtil
-
public class WSDLSerializationUtil extends Object
Helps the AxisService to WSDL process
-
-
Field Summary
Fields Modifier and Type Field Description static String
CDATA_END
static String
CDATA_END_REGEX
static String
CDATA_START
static String
CDATA_START_REGEX
-
Constructor Summary
Constructors Constructor Description WSDLSerializationUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addExtensionElement(OMFactory fac, OMElement element, String name, String att1Name, String att1Value, OMNamespace soapNameSpace)
static void
addHTTPHeaderElements(OMFactory omFactory, ArrayList list, OMNamespace whttp, OMElement element, Map nameSpaceMap)
Adds a HTTP header element to a given OMElementstatic void
addPoliciesAsExtensibleElement(AxisDescription description, OMElement descriptionElement)
static void
addSOAPHeaderElements(OMFactory omFactory, ArrayList list, OMNamespace wsoap, OMElement element, Map nameSpaceMap)
Adds a soap header element to a given OMElementstatic void
addSOAPModuleElements(OMFactory omFactory, ArrayList list, OMNamespace wsoap, OMElement element)
Adds a soap module element to a given OMElementstatic void
addWSAddressingToBinding(String addressingFlag, OMFactory omFactory, OMElement bindingElement, OMNamespace wsaw)
static void
addWSAWActionAttribute(OMElement element, String action, OMNamespace wsaw)
static void
addWSDLDocumentationElement(AxisDescription axisDescription, OMElement omElement, OMFactory omFactory, OMNamespace wsdl)
static String
extractHostIP(String serviceURL)
static OMElement
generateDocumentationElement(AxisDescription axisDescription, OMFactory omFactory, OMNamespace wsdl)
static OMElement
generateHTTPBinding(OMFactory fac, AxisService axisService, OMNamespace wsdl, OMNamespace whttp, OMNamespace tns, String serviceName)
Generates a default HTTP Binding for a given AxisServicestatic OMElement
generateSOAP11Binding(OMFactory fac, AxisService axisService, OMNamespace wsdl, OMNamespace wsoap, OMNamespace tns, String serviceName)
Generates a default SOAP 11 Binding for a given AxisServicestatic OMElement
generateSOAP12Binding(OMFactory fac, AxisService axisService, OMNamespace wsdl, OMNamespace wsoap, OMNamespace tns, String serviceName)
Generates a default SOAP 12 Binding for a given AxisServicestatic String
getElementName(AxisMessage axisMessage, Map nameSpaceMap)
Gets the correct element name for a given messagestatic String
getPrefix(String namespace, Map<String,String> nameSpaceMap)
Given a namespace it returns the prefix for that namespacestatic void
populateNamespaces(OMElement descriptionElement, Map nameSpaceMap)
Adds the namespaces to the given OMElement
-
-
-
Field Detail
-
CDATA_START
public static final String CDATA_START
- See Also:
- Constant Field Values
-
CDATA_START_REGEX
public static final String CDATA_START_REGEX
- See Also:
- Constant Field Values
-
CDATA_END
public static final String CDATA_END
- See Also:
- Constant Field Values
-
CDATA_END_REGEX
public static final String CDATA_END_REGEX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPrefix
public static String getPrefix(String namespace, Map<String,String> nameSpaceMap)
Given a namespace it returns the prefix for that namespace- Parameters:
namespace
- - The namespace that the prefix is needed fornameSpaceMap
- - The namespaceMap- Returns:
- - The prefix of the namespace
-
getElementName
public static String getElementName(AxisMessage axisMessage, Map nameSpaceMap)
Gets the correct element name for a given message- Parameters:
axisMessage
- - The axisMessagenameSpaceMap
- - The namespaceMap- Returns:
- - The element name
-
addSOAPHeaderElements
public static void addSOAPHeaderElements(OMFactory omFactory, ArrayList list, OMNamespace wsoap, OMElement element, Map nameSpaceMap)
Adds a soap header element to a given OMElement- Parameters:
omFactory
- - An OMFactorylist
- - The arraylist of soapHeaderMessageswsoap
- - The WSDL 2.0 SOAP namespaceelement
- - The element that the header should be added tonameSpaceMap
- - The namespaceMap
-
addSOAPModuleElements
public static void addSOAPModuleElements(OMFactory omFactory, ArrayList list, OMNamespace wsoap, OMElement element)
Adds a soap module element to a given OMElement- Parameters:
omFactory
- - An OMFactorylist
- - The arraylist of soapModuleMessageswsoap
- - The WSDL 2.0 SOAP namespaceelement
- - The element that the header should be added to
-
addHTTPHeaderElements
public static void addHTTPHeaderElements(OMFactory omFactory, ArrayList list, OMNamespace whttp, OMElement element, Map nameSpaceMap)
Adds a HTTP header element to a given OMElement- Parameters:
omFactory
- - An OMFactorylist
- - The arraylist of HTTPHeaderMessageswhttp
- - The WSDL 2.0 HTTP namespaceelement
- - The element that the header should be added tonameSpaceMap
- - The namespaceMap
-
generateSOAP11Binding
public static OMElement generateSOAP11Binding(OMFactory fac, AxisService axisService, OMNamespace wsdl, OMNamespace wsoap, OMNamespace tns, String serviceName)
Generates a default SOAP 11 Binding for a given AxisService- Parameters:
fac
- - The OMFactoryaxisService
- - The AxisServicewsdl
- the WSDL namespacewsoap
- - The WSDL 2.0 SOAP namespacetns
- - The target namespace- Returns:
- - The generated SOAP11Binding element
-
generateSOAP12Binding
public static OMElement generateSOAP12Binding(OMFactory fac, AxisService axisService, OMNamespace wsdl, OMNamespace wsoap, OMNamespace tns, String serviceName)
Generates a default SOAP 12 Binding for a given AxisService- Parameters:
fac
- - The OMFactoryaxisService
- - The AxisServicewsdl
- the WSDL namespacewsoap
- - The WSDL 2.0 SOAP namespacetns
- - The target namespace- Returns:
- - The generated SOAP12Binding element
-
generateHTTPBinding
public static OMElement generateHTTPBinding(OMFactory fac, AxisService axisService, OMNamespace wsdl, OMNamespace whttp, OMNamespace tns, String serviceName)
Generates a default HTTP Binding for a given AxisService- Parameters:
fac
- - The OMFactoryaxisService
- - The AxisServicewsdl
- the WSDL namespacewhttp
- - The WSDL 2.0 HTTP namespacetns
- - The target namespace- Returns:
- - The generated HTTPBinding element
-
populateNamespaces
public static void populateNamespaces(OMElement descriptionElement, Map nameSpaceMap)
Adds the namespaces to the given OMElement- Parameters:
descriptionElement
- - The OMElement that the namespaces should be added tonameSpaceMap
- - The namespaceMap
-
addWSAWActionAttribute
public static void addWSAWActionAttribute(OMElement element, String action, OMNamespace wsaw)
-
addExtensionElement
public static void addExtensionElement(OMFactory fac, OMElement element, String name, String att1Name, String att1Value, OMNamespace soapNameSpace)
-
addWSAddressingToBinding
public static void addWSAddressingToBinding(String addressingFlag, OMFactory omFactory, OMElement bindingElement, OMNamespace wsaw)
-
addWSDLDocumentationElement
public static void addWSDLDocumentationElement(AxisDescription axisDescription, OMElement omElement, OMFactory omFactory, OMNamespace wsdl)
-
generateDocumentationElement
public static OMElement generateDocumentationElement(AxisDescription axisDescription, OMFactory omFactory, OMNamespace wsdl)
-
addPoliciesAsExtensibleElement
public static void addPoliciesAsExtensibleElement(AxisDescription description, OMElement descriptionElement)
-
-