Showing posts with label Websphere. Show all posts
Showing posts with label Websphere. Show all posts

Tuesday, October 4, 2011

WebSphere & JAX-WS

What better for a novice like me to learn how to deploy Webservices on WebSphere than to try it using hello world.

Here's my code:

1. Web Service Endpoint Interface

/**
*
*/
package com.singtel.ma.rto;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
/**
* @author Main Masrudyn
*
*/
//Service Endpoint Interface
@WebService
public interface RTO {


@WebMethod String getHelloWorldAsString(String name);

}


2. Web Service Endpoint Implementation

package com.singtel.ma.rto;


import javax.jws.WebMethod;
import javax.jws.WebService;

//Service Implementation
@WebService(endpointInterface = "com.singtel.ma.rto.RTO")
public class RTOImpl implements RTO {

public String getHelloWorldAsString(String name) {
return "Hello World JAX-WS " + name;
}

}

3. Deploy on WebSphere, choose Detailed:


4. Ensure Deploy Webservice


5. Click on Service providers - ensure listener start




6. Check the webservice is running : http://rhel55-32.mydomain.com:9080/RTO/RTOImplService/RTOImplService.wsdl

Wednesday, November 25, 2009

Changing Heap Memory Size in Websphere

Here's how you change the heap memory size in Websphere:

1. Click on Application Server on the LHS:


2. Expand Java and Process Management


3. Click on Process Management


4. Enter the values in Initial Heap Size and Maximum Heap Size


5. Click Apply, save configuration and then restart the app server.

Change Heap Memory Size in Websphere without Admin Console

I've been playing around with Websphere6.1 of late so I thought I should document some of the tasks I've done.

One of problem with Websphere is that if you run out of heap memory, you can't start the appserver including the admin console. You will need to change it manually. Here's how it is done:

1. Go to the profile configuration dir for that node e.g. D:\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\matrixNode01Cell\nodes\matrixNode01\servers\server1

If you can't find it, do a search:



2. Edit the file server.xml and change the setting:



3. Restart the appserver via Windows Services (you can also use the command "startServer server1" in D:\IBM\WebSphere\AppServer\bin)