AEM Forms GeneratePDFService Deserialize Issue

pagan_dev 22-10-2019

AEM Forms Server 6_5_0

I'm calling http://localhost:8080/soap/services/GeneratePDFService?wsdl&lc_version=9.0.1  from a .NET component written in CSharp. I've created a service reference to this URL in the class library when I attempt to call HtmlToPdf2( ) I receive the following error:

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter The InnerException message was 'Error in line 1 position 364. Element '' contains data from a type that maps to the name ''. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'Serializable' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.'.

Any guidance on what I'm doing wrong? This same code is working on a LiveCycle ES4 v11 instance we have with no problem.

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (6)

Answers (6)

pagan_dev 23-10-2019

These are soap service endpoints, I'm not sure what you mean? Is there a code example you can point me to? The nuts and bolts my code is nearly the same as this example I'm just calling a different endpoint.

Adobe LiveCycle * Quick Start (MTOM): Converting an HTML document to a PDF document using the web se...

pagan_dev 23-10-2019

Windows Server 2016

AEM Version 6.5.0

Logged in adminui. Navigated to Services > PDF Generator > HTML to PDF

Specified the same URL being passed to the service.

Clicked Create.

PDF Successfully generated.

Seems to be specific to the .NET framework trying to deserialize a type it doesn't have a definition for. Using 4.0 .NET Framework.

pagan_dev 23-10-2019

Logged into the web console Deserialization Firewall Configuration was not listed.

The only item found was "com.adobe.cq.deserfw.impl.DeserializationFirewallImpl". Edited that item, added sun.util.calendar to the whitelist & Saved.

Retested still receiving the same error.



Configure the serialization agent

AEM Forms requires the sun.util.calendar package to be whitelisted. Perform the following steps to add the package to the whitelist:

  • Search and open Deserialization Firewall Configuration.

  • In the whitelist field, add the sun.util.calendar package and click Save.