| org.xins.server.CallingConvention org.xins.server.SOAPCallingConvention
All known Subclasses: org.xins.server.SOAPMapCallingConvention,
SOAPCallingConvention | public class SOAPCallingConvention extends CallingConvention (Code) | | The SOAP calling convention.
The SOAP message parsed by this calling convention is expected to match
the WSDL generated by the _WSDL meta-function.
version: $Revision: 1.72 $ $Date: 2007/09/21 09:07:55 $ author: Anthony Goubard author: Ernst de Haan |
Method Summary | |
protected FunctionRequest | convertRequestImpl(HttpServletRequest httpRequest) | protected void | convertResultImpl(FunctionResult xinsResult, HttpServletResponse httpResponse, HttpServletRequest httpRequest) | protected String[] | getSupportedMethods() | protected boolean | matches(HttpServletRequest httpRequest) Checks if the specified request can be handled by this calling
convention. | protected Element | readDataSection(Element parametersElem, String functionName) Reads the input parameters. | protected BasicPropertyReader | readInputParameters(Element parametersElem, String functionName) Reads the input parameters. | protected void | setDataElementAttribute(ElementBuilder builder, String attributeName, String attributeValue, String elementNameSpacePrefix) Writes the attribute a output data element for the returned SOAP element. | protected Element | soapElementTransformation(Map dataSection, boolean input, Element element, boolean top) Convert the values of element to the required format. | protected String | soapInputValueTransformation(Type parameterType, String value) Transforms the value of a input SOAP parameter to the XINS equivalent. | protected String | soapOutputValueTransformation(Type parameterType, String value) Transforms the value of a output XINS parameter to the SOAP equivalent. | protected void | writeFaultSection(String functionName, String namespaceURI, FunctionResult xinsResult, XMLOutputter xmlout) Writes the fault section to the SOAP XML when an error code is returned
from the function call. | protected void | writeOutputDataSection(String functionName, FunctionResult xinsResult, XMLOutputter xmlout) Writes the output data section to the SOAP XML. | protected void | writeOutputParameters(String functionName, FunctionResult xinsResult, XMLOutputter xmlout) Writes the output parameters to the SOAP XML. |
FUNCTION_NAME | final protected static String FUNCTION_NAME(Code) | | The key used to store the name of the function in the request attributes.
since: XINS 2.1. |
REQUEST_NAMESPACE | final protected static String REQUEST_NAMESPACE(Code) | | The key used to store the name of the namespace in the request attributes.
since: XINS 2.1. |
RESPONSE_CONTENT_TYPE | final protected static String RESPONSE_CONTENT_TYPE(Code) | | The content type of the HTTP response.
|
RESPONSE_ENCODING | final protected static String RESPONSE_ENCODING(Code) | | The response encoding format.
|
getSupportedMethods | protected String[] getSupportedMethods()(Code) | | |
matches | protected boolean matches(HttpServletRequest httpRequest) throws Exception(Code) | | Checks if the specified request can be handled by this calling
convention.
This method will not throw any exception.
Parameters: httpRequest - the HTTP request to investigate, cannot be null .true if this calling convention is possiblyable to handle this request, or false if itdefinitely not able to handle this request. throws: Exception - if analysis of the request causes an exception;false will be assumed. |
readDataSection | protected Element readDataSection(Element parametersElem, String functionName) throws InvalidRequestException(Code) | | Reads the input parameters.
Parameters: parametersElem - the XML element which contains the parameters and data section,cannot be null Parameters: functionName - the name of the function called, cannot be null .the data section for the function, can be null . throws: InvalidRequestException - if the SOAP request is invalid. |
readInputParameters | protected BasicPropertyReader readInputParameters(Element parametersElem, String functionName)(Code) | | Reads the input parameters.
Parameters: parametersElem - the XML element which contains the parameters, cannot be null Parameters: functionName - the name of the function called, cannot be null .the parameters for the function, never null . |
setDataElementAttribute | protected void setDataElementAttribute(ElementBuilder builder, String attributeName, String attributeValue, String elementNameSpacePrefix)(Code) | | Writes the attribute a output data element for the returned SOAP element.
Parameters: builder - the builder used to create the SOAP Element, cannot be null . Parameters: attributeName - the name of the attribute, cannot be null . Parameters: attributeValue - the value of the attribute, cannot be null . Parameters: elementNameSpacePrefix - the namespace prefix of the parent element, can be null . since: XINS 2.1. |
soapElementTransformation | protected Element soapElementTransformation(Map dataSection, boolean input, Element element, boolean top)(Code) | | Convert the values of element to the required format.
Parameters: dataSection - the specification of the elements, cannot be null . Parameters: input - true if it's the input parameter that should be transform,false if it's the output parameter. Parameters: element - the element node to process, cannot be null . Parameters: top - true if it's the top element, false otherwise.the converted value, never null . |
soapInputValueTransformation | protected String soapInputValueTransformation(Type parameterType, String value) throws InvalidSpecificationException(Code) | | Transforms the value of a input SOAP parameter to the XINS equivalent.
Parameters: parameterType - the type of the parameter, cannot be null . Parameters: value - the value of the SOAP parameter, cannot be null .the XINS value, never null . throws: InvalidSpecificationException - if the specification is incorrect. |
soapOutputValueTransformation | protected String soapOutputValueTransformation(Type parameterType, String value) throws InvalidSpecificationException(Code) | | Transforms the value of a output XINS parameter to the SOAP equivalent.
Parameters: parameterType - the type of the parameter, cannot be null . Parameters: value - the value returned by the XINS function, cannot be null .the SOAP value, never null . throws: InvalidSpecificationException - if the specification is incorrect. |
writeFaultSection | protected void writeFaultSection(String functionName, String namespaceURI, FunctionResult xinsResult, XMLOutputter xmlout) throws IOException(Code) | | Writes the fault section to the SOAP XML when an error code is returned
from the function call.
Parameters: functionName - the name of the function called. Parameters: namespaceURI - the namespace URI to use for the parameters. Parameters: xinsResult - the result of the call to the function. Parameters: xmlout - the XML outputter to write the parameters in. throws: IOException - if the data cannot be written to the XML outputter for any reason. |
writeOutputDataSection | protected void writeOutputDataSection(String functionName, FunctionResult xinsResult, XMLOutputter xmlout) throws IOException(Code) | | Writes the output data section to the SOAP XML.
Parameters: functionName - the name of the function called. Parameters: xinsResult - the result of the call to the function. Parameters: xmlout - the XML outputter to write the data section in. throws: IOException - if the data cannot be written to the XML outputter for any reason. |
writeOutputParameters | protected void writeOutputParameters(String functionName, FunctionResult xinsResult, XMLOutputter xmlout) throws IOException(Code) | | Writes the output parameters to the SOAP XML.
Parameters: functionName - the name of the function called. Parameters: xinsResult - the result of the call to the function. Parameters: xmlout - the XML outputter to write the parameters in. throws: IOException - if the data cannot be written to the XML outputter for any reason. |
Methods inherited from org.xins.server.CallingConvention | static void cleanUpParameters(BasicPropertyReader parameters) throws IllegalArgumentException(Code)(Java Doc) final FunctionRequest convertRequest(HttpServletRequest httpRequest) throws IllegalStateException, IllegalArgumentException, InvalidRequestException, FunctionNotSpecifiedException(Code)(Java Doc) abstract protected FunctionRequest convertRequestImpl(HttpServletRequest httpRequest) throws InvalidRequestException, FunctionNotSpecifiedException(Code)(Java Doc) final void convertResult(FunctionResult xinsResult, HttpServletResponse httpResponse, HttpServletRequest httpRequest) throws IllegalStateException, IllegalArgumentException, IOException(Code)(Java Doc) abstract protected void convertResultImpl(FunctionResult xinsResult, HttpServletResponse httpResponse, HttpServletRequest httpRequest) throws IOException(Code)(Java Doc) BasicPropertyReader gatherParams(HttpServletRequest httpRequest) throws InvalidRequestException(Code)(Java Doc) final protected API getAPI()(Code)(Java Doc) final String getConventionName()(Code)(Java Doc) protected String[] getSupportedMethods()(Code)(Java Doc) protected String[] getSupportedMethods(HttpServletRequest request)(Code)(Java Doc) abstract protected boolean matches(HttpServletRequest httpRequest) throws Exception(Code)(Java Doc) final boolean matchesRequest(HttpServletRequest httpRequest)(Code)(Java Doc) protected Element parseXMLRequest(HttpServletRequest httpRequest) throws IllegalArgumentException, InvalidRequestException(Code)(Java Doc) protected Element parseXMLRequest(HttpServletRequest httpRequest, boolean checkType) throws IllegalArgumentException, InvalidRequestException(Code)(Java Doc) final void setAPI(API api)(Code)(Java Doc) final void setConventionName(String conventionName)(Code)(Java Doc)
|
|
|