关于基于 WCF SOAP 的 Web 服务和 servlet [英] Regarding WCF SOAP based web service and servlets

查看:34
本文介绍了关于基于 WCF SOAP 的 Web 服务和 servlet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是基于 WCF SOAP 的服务的新手.我有一个网页,它需要 3 个字段并在 Javascript 中验证它们.验证后,它将它们发送到 servlet.现在,在 servlet 中,我需要调用一个基于 WCF 的 SOAP 服务的 Web 服务.

I am new to WCF SOAP based services. I have a webpage which takes 3 fields and validates them in Javascript. After validation it sends them to a servlet. Now, in servlet I need to call a web service which is a WCF based SOAP service.

我应该如何进行?可以打电话吗?

How should I proceed? Is it possible to make the call?

推荐答案

是的,可以调用,不管是 WCF Web 服务.您只需要编写一个客户端来调用 Web 服务并在您的 servlet 代码中使用该客户端.

Yes, it's possible to call, it doesn't matter it's a WCF web service. You just need to write a client to call the web service and use the client from within your servlet code.

有足够多的 SOAP Web 服务框架允许您生成客户端.您可以通过 使用由 wsimport 或者甚至通过使用一些基本的东西来手动构建调用消息,例如 SAAJ.

There are enough SOAP web services frameworks out there that allow you to generate a client. You could keep it simple by using a JAX-WS client generated with wsimport or even manually building the message for the call by using something basic as SAAJ.

这篇关于关于基于 WCF SOAP 的 Web 服务和 servlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