|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oroad.stxx.xform.XMLFormService
Exposes XML forms as a message-style SOAP web service. This service is tied
to Axis and HTTP to integrate smoothly with Struts. It takes one or more XML
elements, validates them, then returns one or more corresponding result
elements including any errors raised in the validation. If validation
succeeds, the form's save method will be called and its return code put in
the result element.
This service is not thread-safe so it should only be in the request or
session scope.
This class requires service options to be set in the WSDD:
xmlFormClass
- The XMLForm-implementing class (required)
xmlFormName
- The form name (optional)xmlFormPhase
- The validation phase to use (required for
validation)xmlFormSchema
- The validation schema file (required for
validation)xmlFormSchemaNS
- The validation schema namespace
(optional)
Field Summary | |
protected XMLForm |
xmlform
The xml form |
Constructor Summary | |
XMLFormService()
|
Method Summary | |
protected void |
encodeViolations(java.util.List violations,
org.w3c.dom.Element result)
Encodes the validation errors as DOM elements and stores them in the result. |
protected org.w3c.dom.Document |
importElement(org.w3c.dom.Element e)
Converts the element to its own Document for processing. |
protected void |
loadForm()
Loads the XML form from Axis service options in the WSDD. |
org.w3c.dom.Element[] |
process(org.w3c.dom.Element[] elems)
Service method, validates, saves, and encodes the results of the XML it receives. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected XMLForm xmlform
Constructor Detail |
public XMLFormService()
Method Detail |
public org.w3c.dom.Element[] process(org.w3c.dom.Element[] elems)
elems
- an array of DOM Elements, one for each form XML
protected void encodeViolations(java.util.List violations, org.w3c.dom.Element result)
violations
- A list of validation errorsresult
- The result element to attach the error DOM elementsprotected org.w3c.dom.Document importElement(org.w3c.dom.Element e)
e
- The element to convert
protected void loadForm()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |