Skip to Content
avatar image
Former Member

WebService Consuming Message Error: ConnectException: Connection timed out:

Hi experts,

I'm using NWDS to consume an external WebSevice and after create an iView on EP6.

First I created a Deployable WebService and deployed it on the server, so I created a Java Application to call this WS using the following code:

<i>public class JQSRedirect extends HttpServlet {

protected void doGet(

HttpServletRequest request,

HttpServletResponse response)

throws ServletException, IOException {

PrintWriter pw = response.getWriter();

try{

String applicationID = "XXXX";

String passwordID = "XXXXX";

String userID = "XXXXXX";

String redirectURL = "http://XXXXXXX/preportal.aspx?token={";

String token = "";

InitialContext in = new InitialContext();

NJQSService nJQSService = (NJQSService)in.lookup("wsclients/proxies/sap.com/jqsWebService/ng.com.xxxx.jqsWebServiceProxy");

NJQSServiceSoap njqsPort = nJQSService.getLogicalPort();

GetTokenN getTokenN = new GetTokenN();

+token = njqsPort.getTokenN(userID, applicationID, passwordID);

pw.write("token: " + token);

}

catch(Exception e) {

pw.write(e.toString());

e.printStackTrace();

}

}

protected void doPost(

HttpServletRequest request,

HttpServletResponse response)

throws ServletException, IOException {

//TODO : Implement

}

}</i>

When I'm testing , the system display the follow message: <b>java.rmi.RemoteException: Service call exception; nested exception is: java.net.ConnectException: Connection timed out: connect</b>

How to correct this error?

Regards,

Armando

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 24, 2008 at 10:05 AM

    Hi,

    I found a reason for the previous error, I setted up the firewall rules and it works, but now we have another error message:

    java.rmi.RemoteException: Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (405) Method Not Allowed. The requested URL was:"http://193.122.30.8/XXXXXXXX/NJQS/njqsservice.wsdl"

    I made some researchs on the SDN and another sites of Internet that suggests a proxy configuration, but I don't have proxy on my server.

    Any Idea that can help me?

    Regards,

    Armando

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      The problem was happening on the source XML that was pointing to a local host instead to the correct server. After fix it. works fine.