[
http://jira.jboss.com/jira/browse/JBWS-1281?page=all ]
Thomas Diesler updated JBWS-1281:
---------------------------------
Summary: Marshalling exception with xsi:nil='1' but without xsi:type (was:
When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1',
however, it does not send type information with xsi:type=xxxx. It causes exception in
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java.)
Marshalling exception with xsi:nil='1' but without xsi:type
-----------------------------------------------------------
Key: JBWS-1281
URL:
http://jira.jboss.com/jira/browse/JBWS-1281
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-jaxrpc
Affects Versions: jbossws-1.0.2
Environment: windows xp, linux, jdk1.5
Reporter: George Gan
Fix For: jbossws-2.0.0
Attachments: SundayContentHandler.java
When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1',
however, it does not send type information with xsi:type=xxxx. It causes exception in
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java. I hacked to code to
only compare the localpart:
public void endElement(String namespaceURI, String localName, String qName)
{
ElementBinding elementBinding = null;
QName endName = localName.length() == 0 ? new QName(qName) : new
QName(namespaceURI, localName);
StackItem item;
while(true)
{
item = stack.peek();
if(item.cursor == null)
{
if(item.ended)
{
pop();
if(item.particle.isRepeatable())
{
endRepeatableParticle(item.particle);
}
}
else
{
elementBinding = (ElementBinding)item.particle.getTerm();
item.ended = true;
break;
}
}
else
{
if(!item.ended) // could be ended if it's a choice
{
endParticle(item, endName, 1);
}
ParticleBinding currentParticle = item.cursor.getCurrentParticle();
TermBinding term = currentParticle.getTerm();
if(term.isWildcard() && currentParticle.isRepeatable())
{
endRepeatableParticle(currentParticle);
}
pop();
if(item.particle.isRepeatable())
{
endRepeatableParticle(item.particle);
}
}
}
if(elementBinding == null)
{
throw new JBossXBRuntimeException("Failed to endElement " + qName +
": binding not found");
}
//if(!elementBinding.getQName().equals(endName))
<--------------------------------------- hack starts here
// GG hack only compare the local parts. In the case of the an element is nil,
// there is no type prefix
if(!endName.getLocalPart().equals( elementBinding.getQName().getLocalPart()))
{
throw new JBossXBRuntimeException("Failed to end element " +
new QName(namespaceURI, localName) +
": element on the stack is " + elementBinding.getQName()
);
}
endElement();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira