Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

SOAP and class1 cert

by Hammy (Scribe)
on Aug 23, 2005 at 17:42 UTC ( #485968=perlquestion: print w/replies, xml ) Need Help??
Hammy has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I have code that calls a SOAP service. The service requires that I pass it a certificate (The public piece of the certificate is loaded into the owner of the services web server). Previously I was using the SSL cert on the box and everything worked well. I went to Verisign to get a Class 1 cert. When using that cert, I get the following error:
SOAP::Transport::HTTP::Client::send_receive: 500 (Internal Server Erro +r) configure certs failed: failed to load /usr/local/certs/staging.ce +r:
This error happens during the submission of the service so it is not ever getting to the service.

Here is the code that I am using to call the service:

$ENV{HTTPS_CERT_FILE}= '/usr/local/certs/staging.cer'; $ENV{HTTPS_KEY_FILE} = '/usr/local/certs/staging.pfx'; use XML::Simple; use SOAP::Lite +trace; my $data = SOAP::Data->name('data' => "$xml")->type('string')->uri('') +; my $s = SOAP::Lite -> uri ('') -> proxy ('') -> on_action(sub{join '/', @_}) -> on_fault(sub{}); $result = $s->PerformUpdate($data)->result;
Does anyone have a clue where I can go to find out what I might be doing incorrectly? Thanks in advance.

Replies are listed 'Best First'.
Re: SOAP and class1 cert
by idsfa (Vicar) on Aug 24, 2005 at 15:58 UTC

    The code doesn't support https. Excerpt from the send_receive method indicated in your error message:

    sub send_receive { . . . my $http_endpoint = qq[http://$host:$port$endpoint]; my $ua = LWP::UserAgent->new(); my $post = HTTP::Request->new('POST', $http_endpoint, ...

    Note the hardcoded http. Did you actually test to confirm that you were passing SSL connections?

    The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. -- Cyrus H. Gordon
      I have been using this code for about 1 year now and there have been no problems. It works like a charm when I use the SSL cert on the box, but not when I use the class one cert I just aquired. I found one thing I am doing wrong was trying to use the pfx file. I have converted it to a pem, but I now get an invalid arguement error. I am not sure where to go next.
        It's been a while since I had to troubleshoot a problem like this, but in the past, I think I fired up a browser on the soap client, imported the cert, and tried to access the remote soap server that way. As I remember, this helped me track down cert issues independent of the soap layers. Don't know if it will help in your case. Good luck.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://485968]
Approved by holli
Front-paged by planetscape
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2018-10-16 13:53 GMT
Find Nodes?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...

    Results (85 votes). Check out past polls.