简体   繁体   中英

Mule Connection refused: connect when calling web service

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM