- Revenera Community
- :
- FlexNet Operations
- :
- FlexNet Operations Knowledge Base
- :
- Error: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expect...
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Error: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize
Error: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize
Symptoms:
Some time the Web service response will give the following error, what is the cause of this error and how to fix it?.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">sc-fnouatapp-01</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Diagnosis:
The exception seems pretty straightforward. There is an element in the XML that the axis does not expect then the XML request is malformed. Either we have the wrong elements in the wrong places, or you have a namespace issue or extract char or number while WSDL parsed and used by other applications.
Solution:
Correct the wrong formate or extra character and number in the request XML or wrong tag etc.. for an example.
<ns1:searchEntitlementRequest1>
..
</ns1:searchEntitlementRequest1>
From:
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:v2.webservices.operations.flexnet.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:searchEntitlementRequest1>
<ns1:entitlementSearchCriteria>
<ns1:entitlementId>
<ns1:value>Ent_ID-TEST</ns1:value>
<ns1:searchType>EQUALS</ns1:searchType>
</ns1:entitlementId>
<ns1:productType>LICENSED_PRODUCT</ns1:productType>
</ns1:entitlementSearchCriteria>
<ns1:batchSize>100</ns1:batchSize>
<ns1:pageNumber>1</ns1:pageNumber>
</ns1:searchEntitlementRequest1>
</ns0:Body>
</SOAP-ENV:Envelope>
To fix the issue remove the number 1 in both the places:
<<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:v2.webservices.operations.flexnet.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:searchEntitlementRequest>
<ns1:entitlementSearchCriteria>
<ns1:entitlementId>
<ns1:value>Ent_ID-TEST</ns1:value>
<ns1:searchType>EQUALS</ns1:searchType>
</ns1:entitlementId>
<ns1:productType>LICENSED_PRODUCT</ns1:productType>
</ns1:entitlementSearchCriteria>
<ns1:batchSize>100</ns1:batchSize>
<ns1:pageNumber>1</ns1:pageNumber>
</ns1:searchEntitlementRequest>
</ns0:Body>
</SOAP-ENV:Envelope>
Note: If the issue is still there then please open a support case.