Сначала нужно установить систему сборки и сервер:
$ brew install maven
$ brew install tomcat
Далее можно вручную создать проект:
$ cd ~/Documents/Projects/
$ mvn archetype:generate -DgroupId=com.blogspot.devtype -DartifactId=ImageWebService -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
Однако, Я воспользуюсь Eclipse IDE for Java EE Developers (инструкция по установке: Installing Eclipse on Mac OS X). Создаем проект веб-сервиса по инструкции: JAX-WS Web Services On Tomcat | Examples Java Code Geeks.
Далее добавим в Tomcat зависимости JAX-WS:
http://repo.maven.apache.org/maven2/com/sun/xml/ws/jaxws-ri/2.2.8/jaxws-ri-2.2.8.zip
$ cd /usr/local/Cellar/tomcat/7.0.52/libexec/lib
$ cp ~/Downloads/jaxws-ri/lib/gmbal-api-only.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxb-impl.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxws-api.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxws-rt.jar ./
$ cp ~/Downloads/jaxws-ri/lib/management-api.jar ./
$ cp ~/Downloads/jaxws-ri/lib/policy.jar ./
$ cp ~/Downloads/jaxws-ri/lib/stax-ex.jar ./
$ cp ~/Downloads/jaxws-ri/lib/streambuffer.jar ./
$ cp ~/Downloads/jaxws-ri/lib/ha-api.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxb-core.jar ./
$ /usr/local/Cellar/tomcat/7.0.52/bin/catalina run
Проверяем работоспособность веб-сервиса: http://localhost:8080/JAX-WS-Tomcat/sayhello
$ /usr/local/Cellar/tomcat/7.0.52/bin/catalina stop
Далее по руководству http://www.mkyong.com/webservices/jax-ws/jax-ws-attachment-with-mtom/#reference доработаем веб-сервис до MTOM функционала.
--
$ brew install maven
$ brew install tomcat
Далее можно вручную создать проект:
$ cd ~/Documents/Projects/
$ mvn archetype:generate -DgroupId=com.blogspot.devtype -DartifactId=ImageWebService -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
Однако, Я воспользуюсь Eclipse IDE for Java EE Developers (инструкция по установке: Installing Eclipse on Mac OS X). Создаем проект веб-сервиса по инструкции: JAX-WS Web Services On Tomcat | Examples Java Code Geeks.
Далее добавим в Tomcat зависимости JAX-WS:
http://repo.maven.apache.org/maven2/com/sun/xml/ws/jaxws-ri/2.2.8/jaxws-ri-2.2.8.zip
$ cd /usr/local/Cellar/tomcat/7.0.52/libexec/lib
$ cp ~/Downloads/jaxws-ri/lib/gmbal-api-only.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxb-impl.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxws-api.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxws-rt.jar ./
$ cp ~/Downloads/jaxws-ri/lib/management-api.jar ./
$ cp ~/Downloads/jaxws-ri/lib/policy.jar ./
$ cp ~/Downloads/jaxws-ri/lib/stax-ex.jar ./
$ cp ~/Downloads/jaxws-ri/lib/streambuffer.jar ./
$ cp ~/Downloads/jaxws-ri/lib/ha-api.jar ./
$ cp ~/Downloads/jaxws-ri/lib/jaxb-core.jar ./
Проверяем работоспособность веб-сервиса: http://localhost:8080/JAX-WS-Tomcat/sayhello
$ /usr/local/Cellar/tomcat/7.0.52/bin/catalina stop
Далее по руководству http://www.mkyong.com/webservices/jax-ws/jax-ws-attachment-with-mtom/#reference доработаем веб-сервис до MTOM функционала.
--
- JAX-WS Hello World Example – RPC Style
- Craic Computing Tech Tips: Installing Apache tomcat on Mac OS X Lion using homebrew
- Amila Paranawithana's Blog: Writing a JAX-WS web service with maven structured and deployed on tomcat
- How to create a Web Application Project with Maven
- JDK 7 Mac Install
- Web Services Java Tutorial - Web Services - Java Tutorial
- The Java EE 7 Tutorial:Creating a Simple Web Service and Clients with JAX-WS | Java EE Documentation
- Using JAX-WS with Maven (Enterprise Tech Tips)
- JAX-WS web services + Maven + Tomcat « Developers, Developers, Developers!
- Metro Guide - Using JAX-WS from Maven — Project Kenai
- MTOM vs. Streaming vs. Compression – Large attachments over WCF | Niraj Bhatt - Architect's Blog
- http://ojitha.blogspot.com/2012/02/jax-ws-binary-data-passing-using-mtom.html
- http://asanga-pradeep.blogspot.com/2009/10/java-code-sinppet-jax-ws-mtom.html
- http://java.globinch.com/enterprise-java/web-services/jax-ws/jax-ws-attachment-enable-mtom-jax-ws-web-services/
- http://java.boot.by/ocewsd6-guide/ch11.html
- http://blog.kandati.com/2011/07/creating-mtom-enabled-jax-ws-web.html
- http://www.sarjsheff.ru/story/Razrabotka+web-servisov+nastroika+Spring+Web+Services.html
- http://blog.hpxn.net/2012/06/13/enabling-large-file-transfers-with-spring-ws-mtomxop-and-jaxb2/