• Entries (RSS)
  • Comments (RSS)

Dynamically assign web service endpoint urls

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 04-03-2009

Tagged Under : , , , ,

Dynamically assign web service endpoint urls

How do we assign an end point URL dynamically to a web service in WebSphere Process Server? Or how do we change the endpoint URL of the web service. If any our business process invokes an external web service, we may need to change the web service URLs for different environments. For e.g.: for DEV WPS server we will have one web service end point URL where for PROD there will be a different one. So in this case we should be able to set the endpoint urls dynamically depending on the environment so that we do not need to change our EAR file for each environment.

To assign a dynamic end point url for an external web service we have two different ways. One needs some administrative effort and one needs some programmatic effect.

To change the endpoint url from the admin console follow the below steps.

1. Login to your admin console

2. Click on Applications -> SCA Modules from the left hand Menu

sca_module

3. This will list all the SCA Modules installed in your server.

sca_module_display

4. Now click on your module.

sca_module_details

5. Now from Module components click on Imports. It will display all the imports present in your module. Expand the import for which you want to change the end point url. Once expanded, expand Binding which will display your service.

sca_module_component

6. Now click on the web service import.

webservice_import_binding

7. Enter the new endpoint url and click on Apply and OK.

I will blog about the second way of assigning a dynamic end point url for a webservice import in the next post.

Business spaces in WebSphere Process Server

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 08-01-2009

Tagged Under : , , , ,

Business spaces in WebSphere Process Server.

Starting from version 6.1.2 IBM introduced a new feature in WebSphere Process Server called business spaces. A business space is a collection of content related to a business process which has the capability to act on that process. Basically it is a web based user interface for a business user to interact with a process. In business space we can have many different business space widgets for different actions like work on a task, monitor key performance indicators etc. This feature is very helpful when we have some human tasks associated with a process. Instead of writing custom client pages, business users can login to business space and start working on the task assigned to him

The business space manager can be opened using the url http://localhost:9080/BusinessSpace

Business space manager that comes with business spaces is used for managing your business space. Business space manager allows a user to create/edit/delete business space, page etc. You can open Business Space Manager by clicking on the Manage Business Spaces link which is present in the top right corner of your business space.

UNAUTHENTICATED is not granted any of the required roles: eventAdministrator eventCreator catalogAdministrator

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 09-11-2008

Tagged Under : , , , ,

Yesterday one of my readers ping me in Google talk and said that he is facing some issues in WebSphere Integration Developer. He was getting an exception while trying to call a WID web service from a web application. The exception was

com.ibm.websphere.csi.CSIAccessException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Bean)ejb/com/ibm/events/bus/EventBus createEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent):3 securityName: /UNAUTHENTICATED;accessID: UNAUTHENTICATED is not granted any of the required roles: eventAdministrator eventCreator catalogAdministrator
	at com.ibm.ws.monitoring.core.EventPointImpl$1.run(EventPointImpl.java:388)
	at java.security.AccessController.doPrivileged(AccessController.java:197)
	at com.ibm.ws.monitoring.core.EventPointImpl.fire(EventPointImpl.java:386)
	at com.ibm.bpe.monitor.EventEvaluationResult.fireEvent(EventEvaluationResult.java:148)
	at com.ibm.bpe.engine.observer.ProcessInstanceEventTypeHandler.processBPELEvent(ProcessInstanceEventTypeHandler.java:240)
	at com.ibm.bpe.engine.observer.CEMSOPContextRestored.processInstanceEvent(CEMSOPContextRestored.java:188)
	at com.ibm.bpe.engine.observer.BpelStateObserverContextImpl.restoreContextAndFireProcessInstanceEvent(BpelStateObserverContextImpl.java:1024)
	at com.ibm.bpe.engine.observer.CEMStateObserverPlugin.processInstanceEvent(CEMStateObserverPlugin.java:212)
	at com.ibm.bpe.engine.observer.BpelStateObserver.observe(BpelStateObserver.java:989)
	... 71 more
