1 Reply Latest reply on Jul 24, 2008 3:26 AM by Dmitry Kudrenko

    wsconsume + serialisible

    Dmitry Kudrenko Newbie

      Greetings,

      I noticed that jbossws-native-3.0.2.GA has the following very usefull for me feature:

      WSDL To Java, add a configuration option so all generated types can implement java.io.Serializable

      Could somebody describe me where can I read about this option or how I can generated Serializable classes?

      I didn't find any options for this in the wsconsume --help and in the documentation.

      Thanks in advance.

        • 1. Re: wsconsume + serialisible
          Dmitry Kudrenko Newbie

          I found the solution: I used binding file to generate serializable artifacts:

          1. create the file, for example, jaxb-bindings.xml

          <?xml version="1.0" encoding="UTF-8"?>
          <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
          xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified" attributeFormDefault="unqualified"
          jaxb:extensionBindingPrefixes="xjc" jaxb:version="1.0">

          <xs:annotation>
          <xs:appinfo>
          <jaxb:globalBindings>
          <xjc:serializable />
          </jaxb:globalBindings>
          </xs:appinfo>
          </xs:annotation>

          </xs:schema>

          2. Use -b key to specify binding file for wsconsume. Unfortunately, this key didn't work for me with wsconsume. It is why I used JAX-WS wsimport instead of wsconsume. It generates the same code but binding works and it has maven plugin to work with.