org.apache.axis2.util
Class WSDLSerializationUtil

java.lang.Object
  extended by org.apache.axis2.util.WSDLSerializationUtil

public class WSDLSerializationUtil
extends java.lang.Object

Helps the AxisService to WSDL process


Field Summary
static java.lang.String CDATA_END
           
static java.lang.String CDATA_END_REGEX
           
static java.lang.String CDATA_START
           
static java.lang.String CDATA_START_REGEX
           
 
Constructor Summary
WSDLSerializationUtil()
           
 
Method Summary
static void addExtensionElement(org.apache.axiom.om.OMFactory fac, org.apache.axiom.om.OMElement element, java.lang.String name, java.lang.String att1Name, java.lang.String att1Value, org.apache.axiom.om.OMNamespace soapNameSpace)
           
static void addHTTPHeaderElements(org.apache.axiom.om.OMFactory omFactory, java.util.ArrayList list, org.apache.axiom.om.OMNamespace whttp, org.apache.axiom.om.OMElement element, java.util.Map nameSpaceMap)
          Adds a HTTP header element to a given OMElement
static void addPoliciesAsExtensibleElement(AxisDescription description, org.apache.axiom.om.OMElement descriptionElement)
           
static void addSOAPHeaderElements(org.apache.axiom.om.OMFactory omFactory, java.util.ArrayList list, org.apache.axiom.om.OMNamespace wsoap, org.apache.axiom.om.OMElement element, java.util.Map nameSpaceMap)
          Adds a soap header element to a given OMElement
static void addSOAPModuleElements(org.apache.axiom.om.OMFactory omFactory, java.util.ArrayList list, org.apache.axiom.om.OMNamespace wsoap, org.apache.axiom.om.OMElement element)
          Adds a soap module element to a given OMElement
static void addWSAddressingToBinding(java.lang.String addressingFlag, org.apache.axiom.om.OMFactory omFactory, org.apache.axiom.om.OMElement bindingElement, org.apache.axiom.om.OMNamespace wsaw)
           
static void addWSAWActionAttribute(org.apache.axiom.om.OMElement element, java.lang.String action, org.apache.axiom.om.OMNamespace wsaw)
           
static void addWSDLDocumentationElement(AxisDescription axisDescription, org.apache.axiom.om.OMElement omElement, org.apache.axiom.om.OMFactory omFactory, org.apache.axiom.om.OMNamespace wsdl)
           
static org.apache.axiom.om.OMElement generateHTTPBinding(org.apache.axiom.om.OMFactory fac, AxisService axisService, org.apache.axiom.om.OMNamespace wsdl, org.apache.axiom.om.OMNamespace whttp, org.apache.axiom.om.OMNamespace tns, java.lang.String serviceName)
          Generates a default HTTP Binding for a given AxisService
static org.apache.axiom.om.OMElement generateServiceElement(org.apache.axiom.om.OMFactory omFactory, org.apache.axiom.om.OMNamespace wsdl, org.apache.axiom.om.OMNamespace tns, AxisService axisService, boolean disableREST, boolean disableSOAP12, java.lang.String serviceName)
          Generates a default service element
static org.apache.axiom.om.OMElement generateServiceElement(org.apache.axiom.om.OMFactory omFactory, org.apache.axiom.om.OMNamespace wsdl, org.apache.axiom.om.OMNamespace tns, AxisService axisService, boolean disableREST, boolean disableSOAP12, java.lang.String[] eprs, java.lang.String serviceName)
          Generates a default service element
static org.apache.axiom.om.OMElement generateSOAP11Binding(org.apache.axiom.om.OMFactory fac, AxisService axisService, org.apache.axiom.om.OMNamespace wsdl, org.apache.axiom.om.OMNamespace wsoap, org.apache.axiom.om.OMNamespace tns, java.lang.String serviceName)
          Generates a default SOAP 11 Binding for a given AxisService
static org.apache.axiom.om.OMElement generateSOAP12Binding(org.apache.axiom.om.OMFactory fac, AxisService axisService, org.apache.axiom.om.OMNamespace wsdl, org.apache.axiom.om.OMNamespace wsoap, org.apache.axiom.om.OMNamespace tns, java.lang.String serviceName)
          Generates a default SOAP 12 Binding for a given AxisService
static java.lang.String getElementName(AxisMessage axisMessage, java.util.Map nameSpaceMap)
          Gets the correct element name for a given message
