Hi Yogesh,
Hmmm. Looks like a bug :-(. Could you please file a JIRA issue?
Thanks,
Dan
On 12/27/06, Yogesh Chawla - PD <[EMAIL PROTECTED]> wrote:
Hello All,
I autogenerated an xfire client using the Eclipse
plugin. When I go to invoke my webservice, I get the
following error:
Caused by: org.jdom.IllegalNameException: The name ""
is not legal for JDOM/XML attribute namespaces: An
attribute namespace without a prefix can only be the
NO_NAMESPACE namespace.
at org.jdom.Attribute.setNamespace(Attribute.java:456)
at org.jdom.Attribute.<init>(Attribute.java:206)
at
org.codehaus.xfire.util.stax.JDOMStreamWriter.writeAttribute(JDOMStreamWriter.java:124)
The app crashes because the 'namespace' attribute is
"". There are two methods for 'writeAttribute'. One
that accepts a prefix and one that does not:
public void writeAttribute(String prefix, String
namespace, String local, String value)
throws XMLStreamException
{
currentNode.setAttribute(new Attribute(local,
value, Namespace.getNamespace(prefix,
namespace)));
}
public void writeAttribute(String namespace,
String local, String value)
throws XMLStreamException
{
currentNode.setAttribute(new Attribute(local,
value, Namespace.getNamespace(namespace)));
}
Perhaps the XMLStreamWriterOutput.attribute is calling
the wrong method. Is this a bug? Is this a schema
problem? The two attributes where the failure occurs
should use the default namespace for the element but
do not.
If I going into a debugger and set the prefix to
something, the error does not occur.
Here is the complete stack trace. Any ideas?
Thanks,
Yogesh
Exception in thread "main"
org.codehaus.xfire.XFireRuntimeException: Could not
invoke service.. Nested exception is
org.codehaus.xfire.fault.XFireFault: The name "" is
not legal for JDOM/XML attribute namespaces: An
attribute namespace without a prefix can only be the
NO_NAMESPACE namespace.
org.codehaus.xfire.fault.XFireFault: The name "" is
not legal for JDOM/XML attribute namespaces: An
attribute namespace without a prefix can only be the
NO_NAMESPACE namespace.
at
org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at
org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at
org.codehaus.xfire.client.Client.invoke(Client.java:335)
at
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at
org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy12.pointerCount(Unknown Source)
at
gov.wisconsin.wijis.gateway.pointercountservice.PointerCountServiceClient.main(PointerCountServiceClient.java:130)
Caused by: org.jdom.IllegalNameException: The name ""
is not legal for JDOM/XML attribute namespaces: An
attribute namespace without a prefix can only be the
NO_NAMESPACE namespace.
at
org.jdom.Attribute.setNamespace(Attribute.java:456)
at org.jdom.Attribute.<init>(Attribute.java:206)
at
org.codehaus.xfire.util.stax.JDOMStreamWriter.writeAttribute(JDOMStreamWriter.java:124)
at
com.sun.xml.bind.v2.runtime.output.XMLStreamWriterOutput.attribute(XMLStreamWriterOutput.java:91)
at
com.sun.xml.bind.v2.runtime.output.XmlOutputAbstractImpl.attribute(XmlOutputAbstractImpl.java:72)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.attribute(XMLSerializer.java:413)
at
com.sun.xml.bind.v2.runtime.property.AttributeProperty.serializeAttributes(AttributeProperty.java:65)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeAttributes(ClassBeanInfoImpl.java:302)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:617)
at
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:114)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:98)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:127)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:244)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:251)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:33)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:461)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:292)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:148)
at
org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:253)
at
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:206)
at
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.writeHeaders(ServiceInvocationHandler.java:295)
at
org.codehaus.xfire.client.Invocation.invoke(Invocation.java:73)
... 5 more
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email