cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

RemoteSessionBridge.createSession() - How do I obtain AssetReference

htrusiak
2-Explorer

RemoteSessionBridge.createSession() - How do I obtain AssetReference

Hello,

I am trying to Create a remote session with RemoteSessionBridge class.

However I am not sure how to obtain a AssetReference for the signature

public ExecutionResult createSession(AssetReference assetRef,

   String interfaceName,

   RemoteServerFunction interfaceFunction,

   String description,

   Boolean multiUser,

   Boolean useInternalHostname)

I am able to obtain a deviceId for the asset I am interested, and can obtain the Interfaces for the device.

However, I am unclear, what is the relationship between an  Asset, a device and an AssetReference - as I am sure there is a connection I am missing here?

Any help or insight most appreciated.

Thanks in advance

Henry

2 REPLIES 2
ckaminski
14-Alexandrite
(To:htrusiak)

Henry:

   You can use Bridges.assetBridge.findById('MODEL||SERIAL') to get the AssetReference.  Asset is basically a syntactic wrapper around AssetReference.  Device is an SDK v1 type.  It is not compatible with the v2 SDK.

nngo1
1-Visitor
(To:ckaminski)

Hello Kaminski,

Currently I try to implement a remote session feature for my custom web page. Using REST API.

I can create remote session by using below description

==========================================

DESCRIPTION : Create a RemoteSession

ENDPOINT : /services/v2/rest/remoteSession

METHOD : createSession

VERB : PUT

REQUEST OBJECT : RemoteSessionParameters

RESPONSE OBJECT : ExecutionResult

REQUEST :

<?xml version="1.0" encoding="UTF-8"?>

<RemoteSessionParameters xmlns="http://www.axeda.com/services/v2">

<asset systemId="121"/>

<interfaceName>ssh_session</interfaceName>

<interfaceFunction>APPLICATION</interfaceFunction>

<description>des</description>

<multiUser>true</multiUser>

<useInternalHostname>true</useInternalHostname>

</RemoteSessionParameters>

==========================================

It returns systemId number and I check the status is READY.

But I don't know what is the next step? How to use client software such as putty to connect to agent device using the RemoteSession?

Could you please help me for this issue?

Many thanks for your support!

--

Nhan

Announcements


Top Tags