Jessica-

Well, that explains one problem at least, but that new problem jumps out of my league pretty quickly. I looked into the exception your getting, and it's a portion of the code I've never looked at before, so I'm probably not much help. Looking at the test case that raises the NPE might shed a little light on the situation though.

But in any case, I'm glad we got at least one roadblock out of the way, though it is unfortunate another popped up.

Stephen


Jessica Perry Hekman wrote:
On Mon, Dec 19, 2005 at 04:36:55PM -0500, Stephen Bash wrote:


Jessica, I noticed your XML is lacking the xsi:type attributes on the objects inside the map. Was the XML you originally sent generated by Castor? If so, are you using Marshaller.setSuppressXSIType(true)?


Hmm. I am working inside of a larger system, and was told to use a method in that system to create the Marshaller for me. Looking at the actual code I see:

public static Marshaller getMarshaller(Writer writer, Mapping mapping) throws Exception
   {
      Marshaller marshaller = new Marshaller(writer);
      marshaller.setDebug(true);
      marshaller.setMapping(mapping);
      marshaller.setSuppressNamespaces(true);
      marshaller.setSuppressXSIType(true);
      return marshaller;
   }

So yes, I was using setSuppressXSIType(true). I reset it to false and recompiled (just as a test -- if that works I'll have to figure out why this system was using it set to true in the first place). Reran the code and got:

1) testQuotation(com.ingenta.ics.ecommerce.api.item.QuotationMarshallingTest)java.lang.NullPointerException at org.exolab.castor.xml.MarshalFramework.searchInheritance(MarshalFramework.java:370)
        at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1147)
        at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1705)
[...]

Interesting. I presume there is some weird interaction going on here between Castor and the larger system. I presume that my team leader might know what it is -- but he's on holiday for the next few days.

I will start trying to make test cases to figure out what's going on. In the meantime, if the above exception means anything to any of you, please let me know!

And at any rate thanks very much for the pointer -- I would never have known that there were supposed to be xsi:type attributes set on these things in the first place.

Jessica

-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------



-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to