Quantcast
Viewing all articles
Browse latest Browse all 3131

connecting to remote service

Hello,

 

I deployed one Java Application in my trial account. Here I implemented the following Servlet:

 

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
URL url = new URL("http://www.google.de");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.connect();

All runs fine. I'm getting HTTPS status 200 and as response the googe site code. .... as expected.

 

Now I try to call one webService, running on my local PC via myFritz Service... (url modified)

 

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
URL url = new URL("http://pc.w1abcdefgh29nyk9.myfritz.net:9201/test?function=start");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.connect();

... but getting:

 

h1. HTTP Status 500 - Server returned HTTP response code: 403 for URL: http://pc.w1abcdefgh29nyk9.myfritz.net:9201/test?function=start

 

... only via HCP. Calling this URL via browser, all works as expected.

 

 

Why is it possible to reach google but not my url? What's wrong? As I understood HCP runs in the open internet and for connecting other services in the internet I do not need any Connectivity Service, right?


Viewing all articles
Browse latest Browse all 3131

Trending Articles