It should just work with local transport. Carbon folks should be able to
help, if it's not working.

Also, instantiating the Service class directly?? Why would you do that when
you have the stub? Using the local transport it will be an in VM call
anyway.

On Wed, Jun 6, 2012 at 10:53 AM, Nuwan Bandara <[email protected]> wrote:

> Hi
>
> On Wed, Jun 6, 2012 at 10:42 AM, Sinthuja Ragendran <[email protected]>wrote:
>
>> Hi,
>>
>> On Wed, Jun 6, 2012 at 10:28 AM, Rajika Kumarasiri <[email protected]>wrote:
>>
>>> Yeah this is what I meant, you can instantiate an object of the relevant
>>> admin services and use them.
>>>
>>> Rajika
>>>
>>>
>>> On Wed, Jun 6, 2012 at 10:26 AM, Nuwan Bandara <[email protected]> wrote:
>>>
>>>> Why do you need to create service stubs if you are in the backend
>>>> anyway. If I understand your scenario correctly, you can simply do a Java
>>>> call, importing dashboard packages
>>>>
>>>> In my scenario there is possibility that the dashboard admin service is
>> not available in the same JVM, and that is why I thought of using the stub.
>>
>> Basically I'm writing a bam artifact deployer, which consists of some
>> gadget artifacts and I wanted to call the dashboard services to deploy
>> those artifacts, if the dashboard admin service is available. In BAM there
>> is a use case where we can separate the presentation layer, and in that
>> case the dashboard won't be under same JVM. In that case, I should avoid
>> deploying gadget artifacts and deploy other bam related artifacts,
>>
>
> DashboardService is not a UI module, if you do FE/BE separation
> DashboardService will be in the backend.
>
>
>>
>> In this situation, I guess the stub would work more better. And If i
>> directly instantiate and use the object I will get ClassNotFoundException.
>>
>> So what would be the better way?
>>
>>
>> Thanks,
>> Sinthuja.
>>
>>>  Regards,
>>>> /Nuwan
>>>>
>>>>
>>>> On Wed, Jun 6, 2012 at 10:21 AM, Sinthuja Ragendran 
>>>> <[email protected]>wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> On Wed, Jun 6, 2012 at 10:09 AM, Rajika Kumarasiri <[email protected]>wrote:
>>>>>
>>>>>> What prevent you calling the admin service directly ?
>>>>>>
>>>>>>
>>>>> Since I'm using the stub in by BE component to call the admin service,
>>>>> I thought of using local transport as it's more faster.
>>>>>
>>>>> And also If I use http/https,  i need credentials to authenticate and
>>>>> get the session.
>>>>>
>>>>> Alternatively, there is no declarative service available for the
>>>>> Dashboard Service.
>>>>>
>>>>> Due to all these, I thought local transport would be better way to
>>>>> call the stub in my case.
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Sinthuja.
>>>>>
>>>>>> Rajika
>>>>>>
>>>>>> On Wed, Jun 6, 2012 at 8:22 AM, Sinthuja Ragendran <[email protected]
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> In my BE component, I need to call some admin services to through
>>>>>>> stub and I want to use local transport for that.
>>>>>>>
>>>>>>> For that, I changed the service url to
>>>>>>> "local://services/DashboardService" in order to communicate with admin
>>>>>>> service 'DashboardService', and passed the configuration context which 
>>>>>>> is
>>>>>>> obtained from ConfigurationContextService - OSGI declarative service.
>>>>>>>
>>>>>>> But I'm getting the following exception when I try to invoke a
>>>>>>> method from the stub.
>>>>>>>
>>>>>>> java.lang.NullPointerException
>>>>>>>     at
>>>>>>> org.apache.axis2.engine.DispatchPhase.fillContextsFromSessionContext(DispatchPhase.java:318)
>>>>>>>     at
>>>>>>> org.apache.axis2.engine.DispatchPhase.loadContexts(DispatchPhase.java:185)
>>>>>>>     at
>>>>>>> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:113)
>>>>>>>     at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
>>>>>>>     at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
>>>>>>>     at
>>>>>>> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
>>>>>>>     at
>>>>>>> org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:166)
>>>>>>>     at
>>>>>>> org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:79)
>>>>>>>     at
>>>>>>> org.apache.axis2.transport.local.LocalTransportSender.finalizeSendWithToAddress(LocalTransportSender.java:102)
>>>>>>>     at
>>>>>>> org.apache.axis2.transport.local.LocalTransportSender.invoke(LocalTransportSender.java:77)
>>>>>>>     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
>>>>>>>     at
>>>>>>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
>>>>>>>     at
>>>>>>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>>>>>>>     at
>>>>>>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>>>>>>>     at
>>>>>>> org.wso2.carbon.dashboard.stub.DashboardServiceStub.addNewTab(DashboardServiceStub.java:5089)
>>>>>>>     at
>>>>>>> org.wso2.carbon.bam.toolbox.deployer.client.DashboardClient.addTab(DashboardClient.java:74)
>>>>>>>     at
>>>>>>> org.wso2.carbon.bam.toolbox.deployer.deploy.BAMArtifactDeployerManager.deployGadget(BAMArtifactDeployerManager.java:95)
>>>>>>>     at
>>>>>>> org.wso2.carbon.bam.toolbox.deployer.deploy.BAMArtifactDeployerManager.deploy(BAMArtifactDeployerManager.java:124)
>>>>>>>     at
>>>>>>> org.wso2.carbon.bam.toolbox.deployer.core.BAMToolBoxDeployer.deploy(BAMToolBoxDeployer.java:92)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:810)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
>>>>>>>     at
>>>>>>> org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
>>>>>>>     at
>>>>>>> org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:76)
>>>>>>>     at
>>>>>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>>>>>>>     at
>>>>>>> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>>>>>>>     at
>>>>>>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>>>>>>>     at
>>>>>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>>>>>>>     at
>>>>>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
>>>>>>>     at
>>>>>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
>>>>>>>     at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>>>>>     at
>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>>>>>     at java.lang.Thread.run(Thread.java:662)
>>>>>>>
>>>>>>> I debug and checked in the axis2, and seems the error NPE is because
>>>>>>> of  transportIn is being null in the messageContext and the line which
>>>>>>> throws the exception is,
>>>>>>>
>>>>>>> TransportListener listener =
>>>>>>> msgContext.getTransportIn().getReceiver();
>>>>>>>
>>>>>>>
>>>>>>> How this should be done? Is there any additional configuration that
>>>>>>> I need to add for this?
>>>>>>>
>>>>>>> Any help is appreciated.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Sinthuja.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Dev mailing list
>>>>>>> [email protected]
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Thanks & Regards,
>>>>
>>>> Nuwan Bandara
>>>> Associate Technical Lead & Member, MC, Development Technologies
>>>> WSO2 Inc. - lean . enterprise . middleware |  http://wso2.com
>>>> blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763
>>>> 9629
>>>> *
>>>> <http://www.nuwanbando.com/>
>>>>
>>>
>>>
>>
>
>
> --
> *Thanks & Regards,
>
> Nuwan Bandara
> Associate Technical Lead & Member, MC, Development Technologies
> WSO2 Inc. - lean . enterprise . middleware |  http://wso2.com
> blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763
> 9629
> *
> <http://www.nuwanbando.com/>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Regards,

Tharindu

blog: http://mackiemathew.com/
M: +94777759908
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to