You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jarmo Doc <ja...@hotmail.com> on 2006/01/10 17:52:21 UTC

Axis 1.3 suitable for production env?

Is Axis 1.3 suitable for a production environment?  And is it the most 
suitable Axis version for a production environment?

I ask because some very, very basic things appear to cause major headaches:

1. exceptions descending from java.rmi.RemoteException (as per the Axis 
sample NoSuchEmployeeFault) cause java2wsdl to report "The class 
java.lang.Throwable is defined in a java or javax package and cannot be 
converted into an xml schema type.  An xml schema anyType will be used to 
define this class in the wsdl file."

2. you have to jump through hoops to avoid intermediate ArrayOfxxxx classes.

3. Boolean parameters to operations appear to be converted to intrinsic 
booleans (note lowercase) in an Axis client so you can only pass true/false 
when you need to be able to pass true/false/null.

4. major bugs raised in Jira over a year before the release of Axis 1.3 
final have not yet been fixed (e.g. the bug in 
AxisHTTPSessionListener::destroySession whereby *no* Axis sessions are being 
destroyed correctly).

Don't want to sound negative, just want to know if I'm fighting a losing 
battle using Axis 1.3.

Thanks.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
Raised bug: http://issues.apache.org/jira/browse/AXIS-2366


>From: "Jarmo Doc" <ja...@hotmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Wed, 11 Jan 2006 04:49:12 -0800
>
>Thanks Alin.  Your suggested workaround is a good one and does the trick.  
>It's clearly a bug in both java2wsdl and wsdl2java** -- nillable=true is 
>surely the correct thing to emit given that the parameters in question are 
>not arrays.
>
>** and if I can work out how to raise bugs against Axis 1.3 then I'll do 
>so.

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
Thanks Alin.  Your suggested workaround is a good one and does the trick.  
It's clearly a bug in both java2wsdl and wsdl2java** -- nillable=true is 
surely the correct thing to emit given that the parameters in question are 
not arrays.

** and if I can work out how to raise bugs against Axis 1.3 then I'll do so.


