Skip to main content

Problems with c14n support

1 reply [Last post]
joey_cadence
Offline
Joined: 2009-01-12
Points: 0

We are trying to turn on C14n support to the marshaller using:
marshaller.setProperty("com.sun.xml.bind.c14n", Boolean.TRUE)

But when we do so we end up with two problems:
1) Schemas that have elements with more than 8 attributes throw an exception in the C14nXmlOutput.attribute() method. Looking at the source it appears obvious to me the problem is caused by the loop in the method.

public void attribute(Name name, String value) throws IOException {
if(staticAttributes.length==len) {
// reallocate
int newLen = len*2;
StaticAttribute[] newbuf = new StaticAttribute[newLen];
System.arraycopy(staticAttributes,0,newbuf,0,len);
for(int i=len;i

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
joey_cadence
Offline
Joined: 2009-01-12
Points: 0

We are moving to Java 7, trying to use the built support for Jaxb and the standard c14n support -- it has the exact same problem as we reported 2 years ago. Are we the only people in the world running into such problems? I find that hard to believe.

Suggestions on how to avoid the problems?

joey