1 2 3 4 Previous Next 47 Replies Latest reply on Jul 20, 2007 10:36 AM by earniedyke

    SOAPClient over SSL with basic authentication

    earniedyke

      Greetings all,

      Is it possible to use the SOAPClient action with a web service that utilizes basic authentication over SSL? I have a requirement to do this but I can find no documentation that will help me.

      Earnie!

        • 1. Re: SOAPClient over SSL with basic authentication
          earniedyke

          As an update. I have setup the following action:

          <action name="GetWeather" class="org.jboss.soa.esb.actions.soap.SOAPClient">
           <property name="wsdl" value="https://a.b.com/test/testService?WSDL"/>
           <property name="operation" value="doTheTest"/>
          </action>
          


          And I am getting this error in the log:

          2007-06-26 08:57:16,187 INFO [STDOUT] 08:57:16,187 ERROR [HttpClientSupport$Helper] Failed to initialize SSL settings; java.lang.NoClassDefFoundError: org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory
          


          Is the EasySSLProtoclSocketFactory not included in ESB?

          Earnie!

          • 2. Re: SOAPClient over SSL with basic authentication
            earniedyke

            OK, I can't believe I am the first person on the planet to try web services over SSL with Basic authentication via ESB 4.2MR2. Can someone please throw me a bone at least. :-)
            Earnie!

            • 3. Re: SOAPClient over SSL with basic authentication
              kurtstam

              Hey Dr Evil. I think you are ;). I can't find the jar. Can you add it and see what happens?

              --Number 1.

              • 4. Re: SOAPClient over SSL with basic authentication
                earniedyke

                To which jar are you referring?

                Earnie!

                • 5. Re: SOAPClient over SSL with basic authentication

                  Hi guys,

                  you need to add the commons-ssl jar, download from http://juliusdavies.ca/commons-ssl/download.html

                  regards,

                  /Ole
                  eviware.com

                  • 6. Re: SOAPClient over SSL with basic authentication
                    earniedyke

                    I downloaded this and put it in the deploy\lib directory. Is that the correct place for it? Now I am getting:

                    14:09:36,812 INFO [STDOUT] 14:09:36,796 INFO [HttpClientSupport$Helper] Initia
                    lizing SSL
                    14:09:36,968 ERROR [STDERR] Exception in thread "Thread-21"
                    14:09:36,968 ERROR [STDERR] java.lang.IncompatibleClassChangeError
                    14:09:36,968 ERROR [STDERR] at org.apache.commons.httpclient.HttpConnection.
                    open(HttpConnection.java:706)
                    14:09:36,968 ERROR [STDERR] at org.apache.commons.httpclient.MultiThreadedHt
                    tpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManage
                    r.java:1321)
                    14:09:36,968 ERROR [STDERR] at org.apache.commons.httpclient.HttpMethodDirec
                    tor.executeWithRetry(HttpMethodDirector.java:386)
                    14:09:36,968 ERROR [STDERR] at org.apache.commons.httpclient.HttpMethodDirec
                    tor.executeMethod(HttpMethodDirector.java:170)
                    14:09:36,968 ERROR [STDERR] at org.apache.commons.httpclient.HttpClient.exec
                    uteMethod(HttpClient.java:396)
                    14:09:36,968 ERROR [STDERR] at com.eviware.soapui.impl.wsdl.support.wsdl.Url
                    WsdlLoader$LoaderWorker.construct(UrlWsdlLoader.java:147)
                    14:09:36,968 ERROR [STDERR] at com.eviware.soapui.support.swing.SwingWorker$
                    2.run(SwingWorker.java:111)
                    14:09:36,968 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)


                    Earnie!

                    • 7. Re: SOAPClient over SSL with basic authentication

                      Hi,

                      hmm.. I'm not sure.. could you try to put it in your esb-deployment-ear/package? It should probably be at the same place where the soapui jars are.. (where are they?)

                      /Ole
                      eviware.com

                      • 8. Re: SOAPClient over SSL with basic authentication
                        earniedyke

                        We are making progress my friend!!!!

                        I added commons-ssl to the soap-client.sar and restarted everything. Now I am getting the following error which I presume is related to part 2 of my original question: how do I send authorization credentials.

                        Earnie!

                        14:28:16,203 INFO [STDOUT] 14:28:16,203 INFO [WsdlLoader] 1.2.3.4:443 re
                        quires authentication with the realm 'weblogic'
                        14:28:16,218 INFO [STDOUT] 14:28:16,218 ERROR [HttpMethodDirector]
                        java.lang.NullPointerException
                         at com.eviware.x.form.XFormFactory.createDialogBuilder(XFormFactory.java
                        :31)
                         at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentia
                        lsProvider.buildBasicDialog(UrlWsdlLoader.java:253)
                         at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$WsdlCredentia
                        lsProvider.getCredentials(UrlWsdlLoader.java:223)
                         at org.apache.commons.httpclient.HttpMethodDirector.promptForCredentials
                        (HttpMethodDirector.java:864)
                         at org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChalle
                        nge(HttpMethodDirector.java:727)
                         at org.apache.commons.httpclient.HttpMethodDirector.processAuthenticatio
                        nResponse(HttpMethodDirector.java:663)
                         at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe
                        thodDirector.java:192)
                         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
                        a:396)
                         at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader$LoaderWorker.
                        construct(UrlWsdlLoader.java:147)
                         at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:1
                        11)
                         at java.lang.Thread.run(Thread.java:595)


                        IP address in the message is not the real one. Can't share that now can I?!?


                        • 9. Re: SOAPClient over SSL with basic authentication

                          Hi!

                          Progress is good! Actually at this point I'm not sure how the jboss-folks have wrapped to soapUI API.. (which has support for setting credentials..), are you running from SVN or some distribution?

                          regards

                          /Ole
                          eviware.com

                          • 10. Re: SOAPClient over SSL with basic authentication
                            earniedyke

                            I am running from the SVN as of yesterday. I have been trying to figure out the auth stuff in soapui as well since the client will allow me to connect with a user/password. JBoss has this SoapClient that I am looking at now but it uses HTTPClient from commons-httpclient. Not sure where this and soapui cross paths. Will let you know what I find out.

                            Thanks for the help today!!!

                            Earnie!

                            • 11. Re: SOAPClient over SSL with basic authentication

                              Hi!

                              In soapUI you can just set username/password/domain properties, maybe you will need to turn on preemptive authentication in the preferences/http tab. All this can of course be set from the soapUI API as well, but I don't know how SOAPClient encapsulates it and what properties/settings from soapUI it exposes.. if you need and help digging, let me know :-)

                              regards,

                              /Ole
                              eviware.com

                              • 12. Re: SOAPClient over SSL with basic authentication
                                marklittle

                                If you manage to get this sorted, create a JIRA task to cover anything that needs doing and we'll look at including it in the release. Thanks.

                                • 13. Re: SOAPClient over SSL with basic authentication
                                  tfennelly

                                   

                                  "omatzura" wrote:
                                  Hi!

                                  In soapUI you can just set username/password/domain properties, maybe you will need to turn on preemptive authentication in the preferences/http tab. All this can of course be set from the soapUI API as well, but I don't know how SOAPClient encapsulates it and what properties/settings from soapUI it exposes.. if you need and help digging, let me know :-)

                                  regards,

                                  /Ole
                                  eviware.com


                                  Actually guys, the SOAPClient ESB action depends on soapUI to generate the SOAP request template from the specified webservice endpoint. It doesn't actually post the HTTP request, SOAPClient does this itself.

                                  Let me look into this and I'll come back.

                                  • 14. Re: SOAPClient over SSL with basic authentication
                                    tfennelly

                                    Sorry about the delay on this guys, I still haven't gotten around to sorting it out. After having a quick look it's obvious that I kick wide on adding basic authentication capability to SOAPClient. There's a sample of how to do it there in the HttpClient samples and it doesn't look overly difficult. The action config would obviously need to be updated to accommodate the auth parameters.

                                    If anyone is interested in making the mods to SOAPClient, please feel free. Otherwise I'll get to it ASAP.

                                    BTW, I did add a JIRA on this earlier today: http://jira.jboss.com/jira/browse/JBESB-650

                                    1 2 3 4 Previous Next