You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "Justin F. Knotzke" <sh...@shampoo.ca> on 2002/12/05 17:19:36 UTC

Missing Type..

   I am getting the following back in an envelope:
    
   <rocomment xsi:null="1"/>

   According to the API, I rocomment is of type 'string'.

   I assume this is a bug on their end? Is there a way I can handle for
this?

   Justin


-- 
Justin F. Knotzke
shampoo@shampoo.ca
http://www.shampoo.ca

Re: Missing Type..

Posted by "Justin F. Knotzke" <sh...@shampoo.ca>.
On Fri, Dec 06, 2002 at 08:38:35PM +0100, Alex Dovlecel wrote:

> A sollution is to modify the client to add those xsi:type every time. :o))) 
> In kSoap case, was pretty easy. 
  
    I am going to try and take a look at the nightly build but if I
decide to modify the client instead, how would one write the code to
handle this using Apache-SOAP?

   Thanks
   Justin.


-- 
Justin F. Knotzke
shampoo@shampoo.ca
http://www.shampoo.ca

Re: Missing Type..

Posted by Scott Nichol <sn...@scottnichol.com>.
> But to be honest, is hard not to use an xsi:type when nill. Because,
in case
> of multiple methods with the same name, same number of params, the
apache
> soap could not decide wich one to invoke because it knows only that
the
> method M was called like this : M( null ). But has no type for null.

This is quite true.  Apache SOAP cannot pick the method to execute if it
does not know the type of a parameter.

BTW, the workaround for xsi:null without xsi:type requires a type
mapping for the element name.  It is not a general fix.

Scott Nichol


Re: Missing Type..

Posted by Scott Nichol <sn...@scottnichol.com>.
> But to be honest, is hard not to use an xsi:type when nill. Because,
in case
> of multiple methods with the same name, same number of params, the
apache
> soap could not decide wich one to invoke because it knows only that
the
> method M was called like this : M( null ). But has no type for null.

This is quite true.  Apache SOAP cannot pick the method to execute if it
does not know the type of a parameter.

BTW, the workaround for xsi:null without xsi:type requires a type
mapping for the element name.  It is not a general fix.

Scott Nichol


Re: Missing Type..

Posted by "Justin F. Knotzke" <sh...@shampoo.ca>.
On Fri, Dec 06, 2002 at 08:38:35PM +0100, Alex Dovlecel wrote:

> A sollution is to modify the client to add those xsi:type every time. :o))) 
> In kSoap case, was pretty easy. 
  
    I am going to try and take a look at the nightly build but if I
decide to modify the client instead, how would one write the code to
handle this using Apache-SOAP?

   Thanks
   Justin.


-- 
Justin F. Knotzke
shampoo@shampoo.ca
http://www.shampoo.ca

Re: Missing Type..

Posted by Alex Dovlecel <do...@kbs.twi.tudelft.nl>.
We have also hit this wall some time ago!!! We were using ksoap as client 
and, when null, ksoap does not add the xsi:type to the object. And apache 
soap crashed. 

A sollution is to modify the client to add those xsi:type every time. :o))) 
In kSoap case, was pretty easy. 

But to be honest, is hard not to use an xsi:type when nill. Because, in case 
of multiple methods with the same name, same number of params, the apache 
soap could not decide wich one to invoke because it knows only that the 
method M was called like this : M( null ). But has no type for null. 

When I last time checked this one, apache soap was in fact crashing (like 
some internal exception of some kind, maybe NPE) and I had no idea what was 
happening. So at least to throw an exception would be nice. :o))) 

dovle 

(sorry if I just said alot of stupid stuff) :o(


> It cannot be classified as a bug, because the SOAP spec does not require
> xsi:type.  Apache SOAP was originally written to require it, though, so
> it has problems when it is not included.  The current code base
> (available, e.g., in the nightly builds) has some code to help with the
> exact case of xsi:null (or xsi:nil) being specified without an xsi:type.
> If you are not using a nightly build, you might want to try one to see
> whether it works for you.
>
> BTW, there *may* be a bug in the code generating the message: the 2001
> XML Schema specifies xsi:nil instead of xsi:null.  .NET is known to have
> this bug.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Justin F. Knotzke" <sh...@shampoo.ca>
> To: "Soap User Group" <so...@xml.apache.org>
> Sent: Thursday, December 05, 2002 11:19 AM
> Subject: Missing Type..
>
> >    I am getting the following back in an envelope:
> >
> >    <rocomment xsi:null="1"/>
> >
> >    According to the API, I rocomment is of type 'string'.
> >
> >    I assume this is a bug on their end? Is there a way I can handle
>
> for
>
> > this?
> >
> >    Justin
> >
> >
> > --
> > Justin F. Knotzke
> > shampoo@shampoo.ca
> > http://www.shampoo.ca
> >
> > --
> > To unsubscribe, e-mail:
>
> <ma...@xml.apache.org>
>
> > For additional commands, e-mail:
>
> <ma...@xml.apache.org>

Re: Missing Type..

Posted by Alex Dovlecel <do...@kbs.twi.tudelft.nl>.
We have also hit this wall some time ago!!! We were using ksoap as client 
and, when null, ksoap does not add the xsi:type to the object. And apache 
soap crashed. 

A sollution is to modify the client to add those xsi:type every time. :o))) 
In kSoap case, was pretty easy. 

