Q:

Port and url error in heroku app

I made a webservice that publish a wsdl file , here is the code 
Endpoint.publish("http://localhost:"+args[0]+"/main/webServ", new WebServiceImpl());

and here is the procfile
worker: java -cp target/classes:target/dependency/* com.example. Publisher $PORT

there is no error in the log file and I got the port number from there lets say its "7435". 
and when I run :
telnet whispering-beyond-3102.heroku.com

I got nothing 
how can I access the webserice url ? ,  I tried to go to:
http://whispering-beyond-3102.heroku.com:7435/run/java/main/webServ?wsdl 

I get no output 
what URL should I use

A:

If you are exposing a web service, you'll want to be defining a web process in your Procfile instead of a worker process.  This will tell Heroku to inject the $PORT environment variable on app start up and route web requests to your app on that port.  Web requests from the Internet to your app should be on the default 80 (or 443 for HTTPS) and then Heroku will route the request to your app on the provided $PORT.  Once you fix the Procfile, you should be able to access your web service at (on default port 80):
http://whispering-beyond-3102.heroku.com/run/java/main/webServ?wsdl 

