Tuesday, December 10, 2013

UES-Dashboard with WebSockets enable Gadgets

With the use of Websockets capability of Jaggery, you can create Websockets enabled gadgets within UES.

1. Create new directory for our gadget, name it dummy-chat.
2. Create your gadget XML file with the following content,
    <?xml version="1.0" encoding="UTF-8" ?>
    <Module>
        <ModulePrefs title="WS Dummy chat application"
                    height="350"
                    description="This is a dummy sample gadget to showcase Web socket capability"
                    tags="chat">
           <Require feature="dynamic-height"/>
        </ModulePrefs>
        <Content type="html">
           <![CDATA[
           <script src="/portal/gadgets/dummy-chat/js/dummy-chat.js" type="text/javascript"></script>
           <div id="gadget-wrapper">
                   <div id="msg-content"></div>
                   <div id="gadget-area-div">
                   <textarea rows="4" cols="50" id="msg"></textarea><br/>
                   <button type="button" onclick="send()">Send Me!</button>
                   </div>
           </div>
           ]]>
        </Content>
    </Module>

Name this XML file dummy-chat.xml and save the content inside our gadget directory.

3. Create directory to store JavaScript files of our gadget, name it js.
4. Create dummy-chat.js file with following content inside js directory.
    var url,ws;
    window.onload = function WindowLoad(event) {
       url = 'wss://localhost:9443/ws-chat/server.jag';
       ws = new WebSocket(url);
       //event handler for the message event in the case of text frames
       ws.onopen = function() {
       console.log("web Socket onopen. ");
       };

       ws.onmessage = function(event) {
       console.log("web Socket Onmessage from Server. " + event.data);
       var reply = document.getElementById('msg-content');
       reply.innerHTML = reply.innerHTML + '<br/>' + event.data;
       };

       ws.onclose = function() {
       console.log("web Socket onclose. ");

       };
    }

    //send msg to the server
    function send(){
       var msg = document.getElementById('msg');
       ws.send(msg.value);
       console.log("Client message "+msg.value);
       msg.value = '';
    }

5. If you wish to have eye-catching thumbnail and banner for your gadget, you can store them inside dummy-chat directory.Find our directory structure here,

.
├── banner.jpg
├── dummy-chat.xml
├── js
│   └── dummy-chat.js
└── thumbnail.jpg

We are done with the Websocket client implementation. Client application here provides a text field and button to send messages, and provides a place where messages from the server printed.

Lets move to the server implementation, This dummy server acknowledges all messages and will print the same message with some dummy text.

I’m using the same server implementation from jaggey Websocket doc[1] with a small modification.

1. Create a new jaggery app and name it ws-chat.

2. Create server.jag with following content inside ws-chat directory.
    <%
    var log = new Log();
    webSocket.ontext = function (data) {
        log.info('Client Sent : ' + data);
        var ws = this;
        setTimeout(function () {
           var currentDate = new Date();
           ws.send("message received !!");
           ws.send(currentDate+" : "+data);
        }, 1000);
    };
    
    webSocket.onbinary = function (stream) {
        log.info('Client Streamed : ' + stream.toString());

    };
    %>
Server will send “message received !!”  and the received message with timestamp to the client.

Lets move to the deployment of this gadget client and the server,

1. Copy ws-chat jaggery application and host it inside <UES_HOME>/repository/deployment/server/jaggeryapps/
2. Move dummy-chat gadget to <UES_HOME>/repository/deployment/server/jaggeryapps/portal/gadgets/
3. Start UES instance by running ./wso2server.sh from <UES_HOME>/bin directory.

You can verify availability of the new gadget by browsing, http://localhost:9763/store/assets/gadget/
Lets bookmark this gadget and create our dashboard from dummy-chat gadget.Sign-in to the portal from http://localhost:9763/portal and follow creating a dashboard guide from here[2].
Browse https://localhost:9443/<DASHBOARD_NAME>/ while logged into the UES and you can use dummy-chat gadget within the dashboard.

[1] http://jaggeryjs.org/apidocs/websocket.jag
[2] http://docs.wso2.org/display/UES100/Creating+a+Dashboard