Caused by: com.ibm.ws.monitoring.core.CEIEmitRuntimeException: com.ibm.events.emitter.SendFailureException: CEIEM0025E The emitter failed to send the events to the event server. The local event bus enterprise bean on the event server failed during event processing.

This is because the user is not authenticated and hence he does not have any required roles to invoke the specified service. To resolve this exception either authenticates your user who is trying to call the web service or logon to admin console and make the following changes.

Click on Service Integration from Left hand side menu of admin console. Click on Common Event Infrastructure -> Event service -> Map security roles to users or groups and select the ‘Everyone’ checkbox for all the required roles. Save the changes and restart your server. You are done.

org.xml.sax.SAXException: WSWS3047E: Error: Cannot deserialize element

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 22-10-2008

Tagged Under : , , , , ,

Yesterday I came across a new exception while invoking my web service using WebSphere Process Server. I was trying to invoke an external web service from WID. The exception or web service fault message I was getting was

CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "transactionNotSupportedActivitySessionNotSupported" on bean "BeanId(CustomerProfileApp#CustomerProfileEJB.jar#Module, null)". Exception data: com.ibm.websphere.sca.ServiceRuntimeException: <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Fault><faultcode>soapenv:Server.generalException</faultcode><faultstring>org.xml.sax.SAXException: WSWS3047E: Error: Cannot deserialize element elementName of bean beanName. To see the message containing the parsing error in the log, either enable web service engine tracing or set MessageContext.setHighFidelity(true).</faultstring></soapenv:Fault></soapenv:Body>
	at com.ibm.wsspi.sca.webservice.jaxrpc.ServiceImportHandler.handleFault(ServiceImportHandler.java:313)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.HandlerProxy.handleFault(HandlerProxy.java:159)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandlerChain.oneHandleFault(JAXRPCHandlerChain.java:869)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandlerChain.handleFault(JAXRPCHandlerChain.java:846)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandlerChain.handleFault(JAXRPCHandlerChain.java:839)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invokeClientFaultHandler(JAXRPCHandler.java:535)
	at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$3.onFault(JAXRPCHandler.java:453)
	at com.ibm.ws.webservices.engine.PivotHandlerWrapper.onFault(PivotHandlerWrapper.java:516)
	at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:317)
	at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
	at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:929)
	at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:722)

This usually happens when you have an array of complex types. There is a technote available from IBM and they are providing three different solution. I just followed one of the solutions given by that technote. So to resolve this issue follow the below steps.

1. Open your WSDL file
2. Search for the elementName that cannot be serialized.
3. If you found an entry like

	<element name="elementName" nillable="true" type="someComplexType" />

4. Add ‘ xmlns=”"‘ to that element.

5. Now your element definition will look like

	<element name="elementName" nillable="true" type="someComplexType"  xmlns="" />

This will resolve the issue. At least it solved my problem. However the IBM recommended solution is to use the proper namespace.

Invoking an external web service from WebSphere Process Server.

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 16-09-2008

Tagged Under : , , , ,

Invoking or importing an external web service from WebSphere Integration Developer.

In a typical integration scenario, we will have different systems running on different software and different languages etc. Our module may often need to connect to these external services. Most of the time web service will be right choice for connecting to an external system.

If our module is connecting to an external web service or if you want your module to invoke an external webservice, we need to import the external web service in our business process module. To import an external web services in WebSphere Integration Developer follow the steps below.

1. The first step in importing a web service in WebSphere Integration Developer is to copy the WSDL files to our module.

2. Once you have copied the WSDL to your module, open the Assembly Diagram

3. Drag the WSDL to the Assembly Diagram.

4. A dialog box will be opened asking the type of component we need to create.

5. Select ‘Import with Web Service Binding’. Click on OK.

6. From the specify the web service port details dialog box select ‘Use an existing web service port’ option and click on Browse.

7. From the dialog box opened select the WSDL you have copied as the Web Service end point.

8. Now the dialog box would look like the one below.

9. Click on OK.

10. You are done. The web service is imported to your Assembly Diagram. Use the invoke component to call the web service.