Solved

PHP webservice signature

Posted on 2012-12-21
1
291 Views
Last Modified: 2012-12-31
I need to use PHP to invoke an external SOAP web service that resides in a webserver.
The web service requires that a digital signature shall be used to establish the connection.
The web service must have a signature.
Some items on the xml web server file must be encrypted with an AES symmetric key. But when accessing the test environment the web service provider sent us two files
a file with an extension .cer and another one with .pfx extension.
Which of them and how can I use this in my PHP script to build the xml. Is there any example you can send to me?
0
Comment
Question by:luciliacoelho
1 Comment
 
LVL 1

Accepted Solution

by:
DanUrsoviciu earned 500 total points
ID: 38714413
As an example on how to use php soap client with certificates:
$wsdl = "service.wsdl";
$cert = "c:\secure_cert\webservice.pem";
$client = new SoapClient($wsdl, array('local_cert' => $cert);

Open in new window

and you can check more examples on SoapClient manual page

The two files could be the same thing but in different formats. Read the explanations on this link to get an idea and convert certificates between formats.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now