>From: Alin Simionoiu <al...@zivva.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 19:07:39 -0500
>
>That is indeed a problem in Axis code.
>I had the same problem before and by looking at Axis source code I  found 
>out that you actually need to set minOccurs and maxOccurs to  have the 
>functionality that you want.
>
>In your case instead of setting by hand nillable="true" try to set by  
>hand: minOccurs="0" maxOccurs="1".
>The Axis client then will use Boolean object instead of boolean.
>
>if you set minOccurs="1" maxOccurs="1" then is setting the base type  
>boolean instead of object Boolean.
>
>Kind of makes sense but I was expecting the same behavior when I set  
>nillable.
>
>
>On Jan 10, 2006, at 6:32 PM, Jarmo Doc wrote:
>
>>If I manually add nillable="true" to the WSDL for these Boolean  operation 
>>parameters and then generate both Axis 1.3 and gSOAP  2.7.1 clients then:
>>
>>- the Axis client is wrong: it generates intrinsic booleans which  do not 
>>allow for null
>>
>>- the gSOAP client is correct: it generates pointers to a boolean  type 
>>thus allowing for null
>>
>>And all of this leads me to the conclusion that Axis 1.3 is bugged  in two 
>>places.  If you write a doc/lit service that contains an  operation such 
>>as the following:
>>
>>public void update(Employee [] employees, Boolean sacked);
>>
>>1. java2wsdl does not generate nillable="true" for 'sacked' when it  
>>should, and
>>
>>2. even if you manually add nillable="true" for 'sacked', wsdl2java  does 
>>not generate Boolean, instead it generates boolean
>>
>>So that's not very good.
>>
>>>From: "Jarmo Doc" <ja...@hotmail.com>
>>>Reply-To: axis-user@ws.apache.org
>>>To: axis-user@ws.apache.org
>>>Subject: Re: Axis 1.3 suitable for production env?
>>>Date: Tue, 10 Jan 2006 12:43:16 -0800
>>>
>>>It always worked fine for attributes of user-defined classes.  It  
>>>doesn't appear to work at all (or maybe it's illegal?) for  parameters to 
>>>service operations.
>>>
>>>
>>>>From: Todd Orr <to...@gmail.com>
>>>>Reply-To: axis-user@ws.apache.org
>>>>To: axis-user@ws.apache.org
>>>>Subject: Re: Axis 1.3 suitable for production env?
>>>>Date: Tue, 10 Jan 2006 12:30:25 -0800
>>>>
>>>>My boolean situations is as follows:
>>>>
>>>>bean:
>>>>public void setPrimary(Boolean arg0) {
>>>>
>>>>generates:
>>>>Doc Lit - <element name="primary" nillable="true"  type="xsd:boolean"/>
>>>>RPC Enc - <element name="primary" nillable="true"  
>>>>type="soapenc:boolean"/>
>>>>
>>>>>From what I've seen java2wsdl will generate a nillable attribute  only
>>>>if the argument is non-primitive. So, Axis must be seeing your
>>>>argument as a boolean when it converts it. If you can absolutely
>>>>verify that your java2wsdl will not produce the nillable attribute,
>>>>file a bug request.
>>
>
>Alin Simionoiu
>alin.simionoiu@zivva.com

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Alin Simionoiu <al...@zivva.com>.
That is indeed a problem in Axis code.
I had the same problem before and by looking at Axis source code I  
found out that you actually need to set minOccurs and maxOccurs to  
have the functionality that you want.

In your case instead of setting by hand nillable="true" try to set by  
hand: minOccurs="0" maxOccurs="1".
The Axis client then will use Boolean object instead of boolean.

if you set minOccurs="1" maxOccurs="1" then is setting the base type  
boolean instead of object Boolean.

Kind of makes sense but I was expecting the same behavior when I set  
nillable.


On Jan 10, 2006, at 6:32 PM, Jarmo Doc wrote:

> If I manually add nillable="true" to the WSDL for these Boolean  
> operation parameters and then generate both Axis 1.3 and gSOAP  
> 2.7.1 clients then:
>
> - the Axis client is wrong: it generates intrinsic booleans which  
> do not allow for null
>
> - the gSOAP client is correct: it generates pointers to a boolean  
> type thus allowing for null
>
> And all of this leads me to the conclusion that Axis 1.3 is bugged  
> in two places.  If you write a doc/lit service that contains an  
> operation such as the following:
>
> public void update(Employee [] employees, Boolean sacked);
>
> 1. java2wsdl does not generate nillable="true" for 'sacked' when it  
> should, and
>
> 2. even if you manually add nillable="true" for 'sacked', wsdl2java  
> does not generate Boolean, instead it generates boolean
>
> So that's not very good.
>
>> From: "Jarmo Doc" <ja...@hotmail.com>
>> Reply-To: axis-user@ws.apache.org
>> To: axis-user@ws.apache.org
>> Subject: Re: Axis 1.3 suitable for production env?
>> Date: Tue, 10 Jan 2006 12:43:16 -0800
>>
>> It always worked fine for attributes of user-defined classes.  It  
>> doesn't appear to work at all (or maybe it's illegal?) for  
>> parameters to service operations.
>>
>>
>>> From: Todd Orr <to...@gmail.com>
>>> Reply-To: axis-user@ws.apache.org
>>> To: axis-user@ws.apache.org
>>> Subject: Re: Axis 1.3 suitable for production env?
>>> Date: Tue, 10 Jan 2006 12:30:25 -0800
>>>
>>> My boolean situations is as follows:
>>>
>>> bean:
>>> public void setPrimary(Boolean arg0) {
>>>
>>> generates:
>>> Doc Lit - <element name="primary" nillable="true"  
>>> type="xsd:boolean"/>
>>> RPC Enc - <element name="primary" nillable="true"  
>>> type="soapenc:boolean"/>
>>>
>>> From what I've seen java2wsdl will generate a nillable attribute  
>>> only
>>> if the argument is non-primitive. So, Axis must be seeing your
>>> argument as a boolean when it converts it. If you can absolutely
>>> verify that your java2wsdl will not produce the nillable attribute,
>>> file a bug request.
>
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search! http:// 
> search.msn.click-url.com/go/onm00200636ave/direct/01/
>

Alin Simionoiu
alin.simionoiu@zivva.com




Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
If I manually add nillable="true" to the WSDL for these Boolean operation 
parameters and then generate both Axis 1.3 and gSOAP 2.7.1 clients then:

- the Axis client is wrong: it generates intrinsic booleans which do not 
allow for null

- the gSOAP client is correct: it generates pointers to a boolean type thus 
allowing for null

And all of this leads me to the conclusion that Axis 1.3 is bugged in two 
places.  If you write a doc/lit service that contains an operation such as 
the following:

public void update(Employee [] employees, Boolean sacked);

1. java2wsdl does not generate nillable="true" for 'sacked' when it should, 
and

2. even if you manually add nillable="true" for 'sacked', wsdl2java does not 
generate Boolean, instead it generates boolean

So that's not very good.

>From: "Jarmo Doc" <ja...@hotmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 12:43:16 -0800
>
>It always worked fine for attributes of user-defined classes.  It doesn't 
>appear to work at all (or maybe it's illegal?) for parameters to service 
>operations.
>
>
>>From: Todd Orr <to...@gmail.com>
>>Reply-To: axis-user@ws.apache.org
>>To: axis-user@ws.apache.org
>>Subject: Re: Axis 1.3 suitable for production env?
>>Date: Tue, 10 Jan 2006 12:30:25 -0800
>>
>>My boolean situations is as follows:
>>
>>bean:
>>public void setPrimary(Boolean arg0) {
>>
>>generates:
>>Doc Lit - <element name="primary" nillable="true" type="xsd:boolean"/>
>>RPC Enc - <element name="primary" nillable="true" type="soapenc:boolean"/>
>>
>>>From what I've seen java2wsdl will generate a nillable attribute only
>>if the argument is non-primitive. So, Axis must be seeing your
>>argument as a boolean when it converts it. If you can absolutely
>>verify that your java2wsdl will not produce the nillable attribute,
>>file a bug request.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
It always worked fine for attributes of user-defined classes.  It doesn't 
appear to work at all (or maybe it's illegal?) for parameters to service 
operations.


>From: Todd Orr <to...@gmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 12:30:25 -0800
>
>My boolean situations is as follows:
>
>bean:
>public void setPrimary(Boolean arg0) {
>
>generates:
>Doc Lit - <element name="primary" nillable="true" type="xsd:boolean"/>
>RPC Enc - <element name="primary" nillable="true" type="soapenc:boolean"/>
>
>>From what I've seen java2wsdl will generate a nillable attribute only
>if the argument is non-primitive. So, Axis must be seeing your
>argument as a boolean when it converts it. If you can absolutely
>verify that your java2wsdl will not produce the nillable attribute,
>file a bug request.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Todd Orr <to...@gmail.com>.
Not sure what's so special about an exception. My boolean situations
is as follows:

bean:
public void setPrimary(Boolean arg0) {

generates:
Doc Lit - <element name="primary" nillable="true" type="xsd:boolean"/>
RPC Enc - <element name="primary" nillable="true" type="soapenc:boolean"/>

>From what I've seen java2wsdl will generate a nillable attribute only
if the argument is non-primitive. So, Axis must be seeing your
argument as a boolean when it converts it. If you can absolutely
verify that your java2wsdl will not produce the nillable attribute,
file a bug request.


On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> I do have a typeMapping for my exception.  It was generated for me by
> wsdl2java, as follows:
>
>       <typeMapping
>         xmlns:ns="x.y.z"
>         qname="ns:MyException"
>         type="java:x.y.z.MyException"
>         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         encodingStyle=""
>       />
>
> I'm assuming that this is perfectly reasonable alternative to a beanmapping.
>
> What I don't understand is why java2wsdl reports that I should register a
> typemapping/beanmapping (does that mean oneor the other?  Or both?) for this
> exception when it does not report that for any other user-defined class.
> What's so special about an exeption?
>
>
> >From: Todd Orr <to...@gmail.com>
> >Reply-To: axis-user@ws.apache.org
> >To: axis-user@ws.apache.org
> >Subject: Re: Axis 1.3 suitable for production env?
> >Date: Tue, 10 Jan 2006 10:25:43 -0800
> >
> >#1 - I have been able to avoid all the Exception trouble you mention by
> >simply creating a beanMapping for my custom exception.
> >
> >On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> > >
> > > I do use document/literal.
> > >
> > > On the #1 issue below, I see the following from java2wsdl:
> > >
> > > - Please register a typemapping/beanmapping for 'xyz.myexception'
> > > - The class java.lang.Throwable is defined in a java or javax package
> >and
> > > cannot be converted into an xml schema type.  An xml schema anyType will
> > > be
> > > used to define this class in the wsdl file.
> > >
> > > How do I 'tweak' the WSDL to correct these issues?
> > >
> > >
> > > > > 1. exceptions descending from java.rmi.RemoteException (as per the
> > > Axis
> > > > > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> > > > > java.lang.Throwable is defined in a java or javax package and cannot
> > > be
> > > > > converted into an xml schema type.  An xml schema anyType will be
> >used
> > > >to
> > > > > define this class in the wsdl file."
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>

Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
I do have a typeMapping for my exception.  It was generated for me by 
wsdl2java, as follows:

      <typeMapping
        xmlns:ns="x.y.z"
        qname="ns:MyException"
        type="java:x.y.z.MyException"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />

I'm assuming that this is perfectly reasonable alternative to a beanmapping.

What I don't understand is why java2wsdl reports that I should register a 
typemapping/beanmapping (does that mean oneor the other?  Or both?) for this 
exception when it does not report that for any other user-defined class.  
What's so special about an exeption?


>From: Todd Orr <to...@gmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 10:25:43 -0800
>
>#1 - I have been able to avoid all the Exception trouble you mention by
>simply creating a beanMapping for my custom exception.
>
>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> >
> > I do use document/literal.
> >
> > On the #1 issue below, I see the following from java2wsdl:
> >
> > - Please register a typemapping/beanmapping for 'xyz.myexception'
> > - The class java.lang.Throwable is defined in a java or javax package 
>and
> > cannot be converted into an xml schema type.  An xml schema anyType will
> > be
> > used to define this class in the wsdl file.
> >
> > How do I 'tweak' the WSDL to correct these issues?
> >
> >
> > > > 1. exceptions descending from java.rmi.RemoteException (as per the
> > Axis
> > > > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> > > > java.lang.Throwable is defined in a java or javax package and cannot
> > be
> > > > converted into an xml schema type.  An xml schema anyType will be 
>used
> > >to
> > > > define this class in the wsdl file."

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
It's interesting that #3 works for you.  I have an operation such as (and 
note that it's java.lang.Boolean, not boolean):

public void update(Employee [] employees, Boolean sacked)

java2wsdl generates the following:

   <element name="update">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="employees" type="impl:Employee"/>
      <element name="sacked" type="xsd:boolean"/>
     </sequence>
    </complexType>
   </element>

When I create an Axis 1.3 client stub from this WSDL, I get the signature:

public void update(Employee [] employees, boolean sacked)

Hence I cannot supply null, I can only supply true/false.  Adding 
nillable="true" to the 'sacked' element in the WSDL and re-generating the 
client stub does *not* correct this behavior.

Any idea what could be different about your situation that makes it work for 
you?


>From: Todd Orr <to...@gmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 10:25:43 -0800
>
>#3 - This just isn't true. I have many Boolean fields defined. Watching the
>debugger I can plainly see that they come in as null if not provided.
>
>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> >
> > I do use document/literal.
> >
> >
> > On #3, I don't have a solution yet so may have to create an intermediate
> > class that contains the Booleans and then pass that class to the 
>operation
> > rather than passing the contained Booleans.
> >
> > > > 3. Boolean parameters to operations appear to be converted to
> > intrinsic
> > > > booleans (note lowercase) in an Axis client so you can only pass
> > >true/false
> > > > when you need to be able to pass true/false/null.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Todd Orr <to...@gmail.com>.
It seems as though you haven't looked hard enough for these answers.

#1 - I have been able to avoid all the Exception trouble you mention by
simply creating a beanMapping for my custom exception.

#2 - Easy. Create a typeMapping for your array and call it whatever you
want.

#3 - This just isn't true. I have many Boolean fields defined. Watching the
debugger I can plainly see that they come in as null if not provided.

#4 - Valid. There's only so much time in a day?

Another point: I have been able to use the java2wsdl tool without modifying
the wsdl at all. Of course, it depends on your needs. I have been able to
easily create a wsdl of my liking by simply creating the neccessary delegate
objects. I have yet to run into any trouble with wsdl creating I couldn't
get around.

On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
>
> I do use document/literal.
>
> On the #1 issue below, I see the following from java2wsdl:
>
> - Please register a typemapping/beanmapping for 'xyz.myexception'
> - The class java.lang.Throwable is defined in a java or javax package and
> cannot be converted into an xml schema type.  An xml schema anyType will
> be
> used to define this class in the wsdl file.
>
> How do I 'tweak' the WSDL to correct these issues?
>
> On the #2 issue below, I eventually found a workaround which is instead of
> writing the following:
>
> public class Employer
> {
>   public int employerID;
>   public Employee [] employees;
> }
>
> just write the following:
>
> public class Employer
> {
>   public int employerID;
>   public Employee [] employees; // could be private
>
>   public Employee [] getEmployees()
>   {
>     return this.employees;
>   }
>
>   public void setEmployees(Employee [] employees)
>   {
>     this.employees = employees;
>   }
> }
>
> This 'hack' solved all my problems to do with having to use
> ArrayOfEmployee
> in boith the Axis server and Axis clients.
>
> On #3, I don't have a solution yet so may have to create an intermediate
> class that contains the Booleans and then pass that class to the operation
> rather than passing the contained Booleans.
>
> >From: Davanum Srinivas <da...@gmail.com>
> >Reply-To: dims@apache.org
> >To: axis-user@ws.apache.org
> >Subject: Re: Axis 1.3 suitable for production env?
> >Date: Tue, 10 Jan 2006 11:58:31 -0500
> >
> >for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
> >sure u use document/literal and not rpc/encoded.
> >
> >thanks,
> >dims
> >
> >On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> > > Is Axis 1.3 suitable for a production environment?  And is it the most
> > > suitable Axis version for a production environment?
> > >
> > > I ask because some very, very basic things appear to cause major
> >headaches:
> > >
> > > 1. exceptions descending from java.rmi.RemoteException (as per the
> Axis
> > > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> > > java.lang.Throwable is defined in a java or javax package and cannot
> be
> > > converted into an xml schema type.  An xml schema anyType will be used
> >to
> > > define this class in the wsdl file."
> > >
> > > 2. you have to jump through hoops to avoid intermediate ArrayOfxxxx
> >classes.
> > >
> > > 3. Boolean parameters to operations appear to be converted to
> intrinsic
> > > booleans (note lowercase) in an Axis client so you can only pass
> >true/false
> > > when you need to be able to pass true/false/null.
>
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>

Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
#4 refers to http://issues.apache.org/jira/browse/AXIS-1995 which has a 
proposed (and good) fix attached to it.

I base my comment that it has not been fixed on a) the bug report status is 
'Open' and b) I downloaded the Axis 1.3 source and it does not have the fix. 
  I could be wrong, of course, but that's how it seems to me.


>From: Davanum Srinivas <da...@gmail.com>
>Reply-To: dims@apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 11:58:31 -0500
>
>for 4, which specific JIRA issues bother you? id's please?
>
>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> >
> > 4. major bugs raised in Jira over a year before the release of Axis 1.3
> > final have not yet been fixed (e.g. the bug in
> > AxisHTTPSessionListener::destroySession whereby *no* Axis sessions are 
>being
> > destroyed correctly).

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Davanum Srinivas <da...@gmail.com>.
Dies,
I think you are right in your analysis when starting from java.

Please see the wsdl's here:
http://svn.apache.org/viewcvs.cgi/webservices/axis/trunk/java/test/wsdl/faults/
http://svn.apache.org/viewcvs.cgi/webservices/axis/trunk/java/test/wsdl/faults2/

The axis test harness is a treasure trove...

thanks,
dims

On 1/10/06, Dies Koper <di...@jp.fujitsu.com> wrote:
> Hello Dims,
>
> I understand the bottom line, but if you would tell me the but's and
> if's you are referring to, that would make my day. (as it took me quite
> a while to investigate what's up with RemoteExceptions) 8-)
>
> Also, what kind of WSDL did you use to create this exception class?
>
> Thanks,
> Dies
>
>
> Davanum Srinivas wrote:
> > Dies,
> >
> > there are several if's and but's :) so the bottom line is to start
> > with a wsdl and run the code generator (wsdl2java) that's guaranteed
> > to work.
> >
> > thanks,
> > dims
> >
> > On 1/10/06, Dies Koper <di...@jp.fujitsu.com> wrote:
> >
> >>Hello Jarmo, Dims,
> >>
> >>About your #1 issue, I think it is a problem with the sample.
> >>
> >>The exception extends java.rmi.RemoteException.
> >>This superclass has a public Throwable "detail" field.
> >>So when you run java2wsdl, it'll try to map the detail field that your
> >>exception class inherited to XML. However, there is no standard mapping
> >>for fields of type Throwable, so it warns you to register a custom
> >>mapper, and continues by mapping the field to an xsd:anyType (optional
> >>mapping according to the JAX-RPC1.1 spec).
> >>
> >>When you create your client classes from the WSDL you'll end up with a
> >>"detail" field of java.lang.Object or SOAPElement, not sure which, as
> >>again there is no default mapping for this type.
> >>
> >>The JAX-RPC 1.1 spec speaks of service specific Java exception (declared
> >>as checked exceptions) and RemoteExceptions (and its subclasses), with
> >>the latter being used for problems related to remote method invocations
> >>(java.rmi.ConnectionException when you forgot to start the webserver, etc.).
> >>
> >>The sample's exception name is NoSuchEmployeeFault, which I think is a
> >>service specific exception, and therefore should extend
> >>java.lang.Exception, not java.lang.RemoteException.
> >>
> >>Dims,
> >>According to the following bug report you committed this sample.
> >>
> >> http://issues.apache.org/bugzilla/show_bug.cgi?id=19682
> >>
> >>I'd like to hear your comments about my comments above.
> >>
> >>Regards,
> >>Dies
> >>
> >>
> >>Jarmo Doc wrote:
> >>
> >>>I do use document/literal.
> >>>
> >>>On the #1 issue below, I see the following from java2wsdl:
> >>>
> >>>- Please register a typemapping/beanmapping for 'xyz.myexception'
> >>>- The class java.lang.Throwable is defined in a java or javax package
> >>>and cannot be converted into an xml schema type.  An xml schema anyType
> >>>will be used to define this class in the wsdl file.
> >>>
> >>>How do I 'tweak' the WSDL to correct these issues?
> >>>
> >>>On the #2 issue below, I eventually found a workaround which is instead
> >>>of writing the following:
> >>>
> >>>public class Employer
> >>>{
> >>> public int employerID;
> >>> public Employee [] employees;
> >>>}
> >>>
> >>>just write the following:
> >>>
> >>>public class Employer
> >>>{
> >>> public int employerID;
> >>> public Employee [] employees; // could be private
> >>>
> >>> public Employee [] getEmployees()
> >>> {
> >>>   return this.employees;
> >>> }
> >>>
> >>> public void setEmployees(Employee [] employees)
> >>> {
> >>>   this.employees = employees;
> >>> }
> >>>}
> >>>
> >>>This 'hack' solved all my problems to do with having to use
> >>>ArrayOfEmployee in boith the Axis server and Axis clients.
> >>>
> >>>On #3, I don't have a solution yet so may have to create an intermediate
> >>>class that contains the Booleans and then pass that class to the
> >>>operation rather than passing the contained Booleans.
> >>>
> >>>
> >>>>From: Davanum Srinivas <da...@gmail.com>
> >>>>Reply-To: dims@apache.org
> >>>>To: axis-user@ws.apache.org
> >>>>Subject: Re: Axis 1.3 suitable for production env?
> >>>>Date: Tue, 10 Jan 2006 11:58:31 -0500
> >>>>
> >>>>for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
> >>>>sure u use document/literal and not rpc/encoded.
> >>>>
> >>>>thanks,
> >>>>dims
> >>>>
> >>>>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> >>>>
> >>>>>Is Axis 1.3 suitable for a production environment?  And is it the most
> >>>>>suitable Axis version for a production environment?
> >>>>>
> >>>>>I ask because some very, very basic things appear to cause major
> >>>>
> >>>>headaches:
> >>>>
> >>>>>1. exceptions descending from java.rmi.RemoteException (as per the Axis
> >>>>>sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> >>>>>java.lang.Throwable is defined in a java or javax package and cannot be
> >>>>>converted into an xml schema type.  An xml schema anyType will be
> >>>>
> >>>>used to
> >>>>
> >>>>>define this class in the wsdl file."
> >>>>>
> >>>>>2. you have to jump through hoops to avoid intermediate ArrayOfxxxx
> >>>>
> >>>>classes.
> >>>>
> >>>>>3. Boolean parameters to operations appear to be converted to intrinsic
> >>>>>booleans (note lowercase) in an Axis client so you can only pass
> >>>>
> >>>>true/false
> >>>>
> >>>>>when you need to be able to pass true/false/null.
> >>>
> >>>
> >>>_________________________________________________________________
> >>>Express yourself instantly with MSN Messenger! Download today - it's
> >>>FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >>>
> >>>
> >>
> >>
> >
> >
> > --
> > Davanum Srinivas : http://wso2.com/blogs/
> >
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: Axis 1.3 suitable for production env?

Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Dims,

I understand the bottom line, but if you would tell me the but's and 
if's you are referring to, that would make my day. (as it took me quite 
a while to investigate what's up with RemoteExceptions) 8-)

Also, what kind of WSDL did you use to create this exception class?

Thanks,
Dies


Davanum Srinivas wrote:
> Dies,
> 
> there are several if's and but's :) so the bottom line is to start
> with a wsdl and run the code generator (wsdl2java) that's guaranteed
> to work.
> 
> thanks,
> dims
> 
> On 1/10/06, Dies Koper <di...@jp.fujitsu.com> wrote:
> 
>>Hello Jarmo, Dims,
>>
>>About your #1 issue, I think it is a problem with the sample.
>>
>>The exception extends java.rmi.RemoteException.
>>This superclass has a public Throwable "detail" field.
>>So when you run java2wsdl, it'll try to map the detail field that your
>>exception class inherited to XML. However, there is no standard mapping
>>for fields of type Throwable, so it warns you to register a custom
>>mapper, and continues by mapping the field to an xsd:anyType (optional
>>mapping according to the JAX-RPC1.1 spec).
>>
>>When you create your client classes from the WSDL you'll end up with a
>>"detail" field of java.lang.Object or SOAPElement, not sure which, as
>>again there is no default mapping for this type.
>>
>>The JAX-RPC 1.1 spec speaks of service specific Java exception (declared
>>as checked exceptions) and RemoteExceptions (and its subclasses), with
>>the latter being used for problems related to remote method invocations
>>(java.rmi.ConnectionException when you forgot to start the webserver, etc.).
>>
>>The sample's exception name is NoSuchEmployeeFault, which I think is a
>>service specific exception, and therefore should extend
>>java.lang.Exception, not java.lang.RemoteException.
>>
>>Dims,
>>According to the following bug report you committed this sample.
>>
>> http://issues.apache.org/bugzilla/show_bug.cgi?id=19682
>>
>>I'd like to hear your comments about my comments above.
>>
>>Regards,
>>Dies
>>
>>
>>Jarmo Doc wrote:
>>
>>>I do use document/literal.
>>>
>>>On the #1 issue below, I see the following from java2wsdl:
>>>
>>>- Please register a typemapping/beanmapping for 'xyz.myexception'
>>>- The class java.lang.Throwable is defined in a java or javax package
>>>and cannot be converted into an xml schema type.  An xml schema anyType
>>>will be used to define this class in the wsdl file.
>>>
>>>How do I 'tweak' the WSDL to correct these issues?
>>>
>>>On the #2 issue below, I eventually found a workaround which is instead
>>>of writing the following:
>>>
>>>public class Employer
>>>{
>>> public int employerID;
>>> public Employee [] employees;
>>>}
>>>
>>>just write the following:
>>>
>>>public class Employer
>>>{
>>> public int employerID;
>>> public Employee [] employees; // could be private
>>>
>>> public Employee [] getEmployees()
>>> {
>>>   return this.employees;
>>> }
>>>
>>> public void setEmployees(Employee [] employees)
>>> {
>>>   this.employees = employees;
>>> }
>>>}
>>>
>>>This 'hack' solved all my problems to do with having to use
>>>ArrayOfEmployee in boith the Axis server and Axis clients.
>>>
>>>On #3, I don't have a solution yet so may have to create an intermediate
>>>class that contains the Booleans and then pass that class to the
>>>operation rather than passing the contained Booleans.
>>>
>>>
>>>>From: Davanum Srinivas <da...@gmail.com>
>>>>Reply-To: dims@apache.org
>>>>To: axis-user@ws.apache.org
>>>>Subject: Re: Axis 1.3 suitable for production env?
>>>>Date: Tue, 10 Jan 2006 11:58:31 -0500
>>>>
>>>>for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
>>>>sure u use document/literal and not rpc/encoded.
>>>>
>>>>thanks,
>>>>dims
>>>>
>>>>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
>>>>
>>>>>Is Axis 1.3 suitable for a production environment?  And is it the most
>>>>>suitable Axis version for a production environment?
>>>>>
>>>>>I ask because some very, very basic things appear to cause major
>>>>
>>>>headaches:
>>>>
>>>>>1. exceptions descending from java.rmi.RemoteException (as per the Axis
>>>>>sample NoSuchEmployeeFault) cause java2wsdl to report "The class
>>>>>java.lang.Throwable is defined in a java or javax package and cannot be
>>>>>converted into an xml schema type.  An xml schema anyType will be
>>>>
>>>>used to
>>>>
>>>>>define this class in the wsdl file."
>>>>>
>>>>>2. you have to jump through hoops to avoid intermediate ArrayOfxxxx
>>>>
>>>>classes.
>>>>
>>>>>3. Boolean parameters to operations appear to be converted to intrinsic
>>>>>booleans (note lowercase) in an Axis client so you can only pass
>>>>
>>>>true/false
>>>>
>>>>>when you need to be able to pass true/false/null.
>>>
>>>
>>>_________________________________________________________________
>>>Express yourself instantly with MSN Messenger! Download today - it's
>>>FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>>>
>>>
>>
>>
> 
> 
> --
> Davanum Srinivas : http://wso2.com/blogs/
> 


Re: Axis 1.3 suitable for production env?

Posted by Davanum Srinivas <da...@gmail.com>.
Dies,

there are several if's and but's :) so the bottom line is to start
with a wsdl and run the code generator (wsdl2java) that's guaranteed
to work.

thanks,
dims

On 1/10/06, Dies Koper <di...@jp.fujitsu.com> wrote:
> Hello Jarmo, Dims,
>
> About your #1 issue, I think it is a problem with the sample.
>
> The exception extends java.rmi.RemoteException.
> This superclass has a public Throwable "detail" field.
> So when you run java2wsdl, it'll try to map the detail field that your
> exception class inherited to XML. However, there is no standard mapping
> for fields of type Throwable, so it warns you to register a custom
> mapper, and continues by mapping the field to an xsd:anyType (optional
> mapping according to the JAX-RPC1.1 spec).
>
> When you create your client classes from the WSDL you'll end up with a
> "detail" field of java.lang.Object or SOAPElement, not sure which, as
> again there is no default mapping for this type.
>
> The JAX-RPC 1.1 spec speaks of service specific Java exception (declared
> as checked exceptions) and RemoteExceptions (and its subclasses), with
> the latter being used for problems related to remote method invocations
> (java.rmi.ConnectionException when you forgot to start the webserver, etc.).
>
> The sample's exception name is NoSuchEmployeeFault, which I think is a
> service specific exception, and therefore should extend
> java.lang.Exception, not java.lang.RemoteException.
>
> Dims,
> According to the following bug report you committed this sample.
>
>  http://issues.apache.org/bugzilla/show_bug.cgi?id=19682
>
> I'd like to hear your comments about my comments above.
>
> Regards,
> Dies
>
>
> Jarmo Doc wrote:
> > I do use document/literal.
> >
> > On the #1 issue below, I see the following from java2wsdl:
> >
> > - Please register a typemapping/beanmapping for 'xyz.myexception'
> > - The class java.lang.Throwable is defined in a java or javax package
> > and cannot be converted into an xml schema type.  An xml schema anyType
> > will be used to define this class in the wsdl file.
> >
> > How do I 'tweak' the WSDL to correct these issues?
> >
> > On the #2 issue below, I eventually found a workaround which is instead
> > of writing the following:
> >
> > public class Employer
> > {
> >  public int employerID;
> >  public Employee [] employees;
> > }
> >
> > just write the following:
> >
> > public class Employer
> > {
> >  public int employerID;
> >  public Employee [] employees; // could be private
> >
> >  public Employee [] getEmployees()
> >  {
> >    return this.employees;
> >  }
> >
> >  public void setEmployees(Employee [] employees)
> >  {
> >    this.employees = employees;
> >  }
> > }
> >
> > This 'hack' solved all my problems to do with having to use
> > ArrayOfEmployee in boith the Axis server and Axis clients.
> >
> > On #3, I don't have a solution yet so may have to create an intermediate
> > class that contains the Booleans and then pass that class to the
> > operation rather than passing the contained Booleans.
> >
> >> From: Davanum Srinivas <da...@gmail.com>
> >> Reply-To: dims@apache.org
> >> To: axis-user@ws.apache.org
> >> Subject: Re: Axis 1.3 suitable for production env?
> >> Date: Tue, 10 Jan 2006 11:58:31 -0500
> >>
> >> for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
> >> sure u use document/literal and not rpc/encoded.
> >>
> >> thanks,
> >> dims
> >>
> >> On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> >> > Is Axis 1.3 suitable for a production environment?  And is it the most
> >> > suitable Axis version for a production environment?
> >> >
> >> > I ask because some very, very basic things appear to cause major
> >> headaches:
> >> >
> >> > 1. exceptions descending from java.rmi.RemoteException (as per the Axis
> >> > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> >> > java.lang.Throwable is defined in a java or javax package and cannot be
> >> > converted into an xml schema type.  An xml schema anyType will be
> >> used to
> >> > define this class in the wsdl file."
> >> >
> >> > 2. you have to jump through hoops to avoid intermediate ArrayOfxxxx
> >> classes.
> >> >
> >> > 3. Boolean parameters to operations appear to be converted to intrinsic
> >> > booleans (note lowercase) in an Axis client so you can only pass
> >> true/false
> >> > when you need to be able to pass true/false/null.
> >
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today - it's
> > FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> >
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: Axis 1.3 suitable for production env?

Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Jarmo, Dims,

About your #1 issue, I think it is a problem with the sample.

The exception extends java.rmi.RemoteException.
This superclass has a public Throwable "detail" field.
So when you run java2wsdl, it'll try to map the detail field that your
exception class inherited to XML. However, there is no standard mapping
for fields of type Throwable, so it warns you to register a custom
mapper, and continues by mapping the field to an xsd:anyType (optional
mapping according to the JAX-RPC1.1 spec).

When you create your client classes from the WSDL you'll end up with a
"detail" field of java.lang.Object or SOAPElement, not sure which, as
again there is no default mapping for this type.

The JAX-RPC 1.1 spec speaks of service specific Java exception (declared
as checked exceptions) and RemoteExceptions (and its subclasses), with
the latter being used for problems related to remote method invocations
(java.rmi.ConnectionException when you forgot to start the webserver, etc.).

The sample's exception name is NoSuchEmployeeFault, which I think is a
service specific exception, and therefore should extend
java.lang.Exception, not java.lang.RemoteException.

Dims,
According to the following bug report you committed this sample.

 http://issues.apache.org/bugzilla/show_bug.cgi?id=19682

I'd like to hear your comments about my comments above.

Regards,
Dies


Jarmo Doc wrote:
> I do use document/literal.
> 
> On the #1 issue below, I see the following from java2wsdl:
> 
> - Please register a typemapping/beanmapping for 'xyz.myexception'
> - The class java.lang.Throwable is defined in a java or javax package 
> and cannot be converted into an xml schema type.  An xml schema anyType 
> will be used to define this class in the wsdl file.
> 
> How do I 'tweak' the WSDL to correct these issues?
> 
> On the #2 issue below, I eventually found a workaround which is instead 
> of writing the following:
> 
> public class Employer
> {
>  public int employerID;
>  public Employee [] employees;
> }
> 
> just write the following:
> 
> public class Employer
> {
>  public int employerID;
>  public Employee [] employees; // could be private
> 
>  public Employee [] getEmployees()
>  {
>    return this.employees;
>  }
> 
>  public void setEmployees(Employee [] employees)
>  {
>    this.employees = employees;
>  }
> }
> 
> This 'hack' solved all my problems to do with having to use 
> ArrayOfEmployee in boith the Axis server and Axis clients.
> 
> On #3, I don't have a solution yet so may have to create an intermediate 
> class that contains the Booleans and then pass that class to the 
> operation rather than passing the contained Booleans.
> 
>> From: Davanum Srinivas <da...@gmail.com>
>> Reply-To: dims@apache.org
>> To: axis-user@ws.apache.org
>> Subject: Re: Axis 1.3 suitable for production env?
>> Date: Tue, 10 Jan 2006 11:58:31 -0500
>>
>> for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
>> sure u use document/literal and not rpc/encoded.
>>
>> thanks,
>> dims
>>
>> On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
>> > Is Axis 1.3 suitable for a production environment?  And is it the most
>> > suitable Axis version for a production environment?
>> >
>> > I ask because some very, very basic things appear to cause major 
>> headaches:
>> >
>> > 1. exceptions descending from java.rmi.RemoteException (as per the Axis
>> > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
>> > java.lang.Throwable is defined in a java or javax package and cannot be
>> > converted into an xml schema type.  An xml schema anyType will be 
>> used to
>> > define this class in the wsdl file."
>> >
>> > 2. you have to jump through hoops to avoid intermediate ArrayOfxxxx 
>> classes.
>> >
>> > 3. Boolean parameters to operations appear to be converted to intrinsic
>> > booleans (note lowercase) in an Axis client so you can only pass 
>> true/false
>> > when you need to be able to pass true/false/null.
> 
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's 
> FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> 


Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
I do use document/literal.

On the #1 issue below, I see the following from java2wsdl:

- Please register a typemapping/beanmapping for 'xyz.myexception'
- The class java.lang.Throwable is defined in a java or javax package and 
cannot be converted into an xml schema type.  An xml schema anyType will be 
used to define this class in the wsdl file.

How do I 'tweak' the WSDL to correct these issues?

On the #2 issue below, I eventually found a workaround which is instead of 
writing the following:

public class Employer
{
  public int employerID;
  public Employee [] employees;
}

just write the following:

public class Employer
{
  public int employerID;
  public Employee [] employees; // could be private

  public Employee [] getEmployees()
  {
    return this.employees;
  }

  public void setEmployees(Employee [] employees)
  {
    this.employees = employees;
  }
}

This 'hack' solved all my problems to do with having to use ArrayOfEmployee 
in boith the Axis server and Axis clients.

On #3, I don't have a solution yet so may have to create an intermediate 
class that contains the Booleans and then pass that class to the operation 
rather than passing the contained Booleans.

>From: Davanum Srinivas <da...@gmail.com>
>Reply-To: dims@apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 11:58:31 -0500
>
>for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
>sure u use document/literal and not rpc/encoded.
>
>thanks,
>dims
>
>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> > Is Axis 1.3 suitable for a production environment?  And is it the most
> > suitable Axis version for a production environment?
> >
> > I ask because some very, very basic things appear to cause major 
>headaches:
> >
> > 1. exceptions descending from java.rmi.RemoteException (as per the Axis
> > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> > java.lang.Throwable is defined in a java or javax package and cannot be
> > converted into an xml schema type.  An xml schema anyType will be used 
>to
> > define this class in the wsdl file."
> >
> > 2. you have to jump through hoops to avoid intermediate ArrayOfxxxx 
>classes.
> >
> > 3. Boolean parameters to operations appear to be converted to intrinsic
> > booleans (note lowercase) in an Axis client so you can only pass 
>true/false
> > when you need to be able to pass true/false/null.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
Hi Dims, thanks for the feedback.  You skipped the most important questions 
however ;-)

They were:

1. Is Axis 1.3 suitable for a production environment?
2. Is Axis 1.3 the most suitable version for a production environment?

I ask not only because of the issues raised below but because of numerous 
other (not easily reproducible) operational issues that I see periodically 
with Axis 1.3.  For example socket timeouts, SOAP versions mismatches, and 
SAX parsing issues**

** one thing that I will add about all of these situations is that the 
diagnostics could be better.  If, for example, VersionMismatch is raised 
then it should indicate both the received version number and the expected 
version number.  Similarly a SAXParseException that indicates, for example, 
"Content is not allowed in prolog" should indicate what that content was.  
If java2wsdl or wsdl2java detect a parsing problem then they should indicate 
both the filename and the current line number of the file being processed.  
Really basic stuff that will help us all diagnose our own bugs ;-)

>From: Davanum Srinivas <da...@gmail.com>
>Reply-To: dims@apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 11:58:31 -0500
>
>for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
>sure u use document/literal and not rpc/encoded.
>
>for 4, which specific JIRA issues bother you? id's please?
>
>thanks,
>dims
>
>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> > Is Axis 1.3 suitable for a production environment?  And is it the most
> > suitable Axis version for a production environment?
> >
> > I ask because some very, very basic things appear to cause major 
>headaches:
> >
> > 1. exceptions descending from java.rmi.RemoteException (as per the Axis
> > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> > java.lang.Throwable is defined in a java or javax package and cannot be
> > converted into an xml schema type.  An xml schema anyType will be used 
>to
> > define this class in the wsdl file."
> >
> > 2. you have to jump through hoops to avoid intermediate ArrayOfxxxx 
>classes.
> >
> > 3. Boolean parameters to operations appear to be converted to intrinsic
> > booleans (note lowercase) in an Axis client so you can only pass 
>true/false
> > when you need to be able to pass true/false/null.
> >
> > 4. major bugs raised in Jira over a year before the release of Axis 1.3
> > final have not yet been fixed (e.g. the bug in
> > AxisHTTPSessionListener::destroySession whereby *no* Axis sessions are 
>being
> > destroyed correctly).
> >
> > Don't want to sound negative, just want to know if I'm fighting a losing
> > battle using Axis 1.3.
> >
> > Thanks.
> >
> > _________________________________________________________________
> > Don't just search. Find. Check out the new MSN Search!
> > http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> >
> >
>
>
>--
>Davanum Srinivas : http://wso2.com/blogs/

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Jarmo Doc <ja...@hotmail.com>.
I do use document/literal.

On the #1 issue below, I see the following from java2wsdl:

- Please register a typemapping/beanmapping for 'xyz.myexception'
- The class java.lang.Throwable is defined in a java or javax package and 
cannot be converted into an xml schema type.  An xml schema anyType will be 
used to define this class in the wsdl file.

How do I 'tweak' the WSDL to correct these issues?

On the #2 issue below, I eventually found a workaround which is instead of 
writing the following:

public class Employer
{
  public int employerID;
  public Employee [] employees;
}

just write the following:

public class Employer
{
  public int employerID;
  public Employee [] employees; // could be private

  public Employee [] getEmployees()
  {
    return this.employees;
  }

  public void setEmployees(Employee [] employees)
  {
    this.employees = employees;
  }
}

This 'hack' solved all my problems to do with having to use ArrayOfEmployee 
in boith the Axis server and Axis clients.

On #3, I don't have a solution yet so may have to create an intermediate 
class that contains the Booleans and then pass that class to the operation 
rather than passing the contained Booleans.

>From: Davanum Srinivas <da...@gmail.com>
>Reply-To: dims@apache.org
>To: axis-user@ws.apache.org
>Subject: Re: Axis 1.3 suitable for production env?
>Date: Tue, 10 Jan 2006 11:58:31 -0500
>
>for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
>sure u use document/literal and not rpc/encoded.
>
>thanks,
>dims
>
>On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> > Is Axis 1.3 suitable for a production environment?  And is it the most
> > suitable Axis version for a production environment?
> >
> > I ask because some very, very basic things appear to cause major 
>headaches:
> >
> > 1. exceptions descending from java.rmi.RemoteException (as per the Axis
> > sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> > java.lang.Throwable is defined in a java or javax package and cannot be
> > converted into an xml schema type.  An xml schema anyType will be used 
>to
> > define this class in the wsdl file."
> >
> > 2. you have to jump through hoops to avoid intermediate ArrayOfxxxx 
>classes.
> >
> > 3. Boolean parameters to operations appear to be converted to intrinsic
> > booleans (note lowercase) in an Axis client so you can only pass 
>true/false
> > when you need to be able to pass true/false/null.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Re: Axis 1.3 suitable for production env?

Posted by Davanum Srinivas <da...@gmail.com>.
for 1/2/3. You need to use java2wsdl ONLY once, then tweak it. Make
sure u use document/literal and not rpc/encoded.

for 4, which specific JIRA issues bother you? id's please?

thanks,
dims

On 1/10/06, Jarmo Doc <ja...@hotmail.com> wrote:
> Is Axis 1.3 suitable for a production environment?  And is it the most
> suitable Axis version for a production environment?
>
> I ask because some very, very basic things appear to cause major headaches:
>
> 1. exceptions descending from java.rmi.RemoteException (as per the Axis
> sample NoSuchEmployeeFault) cause java2wsdl to report "The class
> java.lang.Throwable is defined in a java or javax package and cannot be
> converted into an xml schema type.  An xml schema anyType will be used to
> define this class in the wsdl file."
>
> 2. you have to jump through hoops to avoid intermediate ArrayOfxxxx classes.
>
> 3. Boolean parameters to operations appear to be converted to intrinsic
> booleans (note lowercase) in an Axis client so you can only pass true/false
> when you need to be able to pass true/false/null.
>
> 4. major bugs raised in Jira over a year before the release of Axis 1.3
> final have not yet been fixed (e.g. the bug in
> AxisHTTPSessionListener::destroySession whereby *no* Axis sessions are being
> destroyed correctly).
>
> Don't want to sound negative, just want to know if I'm fighting a losing
> battle using Axis 1.3.
>
> Thanks.
>
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>


--
Davanum Srinivas : http://wso2.com/blogs/