Wednesday, December 4, 2013

Overcome "class path is too long" error while executing WSO2 ciper tool in windows

The cipher tool is there to encrypt and decrypt simple texts and by default bundled with all WSO2 products. You can simply use this tool by running either the shell script or batch script inside <PRODUCT_HOME>/bin directory according to your environment.

I'm not going to explain in detail about this tool, but you can find out more information from here[1].

In this blog post I'm going to explain a workaround to get rid of the error "The class path is too long for the windows shell to handle it" when you try to run ciphertools.bat -Dconfigure" command within windows environment.

Before continue further just take a back-up of the <PRODUCT_HOME>/bin/cipertools.bat file.

What you have to do is update line no 73 to 77 with,
call ant -buildfile "%CARBON_HOME%\bin\build.xml" -q
set CARBON_CLASSPATH=.\conf
FOR %%c in ("%CARBON_HOME%\lib\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\lib\%%~nc%%~xc"
FOR %%C in ("%CARBON_HOME%\repository\lib\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\repository\lib\%%~nC%%~xC"
This snippet will only add dependent jar files to the class_path and you can get rid of the above mentioned issue.


[1] http://docs.wso2.org/display/Carbon420/Encrypting+and+Decrypting+Simple+Texts

Tuesday, December 3, 2013

Access WSO2 Carbon admin Webservice using SoapUI

For the purpose of writing this blog post I'm going to use WSO2 GREG, SoapUI 4.5.1 on a linux environment.

In my previous blog post I explained how to explore a WSO2 Carbon admin Webservice, here I'm going to access an admin web service by providing authentication details.

I assume you are in the 3rd step of my previous example and able to list all admin services using OSGI console command listAdminServices.

If you able to access https://localhost:9443/services/UserAdmin?wsdl you are good to move further in this post.

1. Open new SoapUI project, lets name it UserAdmin provide above URL as the initial WSDL and press ok.


You will see all available SOAP requests under "UserAdmin" webservice.

2. Lets run getAllRolesNames, expand it and click on the Request1 link.


You will get the SOAP request generated by SoapUI with the use of provided WSDL.

3. Click on the Aut button under the request tab select authorization type as preemptive.

4. Provide admin username and password of your carbon instance.

5. Send SOAP request.

If you have done everything right you will get the list of available roles in your carbon server.



Further I will explain how to use the already generated Set-Cookie: JSESSIONID to authenticate next requests rather than providing username & password again.

Lets view raw response in our previous step, by pressing raw tab inside response window.You will see HTTP header details,
HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=D9A45BE1CCD7616F88FDF4E0FF85C213; Path=/; Secure; HttpOnly
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 03 Dec 2013 10:40:15 GMT
Server: WSO2 Carbon Server
I'm going to send a getRolesOfUser SOAP request with the use of available Cookie: JSESSIONID=D9A45BE1CCD7616F88FDF4E0FF85C213.

Click Headers tab under the request window and enter "Header" name as Cookie and "Value" as JSESSIONID=D9A45BE1CCD7616F88FDF4E0FF85C213.
Refer following screen-shot,


Here I'm trying to list down all available roles for the given user, in my case it's me "udara" ;) .

You will see some similar response,



WSO2 ESB Web-service based remote registry mount

Since WSO2 products are based on Carbon stack, you don't have to store your collections and resources within the same server itself.You can store those across multiple locations.

In this blog post I'm using WSO2 GREG and WSO2 ESB to explain this topic further.

There are multiple methods to mount remote registry in-to the ESB,

1. JDBC based remote configuration
2. Atom based remote configuration
3. Webservice based remote configuration

1st method is the WSO2 recommended approach in production environments as other two methods are not supporting transactions.But there might be scenarios where you can't directly connect to your registry database due to security restrictions.

I'm going to explain the 3rd method further in this blog post.
Before moving forward, lets download and setup Greg and ESB products in my local machine.

1. Start WSO2 Greg by running ./wso2server.sh within <Greg_HOME>/bin directory.

by default all WSO2 products bind to following ports,
HTTPS port  : 9443
HTTP port    : 9763

Since I'm running both products on the same machine for the purpose of writing this blog post I have to start WSO2-ESB with a port offset.

2. Open <ESB_HOME>/repository/conf/carbon.xml and change the offset a,
<Offset>1</Offset>
Lets configure our remote registry instance now, using Webservice configuration.

3. Open <ESB_HOME>/repository/conf/registry.xml and add the following configuration.
<remoteInstance url="https://10.100.0.128:9443/registry">
   <id>instanceid</id>
   <username>admin</username>
   <password>admin</password>
   <type>ws</type>
</remoteInstance>

<mount path="/_system/governance" overwrite="true">
   <instanceId>instanceid</instanceId>
   <targetPath>/_system/governance</targetPath>
</mount>
<mount path="/_system/config" overwrite="true">
   <instanceId>instanceid</instanceId>
   <targetPath>/_system/config</targetPath>
</mount>
Use correct "remoteInstance url" (only have to update the IP address) according to your environment. "instanceid" is the remote registry instance ID(no need to update this value)."username and password" values are to login to the remote registry instance.

In my sample I'm using two mount configurations. "mount path" describes the path where you want to mount. Overwrite variable describes whether you overwrite existing resource or not.It can be any value from true, false, virtual or simply nothing as this parameter is optional. Keep the "instanceId" value as same as in the "id" of remoteInstance configuration above."targetPath" is the path inside remote registry which we are going to mount.

Above configuration I'm going to overwrite both governance and config collections inside ESB from the remote registry collections.

 4. Start WSO2 ESB by running ./wso2server.sh within <ESB_HOME>/bin directory.

Verify the status of WS remote registry mount by,
  i)  Log in to the ESB server's carbon console
  ii) Browse the Registry. Now you should see the config and governance collections(WS remote mounted using my sample registry.xml) are updated with arrow icons.


