XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
if (schemaType instanceof XmlSchemaComplexType) {
XmlSchemaComplexType complexType = ((XmlSchemaComplexType) schemaType);
handleComplexTypeInResponse(complexType, outElement, response, fac,
engine.isJson(), false);
body.addChild(outElement);
} else if (xmlSchemaElement.getSchemaTypeName() == Constants.XSD_ANYTYPE) {
if (!JavaScriptEngine.isNull(response)) {
// If its anyType that means we have to add xsi:type
OMElement element = buildResponse(false, engine.isJson(), response,
xmlSchemaElement);