AEM Forms GeneratePDFService Deserialize Issue | Community
Skip to main content
New Participant
October 22, 2019
Question

AEM Forms GeneratePDFService Deserialize Issue

  • October 22, 2019
  • 6 replies
  • 9146 views

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 http://adobe.com/idp/services:HtmlToPDF2Response. The InnerException message was 'Error in line 1 position 364. Element 'http://adobe.com/idp/services:Result' contains data from a type that maps to the name 'http://adobe.com/idp/services:Serializable'. 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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

pagan_devAuthor
New Participant
October 23, 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 service API

Employee
October 23, 2019

Try using REST call?

pagan_devAuthor
New Participant
October 23, 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.

Employee
October 23, 2019

Does the pdfg work from the admin UI?

what is The operating system and version of AEM forms?

pagan_devAuthor
New Participant
October 23, 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.

Employee
October 23, 2019

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.