WebServicesAdaptor¶
-
public abstract class
WebServicesAdaptor
extends SOAPHttpAdaptor¶ WebServicesAdaptor is a SOAPHttpAdaptor which handles web services request. This adaptor can only handles document style web services. It invokes either one of the following methods in the subclass for handling the request:
- public Element[] serviceRequested(Element[] bodies)
- public SOAPElement[] serviceRequested(SOAPElement[] bodies)
- public void serviceRequested(SOAPMessage req, SOAPMessage resp)
- public void serviceRequested(WebServicesRequest req, WebServicesResponse resp)
Author: Hugo Y. K. Lam
Methods¶
createElement¶
-
protected SOAPElement
createElement
(String name, String value, String namespace, String xsdType)¶ Creates a SOAP element.
Parameters: - name – the element name.
- value – the element value.
- namespace – the namespace.
- xsdType – the XSD data type.
Throws: - SOAPException – if unable to create the element.
Returns: the newly created element.
createElement¶
-
protected SOAPElement
createElement
(String local, String namespace)¶
createText¶
-
protected SOAPElement
createText
(String name, String value, String namespace)¶ Creates a text element.
Parameters: - name – the element name.
- value – the element value.
- namespace – the namespace.
Throws: - SOAPException – if unable to create the element.
Returns: the newly created text element.
doStartRequest¶
-
public boolean
doStartRequest
(HttpServletRequest request, HttpServletResponse response)¶ Responses with a web services descriptor if the request’s query is “wsdl” or the request is a “get” method.
Parameters: - request – the servlet request.
- response – the servlet response.
Throws: - RequestListenerException – if there is any error in processing the request.
Returns: true if the request is not a “wsdl” request, false otherwise.
See also:
hk.hku.cecid.piazza.commons.servlet.http.HttpRequestListener.doStartRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
getChildElementArray¶
-
protected SOAPElement[]
getChildElementArray
(SOAPElement element)¶
getText¶
isElement¶
-
protected boolean
isElement
(SOAPElement element, String local, String namespace)¶
processDescriptorRequest¶
-
protected void
processDescriptorRequest
(OutputStream outs)¶ Processes the WSDL request. Override to provide specific descriptor.
Parameters: - outs – the output stream to which the descriptor should be written.
Throws: - RequestListenerException – if there is error in processing the WSDL request.
processRequest¶
-
public void
processRequest
(SOAPRequest request, SOAPResponse response)¶ Prcoesses the SOAP request.
Parameters: - request – the SOAP request.
- response – the SOAP response.
Throws: - SOAPRequestException – if there is any error in processing the SOAP request.
See also:
hk.hku.cecid.piazza.commons.soap.SOAPRequestListener.processRequest(hk.hku.cecid.piazza.commons.soap.SOAPRequest, hk.hku.cecid.piazza.commons.soap.SOAPResponse)