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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Building Custom Integrations for ThingWorx Navigate - Course

vcavic
13-Aquamarine

Building Custom Integrations for ThingWorx Navigate - Course

Hallo, 
I'm following the course Building Custom Integrations for ThingWorx Navigate | Integration Tier - The Resource - Making Calls to Integration Hub Services. And always get errors 

"Error executing service GetPartByNumber. Message :: Wrapped java.lang.NullPointerException - See Script Error Log for more details."
 

var filter = '{"filters":{"fieldName":"Number","type":"EQ","value":"' + Number + '"}}';

var params = { /* INFOTABLE */
resources: 'WindchillDemoPartResourceProvider' /* INFOTABLE */,
serviceName: 'Get' /* STRING */,
params:{
dataShape: {
fieldDefinitions: {
dataShapeName: {
name: "dataShapeName",
baseType: "STRING"
},
query: {
name: "query",
baseType: "QUERY"
},
extraParams: {
name: "extraParams",
baseType: "JSON"
},
dataShape: {
name: "dataShape",
baseType: "INFOTABLE"
}
}
},
rows: [{
dataShapeName: DataShape,
query: filter,
extraParams: undefined,
dataShape: undefined
}]
}
};

// result: INFOTABLE dataShape: ""
var result = Things["PTC.Resource.ResourceManager"].CallServiceOnProvider(params);

 

Any Suggestion ?

 
 
3 REPLIES 3
barko
16-Pearl
(To:vcavic)

Please attach the Script Error log, and I will see if I can identify the issue.

vcavic
13-Aquamarine
(To:barko)

@barko 

2021-04-06 06:11:17.688+0000 [L: ERROR] [O: S.c.q.l.c.Logger] [I: DemoUtilityThing] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-3] Error in: DemoUtilityThing.GetPartByNumber javascript service
at GetPartByNumber:37

barko
16-Pearl
(To:vcavic)

That didn't help. I think you will need to attach the complete log file.

Top Tags