on 04-22-2008 12:24 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.