1 Reply Latest reply on Jun 3, 2014 11:05 PM by Claudio Miranda

    How use jaxb as transformer ?

    Claudio Miranda Apprentice

      Hi, I see the quickstart transform-jaxb, the Order and OrderAck are POJOs, JAXB annotated. Does the Order and OrderAck are generated source files ?

      How to generate the ObjectFactory source class ?

      How to use maven to generate ObjectFactory ?

      How to automatically update the switchyard.xml with transform.jaxb elements ?

       

      Thanks

       

      Claudio

        • 1. Re: How use jaxb as transformer ?
          Claudio Miranda Apprentice

          Annotate the bean classes with @XmlRootElement.

          Re-generate the wsdl if necessary (erase the wsdl file, remove the promoted service and soap binding)

          Remove the transformer from switchyard.xm (open the properties dialog, transform menu)

          Promote the Service, check the box to "create required transformers", for the Transformer type, select JAXB, add the package of your bean class. Click finish.

          At the diagram view, add the SOAP binding as usual.

          Add a file jaxb.index to the same directory of your bean class, add the simple class name of your beans in this file, one name per line.

          There is no need of ObjectFactory.java file.