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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > >>>>Reply-To: [EMAIL PROTECTED] > >>>>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 <[EMAIL PROTECTED]> 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/