Details
-
Enhancement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Description
Several cases with low level of provided details were identified while preparing tests for invalid characters in configs. I must say these damages in config siles are a bit corner cases. To solve them some enhancements would be needed.
Reply by tcrawley
Since VDX currently operates based on the exceptions it receives, we don't have a good way to detect these situations without implementing our own parser that we use when we get exception that we recognize as possibly being caused by malformed xml. But that's a daunting task, and I'm not sure it's one we should take on. Another option is to again identify exceptions that are caused by different types of malformation and display them as we do now, but with an additional hint ("Did you leave off a quote somewhere?"). I'm just concerned about how open that set of exceptions is, making identifying all those cases difficult. If we do want to do something here, I agree that it is probably out of scope for 7.1.
Reply by brian.stansberry
I’m concerned about increasing complexity here. I think what we’ve done is really nice but I’m not in favor of adding complexity to the server parsing logic to go further (doing that is specifically a Non-Requirement of EAP7-599). I’d also be concerned about adding a lot of logic or dependencies to VDX, as a 100K size limitation was one of the EAP7-599 hard requirements.
Details about scenarios:
******** Add space before xml declaration - <space><?xml version='1.0' encoding='UTF-8'?> OPVDX001: Validation error in standalone-spaceInXmlDeclaration.xml ------------- | | 1: <?xml version='1.0' encoding='UTF-8'?> | ^^^^ Illegal processing instruction target ("xml"); xml (case insensitive) | is reserved by the specs | | 2: | 3: <server xmlns="urn:jboss:domain:5.0"> | 4: <extensions> | | The primary underlying error message was: | > Illegal processing instruction target ("xml"); xml (case insensitive) | > is reserved by the specs. | > at [row,col {unknown-source}]: [1,6] | |-------------------------------------------------------------------------------
Is there any chance to receive better message: e.g. remove whitespace(s) from the beginning of xml declaration on the first line ?
******** There is missing character in xml element (for example < is missing) OPVDX001: Validation error in standalone-missingStartOfElement.xml ------------- | | 380: <subsystem xmlns="urn:jboss:domain:webservices:2.0"> | 381: <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host> | 382: modify-wsdl-address>true</modify-wsdl-address> | ^^^^ Received non-all-whitespace CHARACTERS or CDATA event in nextTag() | | 383: <endpoint-config name="Standard-Endpoint-Config"/> | 384: <endpoint-config name="Recording-Endpoint-Config"> | 385: <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM"> | | The primary underlying error message was: | > Received non-all-whitespace CHARACTERS or CDATA event in nextTag(). | > at [row,col {unknown-source}]: [382,36] | |-------------------------------------------------------------------------------
Can we detect that starting element has missing '<' ?
Or it's just on xml parser what we receive ?
******** There is missing last quote " in <element name="foobar> OPVDX001: Validation error in standalone-missingLastQuoteStandaloneXml.xml ----- | | 382: <modify-wsdl-address>true</modify-wsdl-address> | 383: <endpoint-config name="Standard-Endpoint-Config/> | 384: <endpoint-config name="Recording-Endpoint-Config"> | ^^^^ Unexpected character '<' (code 60) in attribute value | | 385: <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM"> | 386: <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/> | 387: </pre-handler-chain> | | The primary underlying error message was: | > Unexpected character '<' (code 60) in attribute value | > at [row,col {unknown-source}]: [384,13] | |-------------------------------------------------------------------------------
More descriptive message would be preferred - e.g. include info that " character is expected to close attribute value.