On Friday 07 May 2010 4:46:44 pm Jeffrey Knight wrote: > > On Friday 07 May 2010 3:28:19 pm Jeffrey Knight wrote: > >> I'm using CFX 2.2.7. I'm ok on on the CFX side. > >> > >> It's really the XML Schema validation side that I'm struggling with, > >> because this XML > >> <ns:imageData> > >> <inc:Include href="cid:143666242607" > >> xmlns:inc="http://www.w3.org/2004/08/xop/include"/> > >> </ns:imageData> > > > > Well, I guess my point is that if you let CXF do the schema validation > > instead, it should be OK (assuming JAXB databinding). I don't really > > know anything about the DataPower stuff to know if that's an option or > > not. > > > > Dan > > Is this the piece of jaxb code letting schema validation work for both > the mtom and base64 cases? I'm trying to understand how schema > validation could work for both base64 and MTOM cases. Thanks for the > help on this. > > jaxb/io/DataWriterImp.java: > 72 public boolean handleEvent(ValidationEvent event) { > 73 String msg = event.getMessage(); > 74 if (msg.startsWith("cvc-type.3.1.2: ") > 75 && > msg.contains(marshaller.getLastMTOMElementName().getLocalPart())) { > 76 return true; > 77 }
For the writing side, yea. Basically, when the validation fails, we check the event to see if the failure was during the the validating of the lat MTOM element, and if so, tell jaxb to ignore it and continue. On the incoming side, I don't think we had to do anything. JAXB handles the MTOM stuff prior to making the calls to the validator to actually validate it. Thus, by the time the validator sees it, the Include is "gone". -- Daniel Kulp [email protected] http://dankulp.com/blog