static java.lang.String getPrefix(java.lang.String namespace, java.util.Map nameSpaceMap)
          Given a namespace it returns the prefix for that namespace
static void populateNamespaces(org.apache.axiom.om.OMElement descriptionElement, java.util.Map nameSpaceMap)
          Adds the namespaces to the given OMElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CDATA_START

public static final java.lang.String CDATA_START
See Also:
Constant Field Values

CDATA_START_REGEX

public static final java.lang.String CDATA_START_REGEX
See Also:
Constant Field Values

CDATA_END

public static final java.lang.String CDATA_END
See Also:
Constant Field Values

CDATA_END_REGEX

public static final java.lang.String CDATA_END_REGEX
See Also:
Constant Field Values
Constructor Detail

WSDLSerializationUtil

public WSDLSerializationUtil()
Method Detail

getPrefix

public static java.lang.String getPrefix(java.lang.String namespace,
                                         java.util.Map nameSpaceMap)
Given a namespace it returns the prefix for that namespace

Parameters:
namespace - - The namespace that the prefix is needed for
nameSpaceMap - - The namespaceMap
Returns:
- The prefix of the namespace

getElementName

public static java.lang.String getElementName(AxisMessage axisMessage,
                                              java.util.Map nameSpaceMap)
Gets the correct element name for a given message

Parameters:
axisMessage - - The axisMessage
nameSpaceMap - - The namespaceMap
Returns:
- The element name

addSOAPHeaderElements

public static void addSOAPHeaderElements(org.apache.axiom.om.OMFactory omFactory,
                                         java.util.ArrayList list,
                                         org.apache.axiom.om.OMNamespace wsoap,
                                         org.apache.axiom.om.OMElement element,
                                         java.util.Map nameSpaceMap)
Adds a soap header element to a given OMElement

Parameters:
omFactory - - An OMFactory
list - - The arraylist of soapHeaderMessages
wsoap - - The WSDL 2.0 SOAP namespace
element - - The element that the header should be added to
nameSpaceMap - - The namespaceMap

addSOAPModuleElements

public static void addSOAPModuleElements(org.apache.axiom.om.OMFactory omFactory,
                                         java.util.ArrayList list,
                                         org.apache.axiom.om.OMNamespace wsoap,
                                         org.apache.axiom.om.OMElement element)
Adds a soap module element to a given OMElement

Parameters:
omFactory - - An OMFactory
list - - The arraylist of soapModuleMessages
wsoap - - The WSDL 2.0 SOAP namespace
element - - The element that the header should be added to

addHTTPHeaderElements

public static void addHTTPHeaderElements(org.apache.axiom.om.OMFactory omFactory,
                                         java.util.ArrayList list,
                                         org.apache.axiom.om.OMNamespace whttp,
                                         org.apache.axiom.om.OMElement element,
                                         java.util.Map nameSpaceMap)
Adds a HTTP header element to a given OMElement

Parameters:
omFactory - - An OMFactory
list - - The arraylist of HTTPHeaderMessages
whttp - - The WSDL 2.0 HTTP namespace
element - - The element that the header should be added to
nameSpaceMap - - The namespaceMap

generateSOAP11Binding

public static org.apache.axiom.om.OMElement generateSOAP11Binding(org.apache.axiom.om.OMFactory fac,
                                                                  AxisService axisService,
                                                                  org.apache.axiom.om.OMNamespace wsdl,
                                                                  org.apache.axiom.om.OMNamespace wsoap,
                                                                  org.apache.axiom.om.OMNamespace tns,
                                                                  java.lang.String serviceName)
Generates a default SOAP 11 Binding for a given AxisService

Parameters:
fac - - The OMFactory
axisService - - The AxisService
wsdl - the WSDL namespace
wsoap - - The WSDL 2.0 SOAP namespace
tns - - The target namespace
Returns:
- The generated SOAP11Binding element

generateSOAP12Binding

public static org.apache.axiom.om.OMElement generateSOAP12Binding(org.apache.axiom.om.OMFactory fac,
                                                                  AxisService axisService,
                                                                  org.apache.axiom.om.OMNamespace wsdl,
                                                                  org.apache.axiom.om.OMNamespace wsoap,
                                                                  org.apache.axiom.om.OMNamespace tns,
                                                                  java.lang.String serviceName)
Generates a default SOAP 12 Binding for a given AxisService

