I am attempting to connect to a secure SOAP web service and have been
provided a password protected keystore, truststore and also a self
signed *.cer file.
The server component is implemented in java and the documentation is
plentiful. While I have been able to use the non-secure service, I am
not sure how to use the keystore/truststore particularly with password
protection.
I realize that this is roughly what is available to me in the ruby lib:
wsdl = ‘https://some.com/something.wsl’
factory = SOAP::WSDLDriverFactory.new( wsdl )
drv = factory.create_rpc_driver
drv.options[ ‘protocol.http.ssl_config.ca_file’ ] = nil
alternatively:
drv.options[‘protocol.http.ssl_config.verify_mode’] =
openSSL::SSL::VERIFY_NONE
#drv.options[‘protocol.http.ssl_config.verify_mode’] =
OpenSSL::SSL::VERIFY_PEER
drv.options[‘protocol.http.ssl_config.ca_file’] = ‘api_cert_chain.crt’
drv.options[‘protocol.http.ssl_config.client_cert’] = ‘client.cert’
drv.options[‘protocol.http.ssl_config.client_key’] = ‘client.keys’
Thanks in advance for any insight.
Christopher Wilson
I’d like to take a string like that below
“0011122234667889”
and reduce to
“012346789”
I can see ways to do it for a single digit, but
not all in one fell swoop:
“0011122234667889”.gsub(/1{2,}/, “1”) #reduce seq (2 or more) of 1s to
single 1
“0011122234667889”.gsub(/1+/, “1”) #1 or more 1s to single 1
Thanks for any help.
Steve
2008/3/6, Stephen F. [email protected]:
“0011122234667889”.gsub(/1{2,}/, “1”)
#reduce seq (2 or more) of 1s to
single 1
“0011122234667889”.gsub(/1+/, “1”) #1 or more 1s to single 1
My first try would be :
“0011122234667889”.gsub /(\d)\1+/, ‘\1’
-- Jean-François.
On Mar 6, 2008, at 1:01 PM, Stephen F. wrote:
I’d like to take a string like that below
“0011122234667889”
and reduce to
“012346789”
How about this?
“0011122234667889”.split("").uniq.join
=> “012346789”
James Edward G. II
On Mar 6, 1:13 pm, James G., Junior [email protected]
wrote:
How about this?
“0011122234667889”.split(“”).uniq.join
=> “012346789”
Not good.
irb(main):002:0> “0011122234667889”.squeeze
=> “012346789”
Nice. I know, rtfm, right?
Steve
On Mar 6, 2008, at 4:39 PM, William J. wrote:
“012346789”
James G., Junior
I love you too William.
James Edward G. II