• Kumarhatti
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies

Hi there,

 

Is there a way I can change the report folder permission in bulk, probably using apex.

I have to selectively choose "This folder is accessible by all users, including portal users" and change it to "This folder is accessible by all users, excluding portal users"..

Any reply would help. 

Thanks

Hi,

I wrote a webservice which uses RestRequest to recieve the xml, however I am not able to convert the recieved request into xml i.e Dom.document or xmlstreamreader, below is the webservice I wrote, I able to see the xml in the log System.debug('--->RestContext.request'+req); but How do I convert RestContext.request to dom or xmlstreamreader, as I need to parse and create record from the data??, Thanks a lot

 

@RestResource(urlMapping='/CandExpJobPost_Router/v1/*')
global with sharing class CandExpJobPost_RouterV1 {

static boolean LogEvent = false;

CandExpJobPost_RouterV1(){System.debug('----->ssip');}


@HttpPost
global static String doRecieve( ) {
mydef doc3;
createjobpostfromxml parse=new createjobpostfromxml();
//System.debug('Recieved xml -->'+doc3);
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
String xml = req.requestBody.toString().trim();
System.debug('--->RestContext.request'+req);

System.debug('--->xml'+xml);
//res.addHeader('Content-Type', 'text/xml');
testdomjobpost testdoc = new testdomjobpost();
String x=String.Valueof(req);

 

}

I have quite a situation with using OAuth 2.0 for authentication in the integration I am trying to implement.

I am using REST architecture to expose API of my webservice, so Biztalk can post the xml to SFDC. However, I have two options for authenticating external server,

1)      SESSION ID

2)      OAuth 2.0

 

As far as my understanding, OAuth 2.0 in conjunction with REST architecture can only be implemented via user interface, meaning when external server attempts to communicate with SF, they have to

enter credentials using UI, but I want to authenticate the server call programmatically? can it be done?? . If this is the case – that is, if REST is not designed to authenticate external calls via programmatically, then the only choice I have is using session ID, is that correct?? Because, I went through REST documentation, lots of demos, use cases and conversation in forums, all points to the same thing.

 

If I am wrong, it would be great if you can provide some implemented use case as an example or snippet of code, how this is done. Please let me know if you have any questions.

Thanks a lot.