Announcement Announcement Module
Collapse
No announcement yet.
Accessing https web-service using int-ws outbound gateway via proxy Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing https web-service using int-ws outbound gateway via proxy

    I have build a Web Service Client using Spring Integration, there I am using int-ws:outbound-gateway to connect with the web service.
    Where
    xmlns:int-ws="http://www.springframework.org/schema/integration/ws"

    My problem is if I use http it works fine but if I use https it stops working.

    Can anyone please help!

    As I have to go via a proxy so I am also putting following proxy information in JAVA_OPTS:

    -Dhttp.proxyHost="192.168.0.2"
    -Dhttp.proxyPort="8080"
    -Djavax.net.ssl.trustStore="C:\Java\jdk\jre\lib\sec urity\cacerts"
    -Dhttp.nonProxyHosts="…;…;…"


    <int-ws:outbound-gateway
    uri="http://test.com/app/serv/XYZ"
    request-channel="c1" reply-channel="c2" auto-startup="true"
    marshaller="myJaxb2Marshaller" unmarshaller="myJaxb2Marshaller"
    message-factory="myMsgFactory" />

    If I use uri="http://test.com/app/serv/XYZ", works fine.
    If I use uri="https://test.com/app/serv/XYZ", stops working.

    Trace information using https and https:

    Trace for http:
    2013-04-03 15:36:31,069 DEBUG | pool-2-thread-2 | org.springframework.ws.client.core.WebServiceTempl ate | Opening [org.springframework.ws.transport.http.HttpU
    rlConnection@c12978] to [http://test.com/app/serv/XYZ]

    2013-04-03 15:36:31,100 TRACE | pool-2-thread-2 | org.springframework.ws.soap.saaj.support.SaajUtils | SOAPElement [com.sun.xml.internal.messaging.saaj.soa
    p.ver1_2.Envelope1_2Impl] implements SAAJ 1.3

    2013-04-03 15:36:31,116 TRACE | pool-2-thread-2 | org.springframework.ws.soap.saaj.support.SaajUtils | SOAPElement [com.sun.xml.internal.messaging.saaj.soap.ver1_2.Bo dy1_2Impl] implements SAAJ 1.3
    2013-04-03 15:36:31,381 TRACE | pool-2-thread-2 | org.springframework.ws.client.MessageTracing.sent |
    Sent request [<env:Envelope xmlns:env="http://www.w3
    .org/2003/05/soap-envelope"><env:Header/><env:Body>…..</env:Body></env:Envelope>]

    2013-04-03 15:36:32,553 TRACE | pool-2-thread-2 | org.springframework.ws.client.
    MessageTracing.received | Received response [<?xml version='1.0' encoding='utf
    -8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><
    soapenv:Body>…….</env:Body></env:Envelope>]

    Trace for https:
    2013-04-03 15:18:26,445 DEBUG | pool-2-thread-2 | org.springframework.ws.client.core.WebServiceTempl ate | Opening [org.springframework.ws.transport.http.HttpUrlConne ction@d2efa1] to [https://test.com:443/app/serv/XYZ]

    2013-04-03 15:18:26,477 TRACE | pool-2-thread-2 | org.springframework.ws.soap.saaj.support.SaajUtils | SOAPElement [com.sun.xml.internal.messaging.saaj.soap.ver1_2.En velope1_2Impl] implements SAAJ 1.3

    2013-04-03 15:18:26,492 TRACE | pool-2-thread-2 | org.springframework.ws.soap.saaj.support.SaajUtils | SOAPElement [com.sun.xml.internal.messaging.saaj.soap.ver1_2.Bo dy1_2Impl] implements SAAJ 1.3
    2013-04-03 15:18:26,524 TRACE | pool-2-thread-2 | org.springframework.ws.client.MessageTracing.sent |
    Sent request [<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Header/><env:Body>…..</env:Body></env:Envelope>]
    Last edited by rahat; Apr 4th, 2013, 08:42 PM.

  • #2
    Looks like a server issue to me; in the first case, you get a response; in the second, you don't.

    Comment


    • #3
      Server of the service might got no issue because if I use soapUI instead of my Spring Integration Web Service Client, I get response for both http and https cases from the server.
      Last edited by rahat; Apr 5th, 2013, 02:03 AM.

      Comment


      • #4
        Hi!
        I recommend to switch on SSL debug in java args:
        -Djavax.net.debug=ssl,handshhake
        It looks like your JVM doesn't trust to the service self-signed certificate.
        And also: which Java version do you use?

        Take care,
        Artem

        Comment


        • #5
          Hi Artem,
          Thanks a lot. I am using jdk1.6.0_22 path in my JAVA_HOME, also using same for -Djavax.net.ssl.trustStore
          I will try switch on SSL debug in java args as you mentioned.
          But my point is, when I use SOAPUI 4.0.1 as client that time both http and https works.

          Thanks & Regards,
          Rahat

          Comment


          • #6
            Hi guys,
            Issue resolved.
            Thanks all for your helps.
            For https, I just used -Dhttps.proxyHost and -Dhttps.proxyPort, which makes the difference.

            Comment


            • #7
              Thank you rahat, you just made my day easier, by giving info on https issue.

              Comment

              Working...
              X