Hi,

I'm using Developer Studio version 3.7.1 on MacOS. When I try to use the
Script Mediator within an API Resource's in-sequence, it doesn't allow me
to save the API and gives an error. The following is the error message

*"Save failed. Following error(s) have been detected. Please see the error
log for more details.*

*Reason:*
*Exception initializing inline script"*

And following is the content of the javascript

*<![CDATA[*
*        var doctorId =
mc.getPayloadJSON().createChannelRecord.doctorId.toString();*
*        var patientName =
mc.getPayloadJSON().createChannelRecord.patientName.toString();*
*        var date =
mc.getPayloadJSON().createChannelRecord.date.toString();*
*        var time =
mc.getPayloadJSON().createChannelRecord.time.toString();*
*        mc.setPayloadXML(*
*            <ser:createChannelRecord
xmlns:ser="http://com.example.service/ <http://com.example.service/>">*
*               <doctorId>{doctorId}</doctorId>*
*               <patientName>{patientName}</patientName>*
*               <date>{date}</date>*
*               <time>{time}</time>*
*            </ser:createChannelRecord>*
*      );*
*]]>*

Any ideas about this error? Where can I find additional logs? The same
script works fine if I create an API using the management console of the
ESB.

Thanks,
NuwanD.

-- 
Nuwan Dias

Technical Lead - WSO2, Inc. http://wso2.com
email : [email protected]
Phone : +94 777 775 729
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to