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

C# SDK XML BaseType Mapping

SOLVED
Highlighted

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: C# SDK XML BaseType Mapping

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
Highlighted

Re: C# SDK XML BaseType Mapping

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

Highlighted

Re: C# SDK XML BaseType Mapping

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

Highlighted

Re: C# SDK XML BaseType Mapping

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

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!