简体   繁体   中英

making SOAP request over HTTPS - Javascript, Phonegap

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.

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).

Any help would be appreciated.

Thanks

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

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

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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