Skip to main content

Change the port?

12 replies [Last post]
snagpal
Offline
Joined: 2003-07-02

Hi,

how do I change the port the whole server is running on? For instance, 8080 to 7080, 8181 to 7181 and 4848 to 3848?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
steveor
Offline
Joined: 2006-03-02

Vijay

What I was saying - perhaps not clearly was that both the
wsdl and java file reference port 8085 (or any other that I
build on the app server) but the service still
deploys at 8080

eg in the wsdl file (you saw the impl file earlier)

If I deploy a second wsdl service at 8080 then the first service that I want at 8085 (but is actually being deployed by glassfish at 8080) is being bumped

regards
Steve

steveor
Offline
Joined: 2006-03-02

Still not managed to get two wsdl services running together

first service has soap:address set to 8085 in wsdl file and also in service impl

@WebMethod(operationName = "Notify", action = "http://localhost:8085/mtosi/v1/NotificationConsumer")

This deploys at 8080 not at 8085

when I deploy my second service (at 8080) then the first
service is removed

is this a bug? (b43)

regards
steve

vijaysr
Offline
Joined: 2003-06-11

I think I misunderstood your earlier posting. Let me know if I am wrong - are you trying to deploy 2 services of the same name at different HTTP ports ?

If so, this is not supported as of now. In fact there is a pending bug which says we should fail deployment if two services of the same name are being deployed.

If this is important please file an ENHANCEMENT request and we will weigh the pros and cons of doing this.

steveor
Offline
Joined: 2006-03-02

Hi Vijay

I have 2 services both with different names and functionality.

I would like to deploy both on the same glassfish instance,
1 at say 8080 and the other at 8085 (or someother port if
necessary)

I can't seem to do this from wsdl & injection although I
have not changed anything on the glassfish configuration gui

regards
Steve

vijaysr
Offline
Joined: 2003-06-11

well .... we get the http port configured for the domain and use that to publish the WSDL. There is no way for the user to specify on which HTTP port the WSDL should be published. Let me check with the web container folks if there is a way for this using the virtual servers ....

jkucera
Offline
Joined: 2003-08-07

You can do this using admin GUI. Simply access http://:4848. The follow the below steps

Changing the Administrative Server Port 4848
In the tree component, expand the Configuration node.
Expand the HTTP Service node.
Expand the HTTP Listeners node.
Select the admin-listener node.
On the Edit HTTP Listener page, change the value of the Listener Port field.
Click Save

Changing an HTTP Port 8080/8181
In the tree component, expand the HTTP Service node.
Expand the HTTP Listeners node.
Select the http-listener-1 whose port number you want to change.
On the Edit HTTP Listener page, change the value of the Listener Port field.

Repeat above steps for http-listener-2
Click Save
Restart Appserver

faduval
Offline
Joined: 2006-04-07

hi,

i would like to change the hostname of the server instance. how can i do that?

i modified the com.sun.ass.hostName system property but it didn't resolve my problem.

for example when i deployed a webservice the generated wsdl file contains a wrong value for hostname in soap address.

jothir
Offline
Joined: 2005-05-19

Changing the com.sun.aas.hostName may not work directly.

Try rebuilding the webservice app wherein your wsdl file must have token for hostname instead of static value(localhost) so that the value is picked dynamically from that property.

steveor
Offline
Joined: 2006-03-02

I am using wsdl2java via wsimport

I tried to achieve change of port by using the JAX-WS annotations and wsdl but this did not move the port from
8080 to 8085. If I deploy a second service at 8080 then the
first will get bumped

@WebService(
name="NotificationConsumerInterface",
endpointInterface="com.xx.server.NotificationConsumerInterface" ,
wsdlLocation="WEB-INF/wsdl/NotificationService.wsdl",
targetNamespace = "tmf854.v1.ws",
serviceName="NotificationService",
portName="NotificationConsumerInterface")

@ServiceMode(value=Service.Mode.PAYLOAD)
@PersistenceContext(name="jdbc/MTOSI",unitName="NotificationInterface")
public class NotificationConsumer implements NotificationConsumerInterface {
@Resource private UserTransaction utx;
private EntityManager em;
private Context initCtx;
private Context envCtx;

@WebMethod(operationName = "Notify", action = "http://localhost:8085/mtosi/v1/NotificationConsumer")
@Oneway

regards
Steve

vijaysr
Offline
Joined: 2003-06-11

During deployment, the WSDL gets published and at this publish time, the app server will patch the WSDL's soap:address with the host name and port on which the service is running. When you run wsimport against this published WSDL, the host and port in this published WSDL will be used.

Given this, why will you publish the service in one port but then make the client use some other port ?

vijaysr
Offline
Joined: 2003-06-11

Basically, WSDL gets published with the host and http port of the app server at the time of deployment. If after deployment, you stop the server, change the http port and restart the server, then the already published WSDL does not get changed to this new port. If this is the case, then the service has to be redeployed so that the WSDL is published at this new port.

mperezma
Offline
Joined: 2005-03-22

Hello,

You can edit setup.xml before ant it. You will want to change these properties:

mariO