简体   繁体   English

Java Web服务疑点

[英]Java web services doubts

I want to start java web services with JAX-RPC/JAX-WS/JAX-RS style and have idea about xml/wsdl/soap. 我想以JAX-RPC / JAX-WS / JAX-RS样式启动Java Web服务,并对xml / wsdl / soap有所了解。 But still have doubts in starting the implementation : 但是在开始执行时仍然有疑问:

  • Which soap implementation (Axis/CXF etc.) I should start with, so that I can easily adapt to other soap implementation after getting one? 我应该从哪个肥皂实施开始(Axis / CXF等),以便在获得一个肥皂实施后轻松适应其他肥皂实施?
  • Is there any default implementation to start with instead of switching to vendor specific implementations? 是否有任何默认的实现开始而不是切换到特定于供应商的实现?
  • Is there any book(s) that can provide step by step information on these implementations? 是否有任何书籍可以提供有关这些实现的逐步信息?
  • Do you really think that it (JAX-RPC) is completely obsolete? 您是否真的认为它(JAX-RPC)已完全过时? I think you need to understand its basics too for giving support to existing services. 我认为您也需要了解其基础知识才能为现有服务提供支持。 Isn't it? 是不是
  • Is it possible to implement service without annotations? 是否可以在没有注释的情况下实现服务?
  • What is difference between SOA and Web-Services? SOA和Web服务之间有什么区别?

Thanks. 谢谢。

Which soap implementation (Axis/CXF etc.) I should start with, so that I can easily adapt to other soap implementation after getting one? 我应该从哪个肥皂实施开始(Axis / CXF等),以便在获得一个肥皂实施后轻松适应其他肥皂实施?

These are different (and very popular) frameworks. 这些是不同的(并且非常受欢迎)的框架。 You pick one or the other and use it. 您选择一个或另一个并使用它。 It is not customary or easy to swap frameworks 交换框架不是常规的或容易的

Is there any default implementation to start with instead of switching to vendor specific implementations? 是否有任何默认的实现开始而不是切换到特定于供应商的实现?

Not sure what you mean here. 不知道你的意思在这里。 Java has defined a JSR for web services and there is Metro as reference implementation so anything that doesn't use eg a specific for Glassfish deployment would count as non-vendor specific. Java已经为Web服务定义了JSR ,并且有Metro作为参考实现,因此任何不使用的内容(例如,针对Glassfish部署的特定内容)都将被视为非特定于供应商的内容。
I would recommend that you use either Axis 2 or CXF as they are very popular frameworks and have many online tutorials. 我建议您使用Axis 2CXF,因为它们是非常流行的框架,并且有许多在线教程。

Is there any book(s) that can provide step by step information on these implementations? 是否有任何书籍可以提供有关这些实现的逐步信息?

There are many resources but you will need to look into something more specific. 有很多资源,但是您需要研究更具体的内容。
If you go for Axis 2 or CXF you will find many online tutorials 如果您选择Axis 2CXF ,则会发现许多在线教程

Do you really think that it (JAX-RPC) is completely obsolete? 您是否真的认为它(JAX-RPC)已完全过时? I think you need to understand its basics too for giving support to existing services. 我认为您也需要了解其基础知识才能为现有服务提供支持。 Isn't it? 是不是

Yes it is obsolete. 是的,它已经过时了。 It is the old specification. 这是旧的规范。 Don't need to look into it. 不需要研究它。

Is it possible to implement service without annotations? 是否可以在没有注释的情况下实现服务?

Of course it is. 当然是的。 All tutorials usually show example of starting a Web Service using annotations and also starting a Web Service from a WSDL ie you first create a WSDL and the web service (stubs) are autogenerated 所有教程通常都显示使用批注启动Web Service以及从WSDL启动Web Service的示例,即,首先创建WSDL然后自动生成Web Service(存根)。

What is difference between SOA and Web-Services? SOA和Web服务之间有什么区别?

Web Services are used as one of the implementation technologies to offer SOA . Web服务被用作提供SOA的实现技术之一。
There is no book specifying differences between these 2 technologies since one is an implementation component of the other. 没有书说明这两种技术之间的差异,因为一种是另一种的实现组件。 If you need to learn about SOA there are plenty books. 如果您需要了解SOA那么有很多书籍。 Is this question about a book recomendation? 这是关于书推荐的问题吗?

Which soap implementation (Axis/CXF etc.) I should start with, so that I can easily adapt to other soap implementation after getting one? 我应该从哪个肥皂实施开始(Axis / CXF等),以便在获得一个肥皂实施后轻松适应其他肥皂实施?

If you want to be able to adapt from one impl to another, you would need to use pure JAX-WS API's. 如果您希望能够从一种实现适应另一种实现,则需要使用纯JAX-WS API。 You can actually start with the JAX-WS impl found in the JDK and then migrate to CXF r Metro (and maybe Axis 2, Axis2 is not JAX-WS certified like CXF and Metro are) as your requirements change or additional features are needed. 实际上,您可以从JDK中找到的JAX-WS impl开始,然后迁移到CXF r Metro(也许Axis 2,Axis2不像CXF和Metro一样获得JAX-WS认证),因为您的需求有所变化或需要其他功能。

You can also see my similar answer at: 您也可以在以下位置看到我的类似答案:

Difference between Apache CXF and Axis Apache CXF和Axis之间的区别

Is there any default implementation to start with instead of switching to vendor specific implementations? 是否有任何默认的实现开始而不是切换到特定于供应商的实现?

JAX-WS in the JDK, then to CXF or Metro. JDK中的JAX-WS,然后到CXF或Metro。

Is there any book(s) that can provide step by step information on these implementations? 是否有任何书籍可以提供有关这些实现的逐步信息?

The CXF Resources and Articles page lists two books, one that covers both CXF and Axis2. “ CXF资源和文章”页面列出了两本书,其中一本涵盖了CXF和Axis2。

http://cxf.apache.org/resources-and-articles.html http://cxf.apache.org/resources-and-articles.html

Do you really think that it (JAX-RPC) is completely obsolete? 您是否真的认为它(JAX-RPC)已完全过时? I think you need to understand its basics too for giving support to existing services. 我认为您也需要了解其基础知识才能为现有服务提供支持。 Isn't it? 是不是

Obsolete. 过时的 Don't worry about it. 不用担心

Is it possible to implement service without annotations? 是否可以在没有注释的情况下实现服务?

With CXF, yes, but it's certainly better to use the annotations. 使用CXF,可以,但是使用注释当然更好。 The annotations provide much more control over what happens at runtime, how the wsdl is created (if doing java first development), etc... 注释提供了对运行时发生的事情,wsdl的创建方式(如果进行Java首次开发)等的更多控制。

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

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