Skip to Content
avatar image
Former Member

Connection Refused in Message mapping

Hi Experts,

We had a requirement to extract data from exchange rates URL and post it to ECC.

For this we are using  a UDF to connect to the URL and extract the data in the message mapping.

We implemented new firewall rules for dev, quality and prod with help of network team to establish connection between SAP PI systems and external URL.

This is working fine and we are able to connect and extract data in our dev and Quality system.

Recently we moved the code to prodcution and we get connection refused error in message mapping.

We provided the ip address of the systems for the firewall rule. Network team provided the log where there is entry for prodcution ip to connect with the URL ip.

But still we are not able to connect from prodcution and message is failing. It is still working in dev and quality.

Can you please throw some pointers on this. Will there be any extra protection for prodcution system?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 31, 2014 at 04:13 AM


    Please check if there is extra security layer for production web service. like certificate etc.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 31, 2014 at 06:21 AM


    What is the error you are getting  ?



    Add comment
    10|10000 characters needed characters exceeded

  • Jan 02, 2015 at 11:20 AM

    Hi Pavi,

    What kind of lookup are you using in the message mapping, SOAP, RFC?. Check the connection parameters are the rights for the production environment.


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      This the UDF used for the extractign the XML from the external link


              URL url = new URL("<Ex rate URL>");

              URLConnection yc = url.openConnection();

              BufferedReader in = new BufferedReader(new InputStreamReader(


              String inputLine;

              while ((inputLine = in.readLine()) != null) {

                  output = output + inputLine;


              } catch (Exception e){

      Error log from test tab in message mapping:

      Start of test 

      •   Document start
      •   Start tag [<>]
      •   Add raw attribute [ xmlns:ns1="<>"]
      •   Connection refused
      •   Start tag [Output]
      •   Put value []
      •   Close tag [Output]
      •   Close tag [<>]
      •   Document end

      Executed successfully

      End of test

  • avatar image
    Former Member
    Jan 02, 2015 at 11:48 AM

    Hi Pavi,

    Can you confirm from destination end,whether they have allowed your IP to talk to there server.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      It is same destination being used for all systems (dev,QA & prod).

      There is no restrictions from the target end.

      We did proxy bypass also between the PI prodcution and target url.

      Still no luck.