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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

C# SDK XML BaseType Mapping

SD_9534978
2-Guest

C# SDK XML BaseType Mapping

Hello 

 

I am struggling   to find how to map a XML parameter  of a service to a C# type.

 

Currently I have that:

 

public static void PutWorkOrder(
[ThingworxServiceParameter(name = "WorkOrder", description = "XML document", baseType = "XML")]
XmlDocument WorksOrder)

 

But I am not sure that  XmlDocument is the right type for mapping . ( Always null when debugging)

Thanks a lot

ACCEPTED SOLUTION

Accepted Solutions

Hi

 

I found the problem. It was a typo in the parameters

 

public static void PutWorkOrder(
[ThingworxServiceParameter(name = "WorkOrder", description = "XML document", baseType = "XML")]
XmlDocument WorksOrder)

View solution in original post

3 REPLIES 3
slangley
23-Emerald II
(To:SD_9534978)

Hi @SD_9534978.

 

This looks like a small portion of the code.  Is there somewhere else in the code where you loading in the XML document?

 

Regards.

 

--Sharon

Hi

 

I found the problem. It was a typo in the parameters

 

public static void PutWorkOrder(
[ThingworxServiceParameter(name = "WorkOrder", description = "XML document", baseType = "XML")]
XmlDocument WorksOrder)

slangley
23-Emerald II
(To:SD_9534978)

Hi @SD_9534978.

 

Glad you figured it out!  Please mark your last response as the Accepted Solution for the benefit of others with the same issue.

 

Regards.

 

--Sharon

Announcements


Top Tags