开发者

XML urn:# is not a valid value for anyURI

I am having some troubles on a wsdl file, which on SONIC Workbench is not accepted, while on Oracle JDev and SOAP UI is tolerated. Basically the parser claims the following:

Exception:

org.xml.sax.SAXException: Error: cvc-datatype-valid.1.2.1: 'urn:#ApproveAccumulatedProvisioningRolesSoap' is not a valid value for 'anyURI'.

at org.wsi.xml.XMLUtils$ErrHandler.error(Unknown Source) ....

As far as I can understand the urn:# is the reason. Can anyone address me on where to find further informations on such syntax, eventually how I can开发者_如何学编程 fix it.

Thanks in advance. Alessandro Ilardo


Try this:

urn://#ApproveAccumulatedProvisioningRolesSoap


Please observe that according to the rfc2396, the colon character is reserved within the URI format. The SAXException that you are getting is a validation exception and it could be that Oracle JDev and SOAP UI skips validation of URIs while SONIC Workbench does not.

The hash (or sharp) character is a delimiter between a URI and a fragment, and is as such disallowed in the URI syntax. This could more likely be the reason for the validation exception. If you have access to the schema which the xml is validated against, I suggest you run your own validation with eg. xmllint or a similar XML tool.


If you use xjc compiler, you can add -nv attr to turn off strict validation of xsd scheme.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