You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Ozzie-Mailing Lists <oz...@hotmail.com> on 2001/04/13 18:58:43 UTC
SOAP Liason configurability and validation
Apache's SOAP server already parses every message automatically using DOM. As far as I can see, there is no way to turn on validation for this internal parsing process. It seems as though, you can plug-in a new parser liason with your own parser settings. However, that whole process of specifying a new plug-in parser is also tainted. Look at the following code that checks for the plug-in (notice the comments that I added),
// code from init() method of MessageRouterServlet.java
//
if (System.getProperty(TRANSPORT_HOOK_EXTENSION) != null) {
//
// why do i need to specify TRANSPORT_HOOK_EXTENSION just to achieve a new parser???
//
EnvelopeEditorFactory factory =
(EnvelopeEditorFactory)createObject(ENVELOPE_EDITOR_FACTORY);
if (factory != null) {
try {
Properties props = new Properties();
Enumeration enum = getServletConfig().getInitParameterNames();
while(enum.hasMoreElements()) {
String name = (String)enum.nextElement();
if (!ENVELOPE_EDITOR_FACTORY.equals(name) &&
!XML_PARSER.equals(name))
props.put(name,
getServletConfig().getInitParameter(name));
}
editor = factory.create(props);
} catch (SOAPException e) {
System.err.println("WARNING: Can't create editor: " +
e.getMessage());
}
}
//
// why isn't this statement outside the transport hook check? what if i want
// my own parser liason????
//
if ((xpl = (XMLParserLiaison)createObject(XML_PARSER)) == null)
xpl = new XercesParserLiaison();
}
Maybe I am missing something from above. I would expect that I can turn on validation in the existing liasion and also create my own liason.
Thanks,
Ozzie Gurkan
Manheim Interactive
----- Original Message -----
From: Ozzie-Mailing Lists
To: soap-user@xml.apache.org
Sent: Wednesday, April 11, 2001 9:55 AM
Subject: How to turn on Schema Validation
Is there a simple way to turn on schema validation for the messages being received? I couldn't find a way but to modify XercesParserLiason.java itself. I am assuming there is a much simpler way to turn on validation. Since Apache's SOAP server already parses the message using DOM, I really don't want to re-run the parser just for validation.
Thanks,
Ozzie Gurkan