One difference between CXF J2W and Axis2 J2W appears to be that CXF follows
the JAXWS spec with respect
to the fault<-->exception mapping whereas Axis2 invents a new convention.

Correct me if I'm wrong but I don't think the Tuscany runtime supports the
Axis2 pattern, right?

This would imply some new work I believe... whereas support for the JAX-WS
spec'd pattern is implemented in class
JAXWSFaultExceptionMapper.

Scott




On Thu, Mar 6, 2008 at 12:25 PM, Alex <[EMAIL PROTECTED]> wrote:

> Hi, simon
>
> Axis2's JAVA2WSDL can handle the JAX-WS annnotations by default.
> Since it's
> org.apache.axis2.description.java2wsdl.DefaultSchemaGeneratorcontains
> following lines:
>  JAnnotation annotation = jclass.getAnnotation(
> AnnotationConstants.WEB_SERVICE);
>                if (annotation != null) {
>                    String tns =
>                            annotation.getValue(
> AnnotationConstants.TARGETNAMESPACE).asString();
>                    if (tns != null && !"".equals(tns)) {
>                        targetNamespace = tns;
>                        schemaTargetNameSpace = tns;
>                    }
>                }
> ....
>  JAnnotation methodAnnon = jMethod.getAnnotation(
> AnnotationConstants.WEB_METHOD);
>            if (methodAnnon != null) {
>                if
> (methodAnnon.getValue(AnnotationConstants.EXCLUDE).asBoolean())
> {
>                    continue;
>                }
>            }
> if use the "-sg" optional to replace the DefaultSchemaGenerator with
> org.apache.axis2.jaxbri.JaxbSchemaGenerator
> then it can handle the JAXB annotations.(actually it can handle JAX-WS and
> JAXB both, since JaxbSchemaGenerator extends DefaultSchemaGenerator )
>
> I will look into CXF in the furture, and find out what's differrent
> between
> them, if you alreadly know it, i would like to hear your comments.
> Best Regards
>
> - Alex
>
>
> On Wed, Mar 5, 2008 at 11:25 PM, Simon Nash <[EMAIL PROTECTED]> wrote:
>
> > See inline.
> >
> >   Simon
> >
> > Scott Kurz wrote:
> > > One important difference if I understand correctly is the tool handles
> > SDOs
> > > whereas the runtime
> > > interface-wsdl-java2wsdl module only handles POJO types.
> > >
> > > I think the runtime code basically relies on Axis2's Java->XSD
> mapping,
> > > which I don't think would
> > > fully honor JAXB annotations in the Java as it ideally would (though
> it
> > > looks like we do an extra
> > > step allowing us to recognize if a NS->pkg mapping other than the
> > default
> > > was used to gen the Java).
> > >
> > > (With some configuration, I believe it's possible to use Axis2's J2W
> > > function in a way such that it would
> > > recognize these JAXB annotations, or another alternative I believe
> Simon
> > > Nash mentioned was to look into
> > > CXF.)
> > >
> > Can you say more about what Axis2 configuration is needed?  Does this
> only
> > handle JAXB annotations or does it handle JAX-WS annnotations as well?
> > My primary use case that led me to look at using CXF was handling JAX-WS
> > annotations in service interfaces (which may also require handling JAXB
> > annotations in data types passed over the interface).
> >
> > > I didn't follow all of the discussion about removing SDO from the
> > Tuscany
> > > charter... but if SDO is no
> > > longer a special part of the Tuscany project then what would happen to
> > the
> > > W2J/J2W tools built around
> > > SDO support?
> > >
> > If some other project were to produce suitable SDO tools, then Tuscany
> > could
> > delegate to those tools instead of having its own.  Until this happens,
> > I'd
> > expect the current tools to remain in Tuscany.
> >
> >   Simon
> >
> > > Scott
> > >
> > >
> > >
> > > On Wed, Mar 5, 2008 at 7:26 AM, Simon Laws <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > >> On Tue, Mar 4, 2008 at 9:03 AM, Alex <[EMAIL PROTECTED]> wrote:
> > >>
> > >>> Hi All,
> > >>> In tuscany-sca (1.1 above) , there are two modules related with
> > >> java2wsdl:
> > >>> 1.) modules\interface-wsdl-java2wsdl
> > >>> 2.) tools\java2wsdl
> > >>> The java2wsdl interface(1) provides a runtime interface to handle
> java
> > >>> object to wsdl object
> > >>> the  java2wsdl tool (2) provides a command-line tool for converting
> > java
> > >>> classes into wsdl files.
> > >>> the (1) use JAVA2WSDLBuilder (from Axis2 1.3 code) and
> > >> AxisService2WSDL11,
> > >>> AxisService2WSDL20  to generate WSDL
> > >>> the (2) use TuscanyJAVA2WSDLBuilder, TuscanyWSDLTypeGenerator ... to
> > >>> generate WSDL
> > >>> Why there are two different ways? Why not just use axis code only or
> > >>> tuscany
> > >>> code only for the two modules?
> > >>> Or there are already a plan to merge the code? so which one will be
> if
> > >>> there
> > >>> is a choice?
> > >>>
> > >>> Thanks
> > >>> - Alex
> > >>>
> > >> Hi Alex
> > >>
> > >> I don't think there is a good reason for the two approaches to WSDL
> > >> generation. It's probably just historical. I agree that it would be
> > much
> > >> cleaner and more maintainable to have one set of code for doing this.
> I
> > >> saw
> > >> a comment on the list the other from someone getting different
> results
> > >> depending on which approach they used. This is obviously not a good
> > thing.
> > >> Are you interested in getting involved in trying to fix this?
> > >>
> > >> Regards
> > >>
> > >> Simon
> > >>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> http://jroller.com/page/dindin
>

Reply via email to