API Call to Publishformxml fails

  • 21 September 2017
  • 3 replies
  • 9 views

Badge +1

Hi

I'm trying to get a form from a list and publish it using the Nintex Forms API (https://help.nintex.com/en-US/sdks/sdk2013/#FormSDK/Topics/SDK_NF_API_REF_PublishFormXml.htm ) 

It works fine getting the form XML using GetFormXML (https://help.nintex.com/en-US/sdks/sdk2013/#FormSDK/Topics/SDK_NF_API_REF_GetFormXml.htm) and saving it to a variable but the PublishFormXml call fails all the time with the error "Error performing web request". The XML from GetFormXML is saved in a variable that I use to send in to PublishFormXML. 

207940_pastedImage_8.png

The error message is: 

The server encountered an error processing the request. The exception message is 'The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:listId. The InnerException message was 'There was an error deserializing the object of type System.String. Encountered unexpected character '''.'. Please see InnerException for more details.'. See server logs for more details. The exception stack trace is:

at System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part)
at System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeParameters(XmlDictionaryReader reader, PartInfo[] parts, Object[] parameters, PartInfo returnInfo, Object& returnValue)
at System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeBodyCore(XmlDictionaryReader reader, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.DemultiplexingDispatchMessageFormatter.DeserializeRequest(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.UriTemplateDispatchFormatter.DeserializeRequest(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)


3 replies

Userlevel 6
Badge +16

If your variable is "Single line of text", it has a limit of 255 characters

Badge +3

Hi! Did you solve this? I get the same error today.

Badge +1

No I didn't. Instead I built an event receiver in SharePoint that handled it. Worked much better.

Best regards,

Niclas

Reply