NOTE-

I en-counted following error while working with WSO2 ESB 4.5.1 and WSO2 GREG 4.5.2, you better try the above sample with latest version of WSO2 Greg and WSO2 ESB.

[2013-12-03 11:42:05,929] ERROR - FIXTransportServiceComponent Error while activating FIX transport management bundle
java.lang.NullPointerException
    at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.getTransportElement(TransportPersistenceManager.java:127)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.saveTransportConfiguration(TransportPersistenceManager.java:285)
    at org.wso2.carbon.transport.fix.internal.FIXTransportServiceComponent.activate(FIXTransportServiceComponent.java:65)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
    at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:513)
    at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
    at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
[2013-12-03 11:42:05,944] ERROR - JMSTransportServiceComponent Error while activating JMS transport management bundle
java.lang.NullPointerException
    at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.getTransportElement(TransportPersistenceManager.java:127)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.saveTransportConfiguration(TransportPersistenceManager.java:285)
    at org.wso2.carbon.transport.jms.internal.JMSTransportServiceComponent.activate(JMSTransportServiceComponent.java:69)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
    at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:513)
    at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
    at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
[2013-12-03 11:42:05,952] ERROR - MailTransportServiceComponent Error while activating the mail transport management bundle
java.lang.NullPointerException
    at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.getTransportElement(TransportPersistenceManager.java:127)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.saveTransportConfiguration(TransportPersistenceManager.java:285)
    at org.wso2.carbon.transport.mail.internal.MailTransportServiceComponent.activate(MailTransportServiceComponent.java:65)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
    at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:513)
    at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
    at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
[2013-12-03 11:42:05,960] ERROR - VFSTransportServiceComponent Error while initializing VFS transport management bundle
java.lang.NullPointerException
    at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.getTransportElement(TransportPersistenceManager.java:127)
    at org.wso2.carbon.core.transports.TransportPersistenceManager.saveTransportConfiguration(TransportPersistenceManager.java:285)
    at org.wso2.carbon.transport.vfs.internal.VFSTransportServiceComponent.activate(VFSTransportServiceComponent.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
    at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:513)
    at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
    at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) 


You can find out official WSO2 documentation for this topic at [1].


[1] http://docs.wso2.org/display/ESB460/Remote+Registry+Instance+Configuration#RemoteRegistryInstanceConfiguration-WebService-BasedRemoteInstanceConfiguration