How to generate *.xjb file from WSDL?

Generally we create a bindings file with .xjb extension to resolve any conflicts in the WSDL or schema. For example if two elements have the same name and you want to distinguish between them you can rename one by specifying it the bindings file.

Here is an example:

<jaxb:bindings 
    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"
    jaxb:extensionBindingPrefixes="xjc"
    version="2.1">

    <jaxb:globalBindings generateIsSetMethod="true" fixedAttributeAsConstantProperty="true">
        <xjc:serializable uid="1" />
    </jaxb:globalBindings>

    <jaxb:bindings schemaLocation="abcd.xsd">
        <jaxb:bindings node="//xs:element[@name='Event']/xs:simpleType">
               <jaxb:typesafeEnumClass name="EventEnumType" />
        </jaxb:bindings>
   </jaxb:bindings>

</jaxb:bindings>