Topic
  • 3 replies
  • Latest Post - ‏2014-03-18T09:50:39Z by bpaskin
DougBreaux
DougBreaux
61 Posts

Pinned topic JAX-WS version?

‏2014-03-13T21:02:40Z |

WAS 8.5.5, Java6

I thought since JAX-WS 2.2 is "endorsed", we ought to use that version.

I configured the wsimport (Ant task) to use that version, but now my generated code is complaining in RAD 9 about a missing service constructor that seems be caused by it not using the newer API jars:

The constructor Service(URL, QName, WebServiceFeature[]) is undefined

( http://stackoverflow.com/questions/9601107/the-constructor-serviceurl-qname-webservicefeature-is-undefined )

What's the standard way in RAD, and more importantly in WAS when I build and deploy an EAR/WAR, to use the correct jars for JAX-WS 2.2?

Or, is the cleaner/better solution to not use 2.2 until we're on Java 7?

 

  • bpaskin
    bpaskin
    5089 Posts

    Re: JAX-WS version?

    ‏2014-03-14T08:50:06Z  

    Hi Doug, It depends on which JRE you are using in the project's build path.  I have that method coupled with the WASv855 JRE and it is found without issue in RADv9.  

    // Generated By:JAX-WS RI IBM 2.2.1-11/25/2013 11:48 AM(foreman)- (JAXB RI IBM 2.2.3-11/25/2013 12:35 PM(foreman)-)
    
        public RandomGeneratorService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
            super(wsdlLocation, serviceName, features);
        }
    

     

    Regards, Brian

    Attachments

  • DougBreaux
    DougBreaux
    61 Posts

    Re: JAX-WS version?

    ‏2014-03-17T15:25:11Z  
    • bpaskin
    • ‏2014-03-14T08:50:06Z

    Hi Doug, It depends on which JRE you are using in the project's build path.  I have that method coupled with the WASv855 JRE and it is found without issue in RADv9.  

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr">// Generated By:JAX-WS RI IBM 2.2.1-11/25/2013 11:48 AM(foreman)- (JAXB RI IBM 2.2.3-11/25/2013 12:35 PM(foreman)-) public RandomGeneratorService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { super(wsdlLocation, serviceName, features); } </pre>

     

    Regards, Brian

    Thanks, Brian. Is that the Java 7 WAS 855 JRE, though?

  • bpaskin
    bpaskin
    5089 Posts

    Re: JAX-WS version?

    ‏2014-03-18T09:50:39Z  

    Thanks, Brian. Is that the Java 7 WAS 855 JRE, though?

    Hi, That was with JRE6, but I just tried with JRE7 and it worked, as well.  Make sure you have the JAXWS thin client jar file in your path if you are using a client.

    Regards,

    Brian