473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ajax & ssl certs

1
Hi, fairly new to javascript.

I am trying to make an https call to a web-service using XMLHttpRequest object in javascript. i successfully made a regular http call but having trouble getting the https working. The https call requires an ssl cert so any ideas how to attach the cert for this call ?

Expand|Select|Wrap|Line Numbers
  1. url2="https://myServer/axis2/webService/...";        
  2. envelope2 =
  3.         '<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">' +
  4.            '<soap:Header/>' +
  5.            '<soap:Body>' +
  6.                         .....
  7.            '</soap:Body>' +
  8.         '</soap:Envelope>';
  9.  
... then
Expand|Select|Wrap|Line Numbers
  1.         xmlHttp.open("POST", url, true);
  2.         xmlHttp.setRequestHeader("Content-Type", "application/soap+xml;charset=UTF-8;action=\"urn:getProjectInfo\"");
  3.         xmlHttp.setRequestHeader("Content-Length", len);
  4.         xmlHttp.setRequestHeader("SOAPAction", "urn:getProjectInfo");
the problem is how to handle the ssl keystore to make the call ...
thanks for any help/insight
Mar 22 '10 #1
1 2830
Dormilich
8,658 Expert Mod 8TB
I recommend a google search …

some example SOAP
Expand|Select|Wrap|Line Numbers
  1. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  2. <SOAP-ENV:Header>
  3.   <SOAP-SEC:Signature
  4.      xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12"
  5.      SOAP-ENV:actor="http://www.example.com/soapEndpoint"
  6.      SOAP-ENV:mustUnderstand="1">
  7.    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
  8.       <ds:SignedInfo>
  9.          <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
  10.          <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
  11.          <ds:Reference URI="#Body">
  12.             <ds:Transforms>
  13.                <ds:Transform Algorithm="http://www.w3.org/TR/2000/CR-xml-c14n-20001026"/>
  14.             </ds:Transforms>
  15.             <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
  16.             <ds:DigestValue>zA9itX3gfzCeYIYyalslJezGwAg=</ds:DigestValue>
  17.             </ds:Reference>
  18.          </ds:SignedInfo>
  19.          <ds:SignatureValue>
  20.             MCpXybqBI2Aa3Yx4IovjN3GgchaMDB3lIF1M6a9+Ngi59MqDwK3LRQ==
  21.          </ds:SignatureValue>
  22.       </ds:Signature>
  23.    </SOAP-SEC:Signature>
  24. </SOAP-ENV:Header>
  25. <SOAP-ENV:Body xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" SOAP-SEC:id="Body">
  26.   <ns1:add xmlns:ns1="urn:NumberAdder" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  27.      <number1 xsi:type="xsd:int">1</number1>
  28.      <number2 xsi:type="xsd:int">2</number2>
  29.   </ns1:add>
  30. </SOAP-ENV:Body>
  31. </SOAP-ENV:Envelope>
Mar 22 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: k.mitz | last post by:
Hi, I have a PHP application that allows users to generate a .pdf report of their database content. Normally, I've had to refresh a page to call the script to generate the report, so there's a...
3
by: Tim Burris | last post by:
At the top here i will put a quick description of my problem followed by the long description. This way you want get bored reading! : short version what is the best/recommended way for ASPNET...
21
by: javainfo | last post by:
How can i refresh IFRAME and load data through AJAX?
10
by: Steve | last post by:
I need to build a very dynamic client and would be interested in knowing the pros and cons of using JSF and Ajax to accomplish this. Thanks. Steve
3
by: Ivan P | last post by:
Hello! I have a index.php that on one click calls via AJAX a file.php. index.php looks like this: <html > <head> <script language="javascript" type="text/javascript" >
2
by: =?Utf-8?B?RG90TmV0RGV2?= | last post by:
Hi, We are still using .net 1.1 and I am working on a problem that I thought could be 'probably' done easily through 'AJAX'. I visited the ajax.asp.net site and I got an impression that its only...
2
by: Eli Criffield | last post by:
Does anyone have an example setup of a XML-RPC sever using client side certs for authentication? And instead of having a list of certs allowed to connect, I'd like to allow any cert signed by my...
1
by: Joe | last post by:
Hello, I'm currently using a C# class library which is also converted quickly to a console app by adding a MAIN and adjusting the building configuration. I'm using this page as a reference to the...
2
by: Nathan Sokalski | last post by:
I am moving my website from my machine to my webhost, and need some help with what extra files I need to include due to the fact that I used AJAX in my site. Everything on the site is obviously...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.