- This topic has 6 replies, 2 voices, and was last updated 14 years, 8 months ago by support-shalini.
-
AuthorPosts
-
chriskukuMemberI loaded and ran the[ur=http://www.myeclipseide.com/documentation/quickstarts/webservices_jaxws/index.htmll] jaxws WebService/Client project[/url] from within myeclipse and
was trying to change the port number for the Calculator service.For the service it looks like I could change the 8080 to an 8880. But where do I change that for the client? Where does the client know from where to load the wsdl file?
In other words: I have already a Tomcat running at ports 8080 et al.
I would like toa) run the MyEclipse-embedded Servlet container without interfering with the other Tomcat
b) in the long run I would deploy every app to the external Tomcat.How can this be achieved?
Thanks.
Christoph
support-shaliniMemberChristoph,
1.But where do I change that for the client? Where does the client know from where to load the wsdl file?
You can change the URL In the client project.
Open CalculatorService.java from the client project and change the port number for the URL given.2. Do you want to run both Embedded tomcat and external tomcat simultaneously? In that case, you will have to make the following two changes
1. Change the Embedded Tomcat port – go to Window > Preferences > MyEclipse > Servers > Integrated Sandbox > MyEclipse Tomcat 6 and change the port number.
2. For the external tomcat, go to ~\apache-tomcat-5.5.27\conf, edit server.xml and change shutdown port(<Server port=”8005″ shutdown=”SHUTDOWN”>) value to some other valueLet me know if that helps
chriskukuMember@support-shalini wrote:
Christoph,
1.But where do I change that for the client? Where does the client know from where to load the wsdl file?
You can change the URL In the client project.
Open CalculatorService.java from the client project and change the port number for the URL given.2. Do you want to run both Embedded tomcat and external tomcat simultaneously? In that case, you will have to make the following two changes
1. Change the Embedded Tomcat port – go to Window > Preferences > MyEclipse > Servers > Integrated Sandbox > MyEclipse Tomcat 6 and change the port number.
2. For the external tomcat, go to ~\apache-tomcat-5.5.27\conf, edit server.xml and change shutdown port(<Server port=”8005″ shutdown=”SHUTDOWN”>) value to some other valueLet me know if that helps
Thanks. I found the port definition now on the client side.
I changed that to 8880 und 8880 in the sever CalculatorService.wsdl as well, but when I run the client, I’m getting:Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://localhost:8880/WebServiceProject/CalculatorPort?WSDL. It failed with: Connection refused: connect. at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144) at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:263) at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:226) at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174) at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104) at javax.xml.ws.Service.<init>(Service.java:56) at com.myeclipseide.ws.CalculatorService.<init>(CalculatorService.java:55) at com.myeclipseide.ws.client.WebServiceClient.main(WebServiceClient.java:13) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:163) at sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at sun.net.www.http.HttpClient.<init>(HttpClient.java:233) at sun.net.www.http.HttpClient.New(HttpClient.java:306) at sun.net.www.http.HttpClient.New(HttpClient.java:323) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041) at java.net.URL.openStream(URL.java:1009) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:805) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:262) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:129) ... 7 more
What I’m nit sure of: Do I have to run the WebServiceProject (Run as a MyEclipse Server application or Java Application or run it at all since it is maintained by the embedded server?)
How can I tell whether the internel server is running? Despite from peeking at ports with netstat?
—
Christoph
support-shaliniMemberChristoph,
The web service project should be running when you test your client. Please make sure that the server is running and the application is deployed to it.For the embedded tomcat, there is no way to tell if the server is running or not except to view its status in the “Servers View”. To open servers view, go to Window > Show View > Servers.
For the external tomcat you can open the browser and type in http://localhost:8080
this will show the tomcat home page.
chriskukuMember@support-shalini wrote:
Christoph,
The web service project should be running when you test your client. Please make sure that the server is running and the application is deployed to it.For the embedded tomcat, there is no way to tell if the server is running or not except to view its status in the “Servers View”. To open servers view, go to Window > Show View > Servers.
For the external tomcat you can open the browser and type in http://localhost:8080
this will show the tomcat home page.I still have the problem of not being able to set the port number of the embedded service.
When I start the WebServiceProject as MyEclipse Server Application it tries to access myhost:8080 rather than myhost:8880, which I changed in the
WebRoot->WEB-INF->wsdl->CalculatorService.wsdl->CalculatorPortIt still accesses localhost:8080 to find the wsdl file and I think changing it in the wsdl file isn’t the place where to change it.
I gotta tell MyEclipse, on which port to connect to its embedded servers’ root.
—
Christoph
chriskukuMember@chriskuku wrote:
@support-shalini wrote:
Christoph,
The web service project should be running when you test your client. Please make sure that the server is running and the application is deployed to it.For the embedded tomcat, there is no way to tell if the server is running or not except to view its status in the “Servers View”. To open servers view, go to Window > Show View > Servers.
For the external tomcat you can open the browser and type in http://localhost:8080
this will show the tomcat home page.I still have the problem of not being able to set the port number of the embedded service.
When I start the WebServiceProject as MyEclipse Server Application it tries to access myhost:8080 rather than myhost:8880, which I changed in the
WebRoot->WEB-INF->wsdl->CalculatorService.wsdl->CalculatorPortIt still accesses localhost:8080 to find the wsdl file and I think changing it in the wsdl file isn’t the place where to change it.
I gotta tell MyEclipse, on which port to connect to its embedded servers’ root.
—
ChristophSolved!!
In the Toolbar Run/Stop/Start MyEclipse Servers there is a Configure ->Integrated Sandbox ->Tomcat allows to set the port number (and also in MyEclipse Tomcat->Configure Server Connector).
That’s what I was seeking.
Thanks.
support-shaliniMemberChristoph
Solved!!
Good to know that you are all set.
Do let us know if you have any issues. -
AuthorPosts