通过HTTPS进行SOAP请求 - Javascript,Phonegap [英] making SOAP request over HTTPS - Javascript, Phonegap

查看:95
本文介绍了通过HTTPS进行SOAP请求 - Javascript,Phonegap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个PhoneGap移动应用程序,我需要通过HTTPS向WebService发出SOAP请求,并接收JavaScript中的SOAP响应。我可以选择从WebService获取Java应用程序密钥存储文件(.JKS)或Windows .NET应用程序文件(.PFX)作为SSL证书,以在客户端移动应用程序上安装。

I'm building a PhoneGap mobile application and I need to make a SOAP request over HTTPS to a WebService and receive the SOAP response in JavaScript. I can choose to get a Java Application Key Store file (.JKS) or a Windows .NET Application file (.PFX) as the SSL certificate from the WebService to install on the client mobile application.

你能帮我开始做这样的任务吗?如何使用SSL使用JavaScript进行SOAP请求,以及如何使用证书文件?我可以使用这两种文件类型之一作为证书直接连接到WebService或者我需要有一个自己的中间WebService(用JAVA或.NET编写),以方便此功能(我宁愿

Can you please help me where to start to do such a task? How to make the SOAP request in JavaScript using SSL and how to use the certificate file? Can I use either one of these two file types as the certificate to connect to the WebService directly or do I need to have a middle WebService of my own (written in JAVA or .NET) that facilitates this functionality?(I'd rather to talk to the WebService directly with my mobile application of course).

任何帮助将不胜感激。

谢谢

推荐答案

您可以使用AJAX(XMLHttpRequest)与cordova,有一个 jQuery Soap模块

You can use AJAX (XMLHttpRequest) with cordova, there are a jQuery Soap module.

对于允许请求,您需要在config.xml中添加URL: / p>

For allow requests you need add the URL on config.xml:

<access origin="https://webserviceurl.com"/>

对于证书,您可以生成一个CA密钥以签署您自己的证书,并安装CA PEM 。

For the certificate, you can generate a CA key for sign your owns certificates, and install the CA PEM.

从Android配置菜单 - >安全 - >凭证存储 - >从SD卡安装

From android configuration menu -> security -> credential storage -> Install from SD Card

这篇关于通过HTTPS进行SOAP请求 - Javascript,Phonegap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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