KB-1490 Unable to create envelope error when invoking a process model as a web service (WSDL)
Symptoms
When publishing a process model as a web service, the model fails to start and the following error is seen in the application server log:
YYYY-MM-DD HH:MM:SS,mmm [ajp-/X.X.X.X:XXXX-XX] ERROR com.appiancorp.process.webservices.pmserver.PMServletDelegate -
An unknown error occurred while consuming the PM WS for the service:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:127)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:83)
at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:143)
at com.sun.xml.messaging.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1366)
at com.appiancorp.process.webservices.pmserver.PMServletDelegate.doPost(PMServletDelegate.java:107)
at com.appiancorp.process.webservices.pmserver.PMServletDelegate.handleRequest(PMServletDelegate.java:70)
at com.appiancorp.process.webservices.pmserver.PMServlet.doGet(PMServlet.java:13)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
at com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransformer.transform
(EfficientStreamingTransformer.java:414)
at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:118)
... 89 more
Caused by: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:555)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
... 91 more
Cause
The following are possible causes:
- The error message indicates that this is not an issue with the process model published as a web service; it is an issue with a malformed SOAP Envelope that the invoker/client is sending to the model in order to invoke it as a Web Service. This is failing in the
getEnvelope()method, which suggests the request sent is malformed. An XML Validator can confirm if it is a valid SOAP envelope. - The error message occurs due to the service sending a large amount of data. The web server truncates this amount of data for security reasons, which results in an invalid XML.
Action
To resolve the behavior, consider the following:
- If there is an issue with a malformed SOAP Envelope, use an XML Validator to confirm the client is sending a valid SOAP envelope.
- If the web server is truncating the request due to a large amount of data being sent, try sending a smaller request from the service.
- To troubleshoot this further and analyze the SOAP envelope that Appian is receiving, add the following logger to
<APPIAN_HOME>/ear/suite.ear/resources/appian_log4j.properties:
log4j.logger.com.appiancorp.process.webservices=DEBUG
Affected Versions
This article applies to all versions of Appian.
Last Reviewed: February 2018
