Hi,
in trying to do $subject, i am using the script mediator as folows
* <script language="js">*
*var fullContent = mc.getPayloadXML(); *
*var entity = mc.getPayloadXML()..*::entity;*
*if (entity==null){*
* fullContent.removeChild(entity);*
* } *
*mc.setPayloadXML(fullContent);*
*</script>*
but my output always contains the empty tag <entity>
sample xml output received
Envelope:
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="
http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ejb:getAdvancedDocumentReferenceList xmlns:ejb="http://ejb.image.pfpc.com"
xmlns:vo="http://vo.image.pfpc.com">
<ejb:provider>myProvidor</ejb:provider>
<ejb:advancedImageSearchVO>
<vo:departmentID>myID</vo:departmentID>
<vo:entity></vo:entity> <--------- empty xml tag with no content
</ejb:advancedImageSearchVO>
</ejb:getAdvancedDocumentReferenceList>
</soapenv:Body>
</soapenv:Envelope>
where as the expected output shoud be
Envelope:
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="
http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ejb:getAdvancedDocumentReferenceList xmlns:ejb="http://ejb.image.pfpc.com"
xmlns:vo="http://vo.image.pfpc.com">
<ejb:provider>myProvidor</ejb:provider>
<ejb:advancedImageSearchVO>
<vo:departmentID>myID</vo:departmentID>
</ejb:advancedImageSearchVO>
</ejb:getAdvancedDocumentReferenceList>
</soapenv:Body>
</soapenv:Envelope>
can someone point out what I am doing wrong?
--
Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev