0

I have a local environment consisting of a Mule architecture that is used to send xml payloads to SAP.

This local environment was created with Maven and Eclipse (option 2 here).

Our proxy was changed recently and now when trying to send a payload to SAP I get: org.apache.cxf.interceptor.Fault: Connection refused: connect

Since the local environment has the mule-standalone server inside Ecliple I am not sure where the proxy setting must be.

Community
  • 1
  • 1
Watchmaker
  • 4,908
  • 1
  • 37
  • 38

1 Answers1

0

Could you be more specific ? How you consume SAP service ?

  • Java Client(cxf) inside a mule component?
  • Mule conector for sap?
  • Sap java conector? jco
  • Custom implementation with java or mule conectors?

Mule That gives us the ability to configure bridges in their connectors:

https://docs.mulesoft.com/mule-user-guide/v/3.6/http-proxy-pattern

However, you can also configure it with pure java. Use a proxy in java is easy :

Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("10.20.30.40", 8180));
conn = new URL(urlString).openConnection(proxy);

If you need authentication, use system proxies , environment properties or something more complex check this:

How do I make HttpURLConnection use a proxy?

Tell us what you're using to help .

Community
  • 1
  • 1
JRichardsz
  • 14,356
  • 6
  • 59
  • 94
  • I am not sure about the way it consumes SAP. I had not seen mule before and I am facing a very messy develpment with ~2GB code folder and no documentation at all (not functional, not in the code ...). Looking in the pom.xml of the several maven projects I can see `org.apache.cxf` but also there are projects refering to jco. I know how to set a proxy in Java but I can't figure out where in this case. – Watchmaker Nov 02 '15 at 10:51
  • I understand. It is stressful T_T. Is your machine configured with the proxy? If Yes, you can try this : -Djava.net.useSystemProxies=true This will use the system settings so you don't need to repeat yourself. Check this: http://stackoverflow.com/a/18164472/3957754 Tell us if it works , otherwise we will continue helping you . – JRichardsz Nov 02 '15 at 13:58
  • I finally found the issue, the proxy was whitelisting our local environment so the real problem was to find the right properties among all the xml properties files. It's quite tricky to follow the path to the right files and a lot of the code is not valid anymore. At the moment it is a bit of a trial&error routine. The call to the WS is made with a JaxWsProxyFactoryBean. – Watchmaker Nov 04 '15 at 15:48