Chuck, thanks for your help.

Yes, I added a line to check whether byte_output_stream is null before
instantiate the NSXMLOutputStream. I've also added other checks for null in
the XMLSerializer, but does not find any.

Here is my problem that I've been fighting for a while:
I'm trying to write a web service which returns fields from multiple
enterprise objects. Initially, I did it with Direct to Web Service, and it
turned out very simple.  Since the web service consumer is not a WebObjects
application, I choose to return SOAP struct.

But if I write the web service server without using D2WS, how to return
fields from multiple enterprise objects in SOAP struct? I couldn't find much
resources on the web about this. I started to read your book Chp 11 that
talks about "XML and Object Serialization". I wonder if that's the solution
to my problem. But after I downloaded the source code of Chp 11 and putting
it altogether, it still failed with java.lang.ExceptionInInitializerError on
line XMLSerializer.serializeArray(rows). I don't know how to make it work.

Thanks for any ideas.

Wen

On 1/10/08 6:32 PM, "Chuck Hill" <[EMAIL PROTECTED]> wrote:

> 
> On Jan 10, 2008, at 5:10 PM, Xia, Wen wrote:
> 
>> When I tried to use the XMLSerializer.java in my project, I keep
>> getting the error:
>> 
>> A fatal exception occurred: null
>> [2008-01-10 16:56:17 PST] <main> java.lang.ExceptionInInitializerError
>>     at XMLSerializer.serializeArray(XMLSerializer.java:24)
>>     at EbudgetWebService.getBSChapter(EbudgetWebService.java:19)
>>     at Application.<init>(Application.java:64)
>>     at sun.reflect.NativeConstructorAccessorImpl.newInstance0
>> (Native Method)
>>     at sun.reflect.NativeConstructorAccessorImpl.newInstance
>> (NativeConstructorAccessorImpl.java:39)
>> 
>> Line 24 in XMLSerializer.java is:
>> NSXMLOutputStream stream = new NSXMLOutputStream(byte_output_stream);
> 
> It is a blank line for me.  Have you changed this file?
> 
> I'd add some log lines in XMLSerializer to see if you are passing
> null to a constructor someplace.
> 
> 
>> And I¹m calling the method XMLSerializer.serializeArray with the
>> following line:
>> NSArray rows  = EOUtilities.objectsMatchingValues(ec, "bsChapter",
>> bindings);
>> String rawData = XMLSerializer.serializeArray(rows);
>> 
>> I don¹t know what is wrong.  If anyone use the code successfully,
>> please advise.
> 
> 
> Chuck

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to