Announcement

Collapse
No announcement yet.

Soap Sender can't access web service through proxy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Soap Sender can't access web service through proxy

    Hi all,

    I am using latest version of 1.6 Mirth.

    I have a Soap Sender that accesses web service. I am unable to access web service through my company?s proxy server.

    Through research I was able to find the correct properties to set in Java for web service call through proxy and they are as follows:

    System.setProperty(?http.proxySet?, ?true?);
    System.setProperty(?http.proxyHost?, ?proxy?s host URL here?);
    System.setProperty(?http.proxyPort?, ?proxy?s Port here?);

    This works fine testing in Jave console app

    I can?t find any way in the channel that has my soap sender to set the proxy propertyes.

    Can someone please help?


    Tks
    Dan

  • #2
    Re:Soap Sender can't access web service through proxy

    You can access Java classes at Javascript steps.

    Search the forum for examples.

    Comment


    • #3
      Re:Soap Sender can't access web service through proxy

      Thank you for the fast response.

      I have already tried to do this in both, preprocessor javascript step and transformer javascript step, however it does not work, and this tells me that this steps do not run in the same java process as setting this properties is local to the process accessing the web service through proxy.

      So, does anyone have a working solution of accessing web service through proxy (setting the properties as I specified on any other way) through soap sender.

      Thanks in advance.
      Dan

      Comment


      • #4
        Re:Soap Sender can't access web service through pr

        Hi !
        Maybe using the Global Scripts or in the Deploy section of your channel.
        Tell us if it works well.

        Antaris

        Comment


        • #5
          I'm having issues getting mirth to work through a proxy, has anyone had any success with setting the proxy settings in a channel rather than system wide?

          Cheers
          Simon

          Comment


          • #6
            All the web service stuff has been updated in 2.0 beta... you may want to give it a shot.

            Comment


            • #7
              I have found the following Java code to get NTLM proxy auth working in java applications.

              Code:
              //Configure SOAP HTTP client to authenticate to server using NTLM
              HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
              
              //TODO make report server credentials configurable
              auth.setUsername("jdoe");
              auth.setPassword("strongpass");
              auth.setDomain("WINDOWSDOMAIN");
              auth.setHost("host.mydomain.com");
              auth.setPort(443);
              
              Options o = new Options();
              o.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth);
              myWebServiceStub._getServiceClient().setOptions(o);
              Is it possible to use something like this in the deploy script of a channel. I can only run the latest stable version on this server so 2.0 Beta is not an option.

              Thanks for your help.

              Cheers
              Simon

              Comment


              • #8
                Looking for examples in the forum I have attempted to put the following in my Deploy script.

                Code:
                //Configure SOAP HTTP client to authenticate to server using NTLM
                var auth = new HttpTransportProperties.Authenticator();
                
                //TODO make report server credentials configurable
                auth.setUsername("jdoe");
                auth.setPassword("strongpass");
                auth.setDomain("WINDOWSDOMAIN");
                auth.setHost("host.mydomain.com");
                auth.setPort(443);
                However when I deploy the channel I get the following err.

                Code:
                [2010-10-04 15:38:01,522]  ERROR (com.webreach.mirth.server.util.JavaScriptUtil:120): Error executing Deploy script.
                java.lang.NullPointerException
                	at com.webreach.mirth.server.util.JavaScriptUtil.getSourceCode(JavaScriptUtil.java:263)
                	at com.webreach.mirth.server.util.JavaScriptUtil.executeScript(JavaScriptUtil.java:152)
                	at com.webreach.mirth.server.util.JavaScriptUtil.executeScript(JavaScriptUtil.java:113)
                	at com.webreach.mirth.server.controllers.DefaultConfigurationController.executeChannelDeployScripts(DefaultConfigurationController.java:431)
                	at com.webreach.mirth.server.Mirth.startMule(Mirth.java:248)
                	at com.webreach.mirth.server.Mirth.restartMule(Mirth.java:208)
                	at com.webreach.mirth.server.Mirth.run(Mirth.java:138)
                So I guess this is not working.

                Cheers
                Simon

                Originally posted by simidau View Post
                I have found the following Java code to get NTLM proxy auth working in java applications.

                Code:
                //Configure SOAP HTTP client to authenticate to server using NTLM
                HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
                
                //TODO make report server credentials configurable
                auth.setUsername("jdoe");
                auth.setPassword("strongpass");
                auth.setDomain("WINDOWSDOMAIN");
                auth.setHost("host.mydomain.com");
                auth.setPort(443);
                
                Options o = new Options();
                o.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth);
                myWebServiceStub._getServiceClient().setOptions(o);
                Is it possible to use something like this in the deploy script of a channel. I can only run the latest stable version on this server so 2.0 Beta is not an option.

                Thanks for your help.

                Cheers
                Simon

                Comment


                • #9
                  The proxy supports BasicAuth?

                  I have done authentication against SOAP or HTTP by using HTTP headers:

                  Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

                  If you're using SOAP Sender, you always can use an HTTP sender to emulate it and inserting that header.

                  HTH

                  Comment

                  Working...
                  X