5 Replies Latest reply: Sep 19, 2012 7:23 AM by user696 RSS

    wsdlc jaxws generate serializable

    294331
      I would only want to confirm this ...
      There is no current wsldc option for JAXWS that will generate serializable Java classes from xml schema.
      thanks
        • 1. Re: wsdlc jaxws generate serializable
          Kalyan Pasupuleti-Oracle
          Hi,

          You are right now WSDLC is not a option for JAXWS to generate implementation class.

          For more details you can check following BUG

          BUG 8172108: WSDLC FOR JAXWS SHOULD NOT PACK THE DEFAULT SERVICE IMPL CLASS INTO COMPILED JAR

          Regards,
          Kal
          • 2. Re: wsdlc jaxws generate serializable
            user696
            You can do this by using the <binding> child element inside the wsdlc.
            The <binding> child element of wsdlc and clientgen allows you to specify one or more customization files that declare JAX-WS or JAXB custom bindings.

            http://docs.oracle.com/cd/E24329_01/web.1211/e24981/anttasks.htm#i1091566
            http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.6/jaxb/vendorCustomizations.html#serializable

            Regards,
            Sunil P
            • 3. Re: wsdlc jaxws generate serializable
              294331
              tried exact this binding file from indicated link, no error but not serializable classes produced

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

              <xs:annotation>
              <xs:appinfo>
              <jaxb:globalBindings generateIsSetMethod="true">
              <xjc:serializable uid="12343"/>
              </jaxb:globalBindings>
              </xs:appinfo>
              </xs:annotation>
              .
              .
              .
              </xs:schema>
              • 4. Re: wsdlc jaxws generate serializable
                294331
                this worked for me... generating serializable Java classes.
                node not found error was due to the fact that i was trying to specify many files for schema location using some wild card... it seems to work if you only specify one single xsd file, even if many more are compiled in same location!


                <jaxb:bindings
                     xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
                     xmlns:xs="http://www.w3.org/2001/XMLSchema"
                     xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
                     jaxb:extensionBindingPrefixes="xjc" jaxb:version="1.0">
                     <jaxb:bindings schemaLocation="Customer.xsd"
                          node="/xs:schema">
                          <jaxb:globalBindings>
                               <xjc:serializable />
                          </jaxb:globalBindings>
                     </jaxb:bindings>
                               
                </jaxb:bindings>
                • 5. Re: wsdlc jaxws generate serializable
                  user696
                  Glad, that worked.
                  Please mark the forum as marked if this had helped you.