Consuming wsdl from C3 directly


Can i consume webservices directly from the C3?

I have to invoke a webservice(SOAP) and transform the response of it to the platform periodically (say twice a day).

1.I can have a system (say in java) with a batch job to run twice a day and post the files to the S3 and this can be transformed to the platform. (one approach)

  1. Can C3 directly access the web service directly and transform it to the entity, without S3 dependency? (not sure if we can write a custom logic to map response xml object to an Entity).


You can send random HTTP requests and parse the response, e.g.

var httpRequest = {
  method : method,
  uri : baseUrl + action,
  headers : {
    "Content-Type" : "text/xml; charset=UTF-8",
    "Authorization" : authorization,
    "Connection": "Keep-Alive",
    "SOAPAction": "..."
 entity: "...."
var response = C3.http.Invoker.invoke(httpRequest);
var resultSetXML = new C3.util.XML(response.entity);