Skip to main content
4-Participant
March 29, 2024
Question

Custom call to from Thingworx to Windchill with SSO

  • March 29, 2024
  • 1 reply
  • 2136 views

Hello
I am trying to call Windchill custom url https://hostname/Windchill/servlet/custom/path
From Browser where SSO works it returns string value 🙂

However when I created Swagger connector with Configured SSO on Thingworx it returns

something like this 

RadekLisowski_0-1711713731302.png

ContentLoaderFunctions.GetText - works with basic Authentication but I need SSO

Any ides?

1 reply

Rocko
19-Tanzanite
April 2, 2024

What is the URL supposed to return, a String? It looks like it returns an object.

RadekIOT4-ParticipantAuthor
4-Participant
April 2, 2024

I want to run  https://hostname/Windchill/servlet/custom/getNumber?number=123456
with SSO
This URL returns in postman STRING text 

Code from bellow works but I need SSO. That's why I created Swagger connector

 

 

let headers = {
 "Accept": "text/plain",
 "Authorization": authorization
}
 
let params = {
 proxyScheme: undefined /* STRING {"defaultValue":"http"} */,
 headers: headers /* JSON */,
 ignoreSSLErrors: undefined /* BOOLEAN */,
 useNTLM: undefined /* BOOLEAN {"defaultValue":false} */,
 workstation: undefined /* STRING {"defaultValue":""} */,
 useProxy: undefined /* BOOLEAN {"defaultValue":false} */,
 withCookies: undefined /* BOOLEAN {"defaultValue":false} */,
 proxyHost: undefined /* STRING {"defaultValue":""} */,
 url: "https://hostname/Windchill/servlet/custom/getNumber?number=1234567" /* STRING */,
 timeout: undefined /* NUMBER {"defaultValue":60} */,
 appendHeader: undefined /* BOOLEAN {"defaultValue":true} */,
 proxyPort: undefined /* INTEGER {"defaultValue":8080} */,
 password: undefined /* STRING */,
 domain: undefined /* STRING {"defaultValue":""} */,
 username: undefined /* STRING */,
};
 
// result: STRING
let result = Resources["ContentLoaderFunctions"].GetText(params);

 

  

Rocko
19-Tanzanite
April 2, 2024

I don't think ContentLoaderFunctions supports SSO. You probably have to use Thingworx Integration Runtime.

https://www.ptc.com/en/support/article/CS381498