Package org.apache.axis2.description
Class AxisService2WSDL20
- java.lang.Object
-
- org.apache.axis2.description.AxisService2WSDL20
-
- All Implemented Interfaces:
WSDL2Constants
- Direct Known Subclasses:
WSDL20SupplierTemplate
public class AxisService2WSDL20 extends Object implements WSDL2Constants
-
-
Field Summary
Fields Modifier and Type Field Description protected AxisService
axisService
protected String
serviceName
-
Fields inherited from interface org.apache.axis2.description.WSDL2Constants
ATTR_WHTTP_AUTHENTICATION_REALM, ATTR_WHTTP_AUTHENTICATION_TYPE, ATTR_WHTTP_CODE, ATTR_WHTTP_CONTENT_ENCODING, ATTR_WHTTP_FAULT_SERIALIZATION, ATTR_WHTTP_HEADER, ATTR_WHTTP_IGNORE_UNCITED, ATTR_WHTTP_INPUT_SERIALIZATION, ATTR_WHTTP_LOCATION, ATTR_WHTTP_METHOD, ATTR_WHTTP_METHOD_DEFAULT, ATTR_WHTTP_OUTPUT_SERIALIZATION, ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR, ATTR_WRPC_SIGNATURE, ATTR_WSDLX_SAFE, ATTR_WSOAP_ACTION, ATTR_WSOAP_ADDRESS, ATTR_WSOAP_CODE, ATTR_WSOAP_HEADER, ATTR_WSOAP_MEP, ATTR_WSOAP_MODULE, ATTR_WSOAP_PROTOCOL, ATTR_WSOAP_SUBCODES, ATTR_WSOAP_VERSION, ATTRIBUTE_ACTION, ATTRIBUTE_ADDRESS, ATTRIBUTE_AUTHENTICATION_REALM, ATTRIBUTE_AUTHENTICATION_TYPE, ATTRIBUTE_CODE, ATTRIBUTE_CONTENT_ENCODING, ATTRIBUTE_CONTENT_ENCODING_DEFAULT, ATTRIBUTE_ELEMENT, ATTRIBUTE_FAULT_SERIALIZATION, ATTRIBUTE_HEADER, ATTRIBUTE_IGNORE_UNCITED, ATTRIBUTE_INPUT_SERIALIZATION, ATTRIBUTE_LOCATION, ATTRIBUTE_MEP, ATTRIBUTE_MEP_DEFAULT, ATTRIBUTE_METHOD, ATTRIBUTE_METHOD_DEFAULT, ATTRIBUTE_MODULE, ATTRIBUTE_MUST_UNDERSTAND, ATTRIBUTE_NAME, ATTRIBUTE_NAME_PATTERN, ATTRIBUTE_OUTPUT_SERIALIZATION, ATTRIBUTE_PROTOCOL, ATTRIBUTE_QUERY_PARAMETER_SEPERATOR, ATTRIBUTE_QUERY_PARAMETER_SEPERATOR_DEFAULT, ATTRIBUTE_REF, ATTRIBUTE_REQUIRED, ATTRIBUTE_SAFE, ATTRIBUTE_SIGNATURE, ATTRIBUTE_STYLE, ATTRIBUTE_SUBCODES, ATTRIBUTE_TYPE, ATTRIBUTE_VERSION, BINDING_LOCAL_NAME, DEFAULT_HTTP_ENDPOINT_NAME, DEFAULT_HTTPS_PREFIX, DEFAULT_INTERFACE_NAME, DEFAULT_SOAP11_ENDPOINT_NAME, DEFAULT_SOAP12_ENDPOINT_NAME, DEFAULT_TARGET_NAMESPACE_PREFIX, DEFAULT_WSDL_NAMESPACE_PREFIX, DESCRIPTION, DOCUMENTATION, ENDPOINT_LOCAL_NAME, FAULT_LOCAL_NAME, HTTP_LOCATION_TABLE, HTTP_PREFIX, HTTP_PROTOCAL, IN_FAULT_LOCAL_NAME, IN_PUT_LOCAL_NAME, INTERFACE_LOCAL_NAME, INTERFACE_PREFIX, LEGAL_CHARACTERS_IN_PATH, LEGAL_CHARACTERS_IN_QUERY, LEGAL_CHARACTERS_IN_URL, MEP_URI_IN_ONLY, MEP_URI_IN_OPTIONAL_OUT, MEP_URI_IN_OUT, MEP_URI_OUT_IN, MEP_URI_OUT_ONLY, MEP_URI_OUT_OPTIONAL_IN, MEP_URI_ROBUST_IN_ONLY, MEP_URI_ROBUST_OUT_ONLY, MESSAGE_LABEL, MESSAGE_LABEL_IN, MESSAGE_LABEL_OUT, NMTOKEN_ANY, NMTOKEN_ELEMENT, NMTOKEN_NONE, NMTOKEN_OTHER, OPERATION_LOCAL_NAME, OPERATION_STYLE, OUT_FAULT_LOCAL_NAME, OUT_PUT_LOCAL_NAME, RPC_IN, RPC_INOUT, RPC_RETURN, SERVICE_LOCAL_NAME, SOAP_BINDING_PREFIX, SOAP_ENV_PREFIX, SOAP_PREFIX, SOAP_VERSION_1_1, SOAP_VERSION_1_2, STYLE_IRI, STYLE_MULTIPART, STYLE_RPC, TARGET_NAMESPACE, TEMPLATE_ENCODE_ESCAPING_CHARACTER, TYPES_LOCAL_NALE, URI_WSDL2_EXTENSIONS, URI_WSDL2_HTTP, URI_WSDL2_RPC, URI_WSDL2_SOAP, URI_WSOAP_MEP, WSDL_EXTENTION_PREFIX, WSDL_NAMESPACE, WSDL_RPC_PREFIX
-
-
Constructor Summary
Constructors Constructor Description AxisService2WSDL20()
AxisService2WSDL20(AxisService service)
AxisService2WSDL20(AxisService service, String serviceName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPoliciesToDescriptionElement(List policies, OMElement descriptionElement)
protected OMElement
generateDescription(OMFactory omFactory)
protected OMElement
generateDocumentation(OMFactory omFactory)
protected OMElement
generateInterface(OMFactory omFactory)
OMElement
generateInterfaceOperationElement(AxisOperation axisOperation, OMNamespace wsdl, OMNamespace tns, OMNamespace wsdlx, OMNamespace wrpc)
Generates the interface Operation element.OMElement
generateOM()
Generates a WSDL 2.0 document for this web serviceprotected OMElement
generateService(OMFactory omFactory, OMElement descriptionElement, boolean disableREST, boolean disableSOAP12, boolean disableSOAP11)
OMElement
generateServiceElement(OMFactory omFactory, OMNamespace wsdl, OMNamespace tns, AxisService axisService, boolean disableREST, boolean disableSOAP12, boolean disableSOAP11, String serviceName)
Generates a default service elementOMElement
generateServiceElement(OMFactory omFactory, OMNamespace wsdl, OMNamespace tns, AxisService axisService, boolean disableREST, boolean disableSOAP12, boolean disableSOAP11, String[] eprs, String serviceName)
Generates a default service elementprotected OMElement
generateTypes(OMFactory omFactory)
protected List
getPoliciesInDefinitions()
protected void
init()
protected boolean
isDisableREST()
protected boolean
isDisableSOAP11()
protected boolean
isDisableSOAP12()
protected OMElement
modifyBinding(OMElement binding)
protected OMElement
modifyEndpoint(OMElement endpoint)
void
setCheckIfEndPointActive(boolean flag)
Sets whether to make a check if endpoint is active before adding the endpoint to the WSDL.void
setEPRs(String[] eprs)
-
-
-
Field Detail
-
axisService
protected AxisService axisService
-
serviceName
protected String serviceName
-
-
Constructor Detail
-
AxisService2WSDL20
public AxisService2WSDL20()
-
AxisService2WSDL20
public AxisService2WSDL20(AxisService service)
-
AxisService2WSDL20
public AxisService2WSDL20(AxisService service, String serviceName)
-
-
Method Detail
-
setCheckIfEndPointActive
public void setCheckIfEndPointActive(boolean flag)
Sets whether to make a check if endpoint is active before adding the endpoint to the WSDL. By default an endpoint is not added if a transport for the endpoint is not found.- Parameters:
flag
- true=check if endpoint is active before adding endpoint. false=add endpoint independent of whether endpoint is active.
-
generateOM
public OMElement generateOM() throws Exception
Generates a WSDL 2.0 document for this web service- Returns:
- The WSDL2 document element
- Throws:
Exception
- - Thrown in case an exception occurs
-
generateInterfaceOperationElement
public OMElement generateInterfaceOperationElement(AxisOperation axisOperation, OMNamespace wsdl, OMNamespace tns, OMNamespace wsdlx, OMNamespace wrpc) throws URISyntaxException, AxisFault, XMLStreamException, FactoryConfigurationError
Generates the interface Operation element. As with the binding operations we dont need to ask AxisMessage to serialize its message cause AxisMessage does not have specific properties as bindings.- Parameters:
axisOperation
- the operation to writewsdl
- the WSDL namespacetns
- the target namespacewsdlx
- the WSDL extentions namespace (WSDL 2.0)- Returns:
- the generated <operation> element
- Throws:
FactoryConfigurationError
XMLStreamException
URISyntaxException
AxisFault
-
setEPRs
public void setEPRs(String[] eprs)
-
addPoliciesToDescriptionElement
protected void addPoliciesToDescriptionElement(List policies, OMElement descriptionElement) throws XMLStreamException, FactoryConfigurationError
-
generateTypes
protected OMElement generateTypes(OMFactory omFactory) throws AxisFault
- Throws:
AxisFault
-
generateInterface
protected OMElement generateInterface(OMFactory omFactory) throws AxisFault, URISyntaxException, XMLStreamException, FactoryConfigurationError
-
generateService
protected OMElement generateService(OMFactory omFactory, OMElement descriptionElement, boolean disableREST, boolean disableSOAP12, boolean disableSOAP11) throws AxisFault
- Throws:
AxisFault
-
isDisableREST
protected boolean isDisableREST()
-
isDisableSOAP11
protected boolean isDisableSOAP11()
-
isDisableSOAP12
protected boolean isDisableSOAP12()
-
getPoliciesInDefinitions
protected List getPoliciesInDefinitions()
-
generateServiceElement
public OMElement generateServiceElement(OMFactory omFactory, OMNamespace wsdl, OMNamespace tns, AxisService axisService, boolean disableREST, boolean disableSOAP12, boolean disableSOAP11, String serviceName) throws AxisFault
Generates a default service element- Parameters:
omFactory
- - The OMFactorywsdl
- the WSDL namespacetns
- - The targetnamespaceaxisService
- - The AxisServicedisableREST
- only generate REST endpoint if this is falsedisableSOAP12
- 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 OMElement generateServiceElement(OMFactory omFactory, OMNamespace wsdl, OMNamespace tns, AxisService axisService, boolean disableREST, boolean disableSOAP12, boolean disableSOAP11, String[] eprs, String serviceName) throws AxisFault
Generates a default service element- Parameters:
omFactory
- - The OMFactorywsdl
- the WSDL namespacetns
- - The targetnamespaceaxisService
- - The AxisServicedisableREST
- only generate REST endpoint if this is falsedisableSOAP12
- only generate SOAP 1.2 endpoint if this is false- Returns:
- - The generated service element
- Throws:
AxisFault
- - Thrown in case an exception occurs
-
-