XFire 1.2.5, xfire universe set up as follows.

 

In the service, there is a Java 1.5 enum. The wsdl attempts to produce
enough Java schema to cover the declaringClass attribute of the enum! I
can set up a test case into JIRA is this is a surprise. If it isn't a
surprise, I don't know what to think.

 

       AegisBindingProvider binder = new AegisBindingProvider();

 

        xfire = XFireFactory.newInstance().getXFire();

        AnnotationServiceFactory serviceFactory = new
AnnotationServiceFactory(

                new Jsr181WebAnnotations(), xfire.getTransportManager(),
binder);

 

        DefaultTypeMappingRegistry tmr = (DefaultTypeMappingRegistry)
binder

                .getTypeMappingRegistry();

 

        // here we disuade XFire from its rather annoying tendency to
assume

        // that, just because

        // anything in Java can be null, that we want to advertise all
that

        // nullity all over.

        Configuration configuration = tmr.getConfiguration();

        configuration.setDefaultMinOccurs(1);

        configuration.setDefaultNillable(false);

 

        // Create a properties hashmap

        HashMap<String, Object> props = new HashMap<String, Object>();

 

        // Enable the writing of xsi:type attributes

        props.put(AegisBindingProvider.WRITE_XSI_TYPE_KEY,
Boolean.TRUE);

 

        // Supply a list of class names which need to be included in the
wsdl.

        ArrayList<String> l = new ArrayList<String>();

        // add class names here for extra types if we need them.

 
l.add(com.basistech.rnm.index.NameIndexException.class.getName());

        props.put(AegisBindingProvider.OVERRIDE_TYPES_KEY, l);

        service = serviceFactory.create(serviceClass, props);

Reply via email to