• radixweb@hotmail.com
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hello Everyone, I am facing one problem, I would like to Call WCF RESTFull Service on Account(after update). I would like to create one XML file based on Accound updation. I have written given below Trigger. trigger trgUpdate on Account(after update) { Http http = new Http(); HttpRequest reqL = new HttpRequest(); reqL.setTimeout(60000); reqL.setEndpoint('http://restful.live2.dev.radixweb.net/RestServiceImpl.svc'); reqL.setMethod('GET'); reqL.setHeader('SOAPAction', 'http://restful.live2.dev.radixweb.net/RestServiceImpl.svc'); reqL.setHeader('SetHelloWorld', 'SFDC-Callout/22.0'); reqL.setHeader('Accept','text/xml'); reqL.setHeader('Content-type','text/xml'); reqL.setHeader('charset','UTF-8'); reqL.setBody('This is testing.'); try { HTTPResponse res = hL.send(reqL); System.debug(res.toString()); System.debug('STATUS:'+res.getStatus()); System.debug('STATUS_CODE:'+res.getStatusCode()); } catch(System.CalloutException e) { //Exception handling goes here.... } } // My WCF RESTFULL Service Method [OperationContract] [WebGet(UriTemplate = "/SetHelloWorld", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Xml)] void SetHelloWorld(); I am waiting for valuable feedback. Thanks.