简体   繁体   English

spring + tomcat + axis2 == jax-ws web服务?

[英]spring + tomcat + axis2 == jax-ws web service?

I'm looking for a straightforward example / tutorial for implementing a JAX-WS (soap1.1 and soap1.2) web service based on wsdl definition using spring, axis2 and tomcat. 我正在寻找一个简单的示例/教程,用于使用spring,axis2和tomcat基于wsdl定义实现JAX-WS(soap1.1和soap1.2)Web服务。

hint anyone ? 有人提示吗?

-- Yonatan - Yonatan

There is no such thing as "straightforward" in the world of SOAP. 在SOAP世界中没有“直截了当”的东西。 Any example and tutorial is bound to be complex due to the overengineered nature of this beast. 由于这种野兽的过度工程性质,任何示例和教程都必然是复杂的。

If you can choose your technologies, I'd recommend putting axis aside, and using Tomcat 6 + Java 6 + Metro. 如果你可以选择你的技术,我建议把轴放在一边,并使用Tomcat 6 + Java 6 + Metro。 Metro is Sun's latest, greatest Java web services (jax-ws) stack. Metro是Sun最新,最好的Java Web服务(jax-ws)堆栈。 Coupled with JavaEE annotations, it's a relatively painless way to get a web service off the ground quickly. 再加上JavaEE注释,快速获得Web服务是一种相对轻松的方式。

Sorry to not answer the question directly. 很抱歉不直接回答这个问题。

Unfortunately, even the latest version of Metro has issues with tomcat and JDK6 I tried running the sample app on my machine and documented few issues I faced and resolved. 不幸的是,即使最新版本的Metro也存在tomcat和JDK6的问题,我尝试在我的机器上运行示例应用程序,并记录了我遇到和解决的一些问题。 For others benefit please check here : Running Metro + Tomcat 6 + JDK 6 对于其他人的好处,请点击此处: 运行Metro + Tomcat 6 + JDK 6

The NetBeans IDE is good place to start. NetBeans IDE是一个很好的起点。 Enable the Axis2 Support in NB plug-ins. 在NB插件中启用Axis2支持。 You can create a JAX-WS based Web Service from the WSDL (assuming you are using contract first) and the JAX-WS based WS client too. 您可以从WSDL(假设您首先使用契约)和基于JAX-WS的WS客户端创建基于JAX-WS的Web服务。 If you dont like what NetBeans generates or its deployment strategy, you can still build upon the code that it has generated 如果您不喜欢NetBeans生成的内容或其部署策略,您仍然可以构建它生成的代码

Axis2 does not support Spring web services when using Jax-WS. 使用Jax-WS时,Axis2不支持Spring Web服务。 See this mailing list post: 查看此邮件列表帖子:

http://markmail.org/message/hohdmsupo3r3gltl?q=list:org%2Eapache%2Ews%2Eaxis-user+spring+jax-ws http://markmail.org/message/hohdmsupo3r3gltl?q=list:org%2Eapache%2Ews%2Eaxis-user+spring+jax-ws

To do this you will need a custom module to add a BeanFactory into the MessageContext and then retrieve it out in your web service. 为此,您需要一个自定义模块将BeanFactory添加到MessageContext中,然后在Web服务中将其检索出来。 Or you might write a custom dispatcher. 或者您可以编写自定义调度程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM