简体   繁体   English

从Java连接到SOAP Web服务?

[英]Connect to SOAP Web Services from Javascript?

I am very new to Soap web services and HTML5 i want develop App using html5 and soap webservices i have soap web-services wsdl and lo-gin credential how can i connect that services from html5 app.please send any useful links or samples to me so that i can try . 我对Soap Web服务和HTML5非常陌生,我想使用html5和soap Webservices开发应用程序,但我有soap Web服务wsdl和lo-gin凭据,如何从html5 app连接该服务。请将任何有用的链接或示例发送给我这样我可以尝试。

Thanks in Advance is there any third party frame work to connect Soap Web-services . 在此先感谢,是否有任何第三方框架可以连接Soap Web服务。

HTML is not a scripting language. HTML不是脚本语言。 You can't connect to SOAP with that. 您不能以此连接到SOAP。 Look into PHP which has a SOAP class and then use that to generate the HTML. 查看具有SOAP类的PHP,然后使用该类生成HTML。

SOAP is an XML based protocol. SOAP是基于XML的协议。 Though Javascript can in theory read and consume SOAP replies, in practice this is not possible due to browser security limitations and such to keep Internet as a sane place. 尽管从理论上讲Javascript可以读取和使用SOAP答复,但实际上由于浏览器的安全性限制,这是不可能的,并且使Internet保持理智。

What you want to do is to create an middlware which translates your HTML5 client-side AJAX requests to SOAP requests on the server and then returns results as a translated JSON. 您要做的是创建一个中间件,它将HTML5客户端AJAX请求转换为服务器上的SOAP请求,然后以转换后的JSON形式返回结果。

SOAP traffic is better to be handled server-to-server instead of directly from browser-to-server. 最好在服务器到服务器之间处理SOAP流量,而不是直接在浏览器到服务器之间处理。 Thus, the question is what kind of server resources you have to create and translate SOAP requests. 因此,问题是创建和转换SOAP请求必须使用哪种服务器资源。

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

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