axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Urgent interop problem with .NET if String parameter is null -> big problem
Date Thu, 21 Mar 2002 15:24:58 GMT
> What now?

You will have to wait until someone implements the missing feature.
Or pitch in and implement it yourself.

Omitting parameters is allowed by the spec, and .NET does it. :-(

The trick is how do you dispatch the request to the correct operation
if you can't use the parameters of the operation to select which method
to call?

Example:
  myFunc(int i, String foo);
  myFunc(int i);

If <foo> is missing from the XML, which function do you call?  .NET
does it with SoapAction, which is different even for methods which are
overloaded.

Glen Daniels is currently working on some much needed changes
that will clean up the way the Axis engine does operation
resolution.  While this (probably) wont fix the problem right away,
it will lay the foundation for code that can do the search.

--
Tom Jordahl
Macromedia


-----Original Message-----
From: Thomas Börkel [mailto:tb@ap-ag.com]
Sent: Thursday, March 21, 2002 9:00 AM
To: axis-dev@xml.apache.org
Subject: RE: Urgent interop problem with .NET if String parameter is
null -> big problem


OK, according to W3C, it is allowed to omit null parameters:

>From http://www.w3c.org/TR/2001/WD-soap12-part2-20011217/:
A NULL value or a default value MAY be represented by omission of the accessor element. A
NULL value MAY also be indicated by an accessor element containing the attribute xsi:nil with
value "1 or true" or possibly other application-dependent attributes and values.

What now?

> -----Original Message-----
> From: Thomas Börkel 
> Sent: Donnerstag, 21. März 2002 11:30
> To: axis-dev@xml.apache.org
> Subject: RE: Urgent interop problem with .NET if String parameter is
> null -> big problem
> 
> 
> 
> Apparently, this is not a problem if the client is Axis, 
> because Axis sends always all parameters and marks those 
> which are null with xsi:nil="true".
> 
> So, is this a bug of .NET or a missing feature in Axis? If it 
> is no bug in .NET, because it's allowed to omit null 
> parameters, then we have a big problem in Axis, I think, 
> because Axis does not know the parameter names at runtime.
> 
> > -----Original Message-----
> > From: Thomas Börkel 
> > Sent: Mittwoch, 20. März 2002 15:27
> > To: Axis Dev Mailinglist
> > Subject: Urgent interop problem with .NET if String 
> parameter is null
> > 
> > 
> > HI!
> > 
> > Consider the following method in a Java server:
> > 
> >   public String parameterTest(short s, int i, double d, 
> > String t, boolean b)
> > 
> > 
> > Now, if .NET is the client and I call parameterTest(1, 2, 
> > 3.5, null, true), then .NET does not pass in 't' at all. This 
> > results in an error in Axis.
> > 
> > This is the SOAP message from .NET for this:
> > 
> > <?xml version="1.0" encoding="utf-8"?>
> > <soap:Envelope 
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
> > xmlns:tns="http://p2test.p2plus.apag.com" 
> > xmlns:types="http://p2test.p2plus.apag.com/encodedTypes" 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >   <soap:Body 
> > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >     <tns:parameterTest>
> >       <s xsi:type="xsd:short">1</s>
> >       <i xsi:type="xsd:int">2</i>
> >       <d xsi:type="xsd:double">3.5</d>
> >       <b xsi:type="xsd:boolean">true</b>
> >     </tns:parameterTest>
> >   </soap:Body>
> > </soap:Envelope>
> > 
> > 
> > I am using Axis Beta1 and .NET 1.0. Anyone any ideas how to 
> > get this to work? Is it .NET's fault? Then I'll file a bug 
> > report to MS about this.
> > 
> > Thanks!
> > 
> > Regards,
> > Thomas
> > 
> > 
> 

Mime
View raw message