[ http://jira.codehaus.org/browse/XFIRE-609?page=comments#action_82193 ] Chris Mathrusse commented on XFIRE-609: ---------------------------------------
I've come accross this as well back in 1.2.1 when using XFire with XmlBeans. I patched my local copy of the source and resolved this issue. It involved modifications to two files: org.codehaus.xfire.util.NamespaceHelper (xfire-core) and org.codehaus.xfire.xmlbeans.XmlBeansWSDLBuilder (xfire-xmlbeans) I'll attach the two files that I've modified. The changes are very small. > Missing targetNamespace in source schema causes NullPointerException in > XmlBeansWSDLBuilder > ------------------------------------------------------------------------------------------- > > Key: XFIRE-609 > URL: http://jira.codehaus.org/browse/XFIRE-609 > Project: XFire > Issue Type: Bug > Components: XMLBeans > Affects Versions: 1.1.2 > Reporter: Robert Watkins > Assigned To: Dan Diephouse > Fix For: 1.2.4 > > Attachments: xfire-bug.zip > > > I had a schema file that imported several other schema files. The top-level > one specified a targetNamespace for the schema, but the imported ones did not. > The schemas were proccessed by XmlBeans without any problems. > When using the XmlBean-generated classes in XFire, I got a > (very-hard-to-diagnose) NullPointerException in the XmlBeansWSDLBuilder, at > line 46. The NPE was caused by the fact that getSchema() returns null at line > 82, if the XPath expresssion //xsd:[EMAIL PROTECTED]'" + ns + "']" fails to > find anything. > Ideally, the code would use the importing schema's targetNamespace (well, at > least that's what XmlBeans does). At the very least, however, throwing an > exception indicating which schema was being processed and didn't have the > targetNamespace would make the error easier to diagnose and to fix. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