But to be honest, is hard not to use an xsi:type when nill. Because, in case 
of multiple methods with the same name, same number of params, the apache 
soap could not decide wich one to invoke because it knows only that the 
method M was called like this : M( null ). But has no type for null. 

When I last time checked this one, apache soap was in fact crashing (like 
some internal exception of some kind, maybe NPE) and I had no idea what was 
happening. So at least to throw an exception would be nice. :o))) 

dovle 

(sorry if I just said alot of stupid stuff) :o(


> It cannot be classified as a bug, because the SOAP spec does not require
> xsi:type.  Apache SOAP was originally written to require it, though, so
> it has problems when it is not included.  The current code base
> (available, e.g., in the nightly builds) has some code to help with the
> exact case of xsi:null (or xsi:nil) being specified without an xsi:type.
> If you are not using a nightly build, you might want to try one to see
> whether it works for you.
>
> BTW, there *may* be a bug in the code generating the message: the 2001
> XML Schema specifies xsi:nil instead of xsi:null.  .NET is known to have
> this bug.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Justin F. Knotzke" <sh...@shampoo.ca>
> To: "Soap User Group" <so...@xml.apache.org>
> Sent: Thursday, December 05, 2002 11:19 AM
> Subject: Missing Type..
>
> >    I am getting the following back in an envelope:
> >
> >    <rocomment xsi:null="1"/>
> >
> >    According to the API, I rocomment is of type 'string'.
> >
> >    I assume this is a bug on their end? Is there a way I can handle
>
> for
>
> > this?
> >
> >    Justin
> >
> >
> > --
> > Justin F. Knotzke
> > shampoo@shampoo.ca
> > http://www.shampoo.ca
> >
> > --
> > To unsubscribe, e-mail:
>
> <ma...@xml.apache.org>
>
> > For additional commands, e-mail:
>
> <ma...@xml.apache.org>

Re: Missing Type..

Posted by Scott Nichol <sn...@scottnichol.com>.
It cannot be classified as a bug, because the SOAP spec does not require
xsi:type.  Apache SOAP was originally written to require it, though, so
it has problems when it is not included.  The current code base
(available, e.g., in the nightly builds) has some code to help with the
exact case of xsi:null (or xsi:nil) being specified without an xsi:type.
If you are not using a nightly build, you might want to try one to see
whether it works for you.

BTW, there *may* be a bug in the code generating the message: the 2001
XML Schema specifies xsi:nil instead of xsi:null.  .NET is known to have
this bug.

Scott Nichol

----- Original Message -----
From: "Justin F. Knotzke" <sh...@shampoo.ca>
To: "Soap User Group" <so...@xml.apache.org>
Sent: Thursday, December 05, 2002 11:19 AM
Subject: Missing Type..


>
>    I am getting the following back in an envelope:
>
>    <rocomment xsi:null="1"/>
>
>    According to the API, I rocomment is of type 'string'.
>
>    I assume this is a bug on their end? Is there a way I can handle
for
> this?
>
>    Justin
>
>
> --
> Justin F. Knotzke
> shampoo@shampoo.ca
> http://www.shampoo.ca
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Missing Type..

Posted by Scott Nichol <sn...@scottnichol.com>.
It cannot be classified as a bug, because the SOAP spec does not require
xsi:type.  Apache SOAP was originally written to require it, though, so
it has problems when it is not included.  The current code base
(available, e.g., in the nightly builds) has some code to help with the
exact case of xsi:null (or xsi:nil) being specified without an xsi:type.
If you are not using a nightly build, you might want to try one to see
whether it works for you.

BTW, there *may* be a bug in the code generating the message: the 2001
XML Schema specifies xsi:nil instead of xsi:null.  .NET is known to have
this bug.

Scott Nichol

----- Original Message -----
From: "Justin F. Knotzke" <sh...@shampoo.ca>
To: "Soap User Group" <so...@xml.apache.org>
Sent: Thursday, December 05, 2002 11:19 AM
Subject: Missing Type..


>
>    I am getting the following back in an envelope:
>
>    <rocomment xsi:null="1"/>
>
>    According to the API, I rocomment is of type 'string'.
>
>    I assume this is a bug on their end? Is there a way I can handle
for
> this?
>
>    Justin
>
>
> --
> Justin F. Knotzke
> shampoo@shampoo.ca
> http://www.shampoo.ca
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>