You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Victor Hadianto <vi...@nuix.com.au> on 2001/09/14 03:45:57 UTC

returning null value

Hi,

I'm new to Apache SOAP and having a problem returning a null value from the 
server side.

I got an IO exception and trace it to the this bit of code in the 
SOAPContext.java:


    public void writeTo(OutputStream os)
        throws IOException, MessagingException {
        int count = getCount();
        if (count == 0) {
            System.out.println("Count is 0, will throw IO Exception now");
            throw new IOException("Message is empty!");
        }
<cut> ...............

I'm pretty sure I must have done something wrong here. The count is 0 when 
I'm returning a null value.

Does anyone have an idea?

Regards,
-- 
Victor Hadianto
Nuix Pty. Ltd.      (02) 9283 9010

Re: returning null value

Posted by Victor Hadianto <vi...@nuix.com.au>.
Fixed it. 

A colleague of mine pointed out where the problem is. Apparently the problem 
lies in my Soap service provider

Regards,

Victor

On Fri, 14 Sep 2001 11:45, you wrote:
> Hi,
>
> I'm new to Apache SOAP and having a problem returning a null value from the
> server side.
>
> I got an IO exception and trace it to the this bit of code in the
> SOAPContext.java:
>
>
>     public void writeTo(OutputStream os)
>         throws IOException, MessagingException {
>         int count = getCount();
>         if (count == 0) {
>             System.out.println("Count is 0, will throw IO Exception now");
>             throw new IOException("Message is empty!");
>         }
> <cut> ...............

Re: returning null value

Posted by Victor Hadianto <vi...@nuix.com.au>.
Fixed it. 

A colleague of mine pointed out where the problem is. Apparently the problem 
lies in my Soap service provider

Regards,

Victor

On Fri, 14 Sep 2001 11:45, you wrote:
> Hi,
>
> I'm new to Apache SOAP and having a problem returning a null value from the
> server side.
>
> I got an IO exception and trace it to the this bit of code in the
> SOAPContext.java:
>
>
>     public void writeTo(OutputStream os)
>         throws IOException, MessagingException {
>         int count = getCount();
>         if (count == 0) {
>             System.out.println("Count is 0, will throw IO Exception now");
>             throw new IOException("Message is empty!");
>         }
> <cut> ...............