Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
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
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.
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