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

API Call to Publishformxml fails

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. 

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)

Tags (1)
Reply
3 Replies
Workflow Hero

Re: API Call to Publishformxml fails

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

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: API Call to Publishformxml fails

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

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: API Call to Publishformxml fails

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

Best regards,

Niclas

0 Kudos
Accept as Solution Reply