I have implemented the following simple HTTP adapter in order to introduce myself to Worklight Adapters. It works correctly.
However, I can't see in the Eclipse Worklight console my WL.logger.debug
statements!
I've tried to configure logging.properties and server.xml as shown in this Information Center article, but it doesn't show the debug lines (request and result).
Any suggestions?
JS:
function currencyConvertor(data) {
var request =
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ConversionRate xmlns="http://www.webserviceX.NET/">
<FromCurrency>{data.fromCurrency}</FromCurrency>
<ToCurrency>{data.toCurrency}</ToCurrency>
</ConversionRate>
</soap:Body>
</soap:Envelope>;
WL.Logger.debug("request start ---------");
WL.Logger.debug(request);
WL.Logger.debug("request end --------");
var input = {
method : 'post',
returnedContentType : 'xml',
path : '/CurrencyConvertor.asmx',
body: {
content: request.toString(),
contentType: 'text/xml; charset=utf-8'
}
};
var result = WL.Server.invokeHttp(input);
WL.Logger.debug("result start ---------");
WL.Logger.debug(result);
WL.Logger.debug("result end --------");
return result.Envelope.Body;
}