org.xml.sax.SAXParseException;Premature end of file

Arun Chauhan
Giga Contributor

Hello,

I am trying to send a SOAP request through my application configured on JBoss server. Also, the proxy configuration is provided in the JBoss server configuration file. Below is my SOAP Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sys="http://www.service-now.com/sys_user">

    <soapenv:Body>

          <sys:getKeys>

                <user_name>metsu.ozil</user_name>

          </sys:getKeys>

    </soapenv:Body>

</soapenv:Envelope>

But I am getting below response in my applicaton:

javax.xml.soap.SOAPException: Unable to parse SOAP document

When I searched through the logs on ServiceNow, I am getting below exception:

WARNING ***WARNING*** org.xml.sax.SAXParseException;Premature end of file

SOAPException.png

Note: The same use case works from SOAP UI. There also I am using the same WSDL endpoint and added the proxy configuration.

Any Help please ?

Regards,

Arun

1 REPLY 1

vab_13
ServiceNow Employee
ServiceNow Employee

The Error response is from your Application in JBOSS.


Can you enable debugging for SOAP and check whats the SOAP request that's being sent?


You should be able to see this SOAP request at your application in JBOSS.



Enable SOAP Debug:



If you are on Istanbul/Jakarta version, we have a new module which captures SOAP/REST calls made from the system.


You might want to increase the debug level, test agian and check for the SOAP Request thats being sent.


I bet SOAP Request from ServiceNow is not what you tested with via SOAPUI.


https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/integrate/outbound-web-services...


Outbound web service logging properties