Posts

Showing posts with the label endorsed

How to Generate JAX-WS Client Proxy Using Wsimport of JAX-WS 2.2.6 or later

I am using JDK 1.6 on Ubuntu. Implemented web services using JAX-WS 2.2.6 but when tried to generate client proxy code using "wsimport" utility of JDK. It failed, because the "wsimport" utility in JDK 1.6 is older (probably JAX-WS 2.1.6 or an earlier release ships with JDK 1.6) So I used "wsimport" utility that comes with JAX-WS 2.2.6 RI. How? I defined two environmental variables like this, by putting into ~/.bashrc file: JAXWS_HOME=/opt/jaxws-ri2.2.6 JAVA_ENDORSED_DIRS=/opt/endorsedlibs In JAVA_ENDORSED, I pasted jaxws-api.jar and jaxb-api.jar The JAXWS_HOME contains standard files/folders that comes with JAX-WS 2.2.6 Reference Implementation download bundle. Here is how I generated client proxy code: wsclient-project/src:~$>  bash $JAXWS_HOME/bin/wsimport.sh -Xendorsed -s . http://localhost:8181/myproject/webservices/Alpha?wsdl It generates the client proxy code and put into current folder i.e. src.