XML documents and business objects can be validated using the validation service.
In addition, other services require certain minimum standards or they throw a runtime exception. One of these is BOXMLSerializer.
You can view the logs for any messages generated by an XML validation exception. The examples below are messages generated by improper XML coding that was validated by the BOXMLSerializer
javax.xml.ws.WebServiceException: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: Element type "TestResponse" must be followed by either attribute specifications, ">" or "/>". javax.xml.ws.WebServiceException: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope
[9/11/08 15:16:27:417 CDT] 0000003e ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "transactionNotSupportedActivitySessionNotSupported" on bean "BeanId(WSXMLValidationApp#WSXMLValidationEJB.jar#Module, null)". Exception data: WebServicesFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultString: org.xml.sax.SAXParseException: Element type "TestResponse" must be followed by either attribute specifications, ">" or "/>". Message being parsed: <?xml version="1.0"?><TestResponse xmlns="http://WSXMLValidation"<firstName>Bob</firstName> <lastName>Smith</lastName></TestResponse> faultActor: null faultDetail: [9/11/08 15:16:35:135 CDT] 0000003f ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "transactionNotSupportedActivitySessionNotSupported" on bean "BeanId(WSXMLValidationApp#WSXMLValidationEJB.jar#Module, null)". Exception data: WebServicesFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultString: org.xml.sax.SAXException: WSWS3066E: Error: Expected 'envelope' but found TestResponse Message being parsed: <?xml version="1.0"?><TestResponse xmlns="http://WSXMLValidation"> <firstName>Bob</firstName><middleName>John</middleName> <lastName>Smith</lastName> </TestResponse> faultActor: null faultDetail:
[9/11/08 15:35:13:401 CDT] 00000064 WebServicesSe E com.ibm.ws.webservices.engine.transport.http.WebServicesServlet getSoapAction WSWS3112E: Error: Generating WebServicesFault due to missing SOAPAction. WebServicesFault faultCode: Client.NoSOAPAction faultString: WSWS3147E: Error: no SOAPAction header! faultActor: null faultDetail:
For more information about validation services, see the BOInstanceValidator interface in the Generated API and SPI documentation in the Reference section.