Hi dev,

your integration of the JiBX-Maven2-Plugin looks good so far. Please send the code of the test case and the JJiBX-Binding that uses the JibxRepresentation.

I think, that you have not specified the bindingClass, that should bes used.

Cheers
Flo.


dev dev schrieb:
Finally got every integrated to our maven 2 build. However, we got this exception when running one of our test cases (mvn test -Dtest=testjibx). We define the jiBX binding in our pom.xml. What did we do wrong?

 <plugin>
               <groupId>org.jibx</groupId>
               <artifactId>maven-jibx-plugin</artifactId>
               <version>1.1.5</version>
               <configuration>
                  <directory>src/main/java</directory>
                  <includes>
                      <includes>*-binding.xml</includes>
                  </includes>
                  <excludes>
                     <exclude>template-binding.xml</exclude>
                  </excludes>
                  <verbose>true</verbose>
                  </configuration>
               <executions>
                   <execution>
                     <phase>compile</phase>
                     <goals>
                         <goal>bind</goal>
                    </goals>
                   </execution>
               </executions>
            </plugin>

Output -------------------------------------------------------------------------------------------------------------
INFO: Exception intercepted
java.io.IOException: Unable to access binding information for class java.lang.Class
Make sure the binding has been compiled
at org.restlet.ext.jibx.JibxRepresentation.write(JibxRepresentation.java:219) at com.noelios.restlet.http.HttpServerCall.writeResponseBody(HttpServerCall.java:407) at com.noelios.restlet.http.HttpServerCall.sendResponse(HttpServerCall.java:361) at com.noelios.restlet.http.HttpServerConverter.commit(HttpServerConverter.java:152) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:95) at com.noelios.restlet.ext.simple.SimpleProtocolHandler.handle(SimpleProtocolHandler.java:67)
        at simple.http.Dispatcher.run(Dispatcher.java:83)
        at simple.util.process.Daemon.execute(Daemon.java:121)
        at simple.util.process.Daemon.run(Daemon.java:106)


On Feb 4, 2008 1:56 PM, dev dev <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Thanks much Jerome.


    On Feb 2, 2008 9:57 AM, Jerome Louvel <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:


        Hi dev,

        I've just updated the build script to include JiBX and
        generate its Maven
        artifacts. It will be distributed with 1.1 M2, hopefully next
        week.

        Best regards,
        Jerome

        > -----Message d'origine-----
        > De : dev dev [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>]
        > Envoyé : samedi 2 février 2008 03:10
        > À : [email protected]
        <mailto:[email protected]>
        > Objet : Re: Jaxb representation (HELP!)
        >
        > After playing with it a bit, we will go with jibx instead
        > (Thanks Florian) mainly  because of  performance and  its
        > java-centric XML mapping approach. That said, how come we
        > don't see jibx on http://maven.restlet.org/org/restlet/. I do
        > see jaxb there.
        >
        > Thanks
        > dev
        >
        >
        > On Jan 27, 2008 10:22 AM, dev dev <[EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>> wrote:
        >
        >
        >       Great help Florian. We will definitely take a look at
        > Jibx representation before considering JAXB.
        >
        >       Thank you.
        >       dev
        >
        >
        >       On Jan 27, 2008 1:17 AM, Florian Schwarz
        > <[EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>> wrote:
        >
        >
        >               Hi dev,
        >
        >               the usage of JaxbRepresentation is quite simple:
        >
        >               Java -> XML
        >
        >               public Representation represent(Variant variant) {
        >
        >                  ...
        >                  Flight flight = ...
        >                  JaxbRepresentation jaxbRepOfMyFlight = new
        >               JaxbRepresentation(MediaType.TEXT_XML, flight);
        >                  ...
        >                  return jaxbRepOfMyFlight
        >               }
        >
        >
        >               XML -> Java
        >
        >               JaxbRepresentation jaxbRep = new
        >               JaxbRepresentation(response.getEntity(),
        > "com.mycompany.entity.jaxb");
        >               try {
        >                  Flight flight = (Flight) jaxbRep.getObject();
        >                  } catch (IOException e) {
        >                          ...
        >               }
        >
        >               where the package com.mycompany.entity.jaxb is
        > the JAXB-context-path
        >               with the existing Java domain objects
        > (eventually created vom xsd).
        >
        >               If you start from your domain objects and not
        > from your xsd, I recommend
        >               using JIBX instead of JAXB. See also:
        >
        > http://article.gmane.org/gmane.comp.java.restlet/3858/match=ji
        > bxRepresentation
        >
        >               There is an performance comparison between
        > different XML binding
        >               frameworks at:
        > http://www.ibm.com/developerworks/xml/library/x-databdopt2/
        >
        >               Cheers
        >               Florian
        >
        >               dev dev schrieb:
        >
        >               > Hi folks,
        >               >
        >               > has anybody already used the JAXB XML binding
        > framework with Restlet?
        >               > Are there any sample codes we can take a look
        > at on how it's being
        >               > used in Restlet? Any performance issues we
        > should seriously consider
        >               > before using JAXB?
        >               >
        >               > Thanks in advance for all the help.
        >               >
        >               > dev
        >
        >
        >
        >
        >
        >




Reply via email to