Parameters:
fac - - The OMFactory
axisService - - The AxisService
wsdl - the WSDL namespace
wsoap - - The WSDL 2.0 SOAP namespace
tns - - The target namespace
Returns:
- The generated SOAP12Binding element

generateHTTPBinding

public static org.apache.axiom.om.OMElement generateHTTPBinding(org.apache.axiom.om.OMFactory fac,
                                                                AxisService axisService,
                                                                org.apache.axiom.om.OMNamespace wsdl,
                                                                org.apache.axiom.om.OMNamespace whttp,
                                                                org.apache.axiom.om.OMNamespace tns,
                                                                java.lang.String serviceName)
Generates a default HTTP Binding for a given AxisService

Parameters:
fac - - The OMFactory
axisService - - The AxisService
wsdl - the WSDL namespace
whttp - - The WSDL 2.0 HTTP namespace
tns - - The target namespace
Returns:
- The generated HTTPBinding element

generateServiceElement

public static org.apache.axiom.om.OMElement generateServiceElement(org.apache.axiom.om.OMFactory omFactory,
                                                                   org.apache.axiom.om.OMNamespace wsdl,
                                                                   org.apache.axiom.om.OMNamespace tns,
                                                                   AxisService axisService,
                                                                   boolean disableREST,
                                                                   boolean disableSOAP12,
                                                                   java.lang.String serviceName)
                                                            throws AxisFault
Generates a default service element

Parameters:
omFactory - - The OMFactory
wsdl - the WSDL namespace
tns - - The targetnamespace
axisService - - The AxisService
disableREST - only generate REST endpoint if this is false
disableSOAP12 - only generate SOAP 1.2 endpoint if this is false
Returns:
- The generated service element
Throws:
AxisFault - - Thrown in case an exception occurs

generateServiceElement

public static org.apache.axiom.om.OMElement generateServiceElement(org.apache.axiom.om.OMFactory omFactory,
                                                                   org.apache.axiom.om.OMNamespace wsdl,
                                                                   org.apache.axiom.om.OMNamespace tns,
                                                                   AxisService axisService,
                                                                   boolean disableREST,
                                                                   boolean disableSOAP12,
                                                                   java.lang.String[] eprs,
                                                                   java.lang.String serviceName)
                                                            throws AxisFault
Generates a default service element

Parameters:
omFactory - - The OMFactory
wsdl - the WSDL namespace
tns - - The targetnamespace
axisService - - The AxisService
disableREST - only generate REST endpoint if this is false
disableSOAP12 - only generate SOAP 1.2 endpoint if this is false
Returns:
- The generated service element
Throws:
AxisFault - - Thrown in case an exception occurs

populateNamespaces

public static void populateNamespaces(org.apache.axiom.om.OMElement descriptionElement,
                                      java.util.Map nameSpaceMap)
Adds the namespaces to the given OMElement

Parameters:
descriptionElement - - The OMElement that the namespaces should be added to
nameSpaceMap - - The namespaceMap

addWSAWActionAttribute

public static void addWSAWActionAttribute(org.apache.axiom.om.OMElement element,
                                          java.lang.String action,
                                          org.apache.axiom.om.OMNamespace wsaw)

addExtensionElement

public static void addExtensionElement(org.apache.axiom.om.OMFactory fac,
                                       org.apache.axiom.om.OMElement element,
                                       java.lang.String name,
                                       java.lang.String att1Name,
                                       java.lang.String att1Value,
                                       org.apache.axiom.om.OMNamespace soapNameSpace)

addWSAddressingToBinding

public static void addWSAddressingToBinding(java.lang.String addressingFlag,
                                            org.apache.axiom.om.OMFactory omFactory,
                                            org.apache.axiom.om.OMElement bindingElement,
                                            org.apache.axiom.om.OMNamespace wsaw)

addWSDLDocumentationElement

public static void addWSDLDocumentationElement(AxisDescription axisDescription,
                                               org.apache.axiom.om.OMElement omElement,
                                               org.apache.axiom.om.OMFactory omFactory,
                                               org.apache.axiom.om.OMNamespace wsdl)

addPoliciesAsExtensibleElement

public static void addPoliciesAsExtensibleElement(AxisDescription description,
                                                  org.apache.axiom.om.OMElement descriptionElement)


Copyright © 2007 Apache Web Services Project. All Rights Reserved.