• aboussaidi
  • NEWBIE
  • 0 Points
  • Member since 2011

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

 

Hi,
I wana to delivre (send) a PDF file to externe Web Service using HttpRequest 'POST' (with REST), and i dont know how i must proceed.
hat's wath i have do at now :
 String Id ='500S00000012tjM';
 PageReference pageRef = new PageReference('/apex/GenererPDF?id='+Id);
 Blob PDF = pageRef.getContentAsPDF(); 
        
 String endpointSend = 'https://WebServiceTEst';
 HttpRequest reqSend = new HttpRequest();
 reqSend.setEndpoint(endpointSend);
 reqSend.setMethod('POST');
 Blob headerValueSend = Blob.valueOf(usrName + ':' + psswd );
        String authorizationHeaderSend= 'Basic ' + EncodingUtil.base64Encode(headerValueSend);
        reqSend.setHeader('Authorization', authorizationHeader);
        
        reqSend.setHeader('content-type', 'application/pdf');
        
        //String BlodPDF = EncodingUtil.base64Encode(PDF);
        
        System.debug('22222222' + EncodingUtil.base64Encode(PDF));
        
        
        reqSend.setBody(EncodingUtil.base64Encode(PDF));
        
        
        Http httpLoadPDF = new Http();

Hi,I wana to delivre (send) a PDF file to externe Web Service using HttpRequest 'POST' (with REST), and i dont know how i must proceed.
hat's wath i have do at now :

String Id ='500S00000012tjM'; PageReference pageRef = new PageReference('/apex/GenererPDF?id='+Id); Blob PDF = pageRef.getContentAsPDF();           String endpointSend = 'https://WebServiceTEst'; HttpRequest reqSend = new HttpRequest(); reqSend.setEndpoint(endpointSend); reqSend.setMethod('POST'); Blob headerValueSend = Blob.valueOf(usrName + ':' + psswd );        String authorizationHeaderSend= 'Basic ' + EncodingUtil.base64Encode(headerValueSend);        reqSend.setHeader('Authorization', authorizationHeader);                reqSend.setHeader('content-type', 'application/pdf');                //String BlodPDF = EncodingUtil.base64Encode(PDF);                System.debug('22222222' + EncodingUtil.base64Encode(PDF));                        reqSend.setBody(EncodingUtil.base64Encode(PDF));                        Http httpLoadPDF = new Http();

 

Hi,

I wana to delivre (send) a PDF file to externe Web Service using HttpRequest 'POST' (with REST), and i dont know how i must proceed.

 

hat's wath i have do at now :

 

 

 String Id ='500S00000012tjM';
 
 PageReference pageRef = new PageReference('/apex/GenererPDF?id='+Id);
 
 Blob PDF = pageRef.getContentAsPDF(); 
 
        
 
 String endpointSend = 'https://WebServiceTEst';
 HttpRequest reqSend = new HttpRequest();
 reqSend.setEndpoint(endpointSend);
 reqSend.setMethod('POST');
 Blob headerValueSend = Blob.valueOf(usrName + ':' + psswd );
        String authorizationHeaderSend= 'Basic ' + EncodingUtil.base64Encode(headerValueSend);
        reqSend.setHeader('Authorization', authorizationHeader);
        
        reqSend.setHeader('content-type', 'application/pdf');
        
        //String BlodPDF = EncodingUtil.base64Encode(PDF);
        
        System.debug('22222222' + EncodingUtil.base64Encode(PDF));
        
        
        reqSend.setBody(EncodingUtil.base64Encode(PDF));
        
        
        Http httpLoadPDF = new Http();
       
       
       
        HTTPResponse responseLaodPDF = httpLoadPDF.send(reqSend);
        System.debug('STATUS:'+responseLaodPDF.getStatus());
        System.debug('STATUS_CODE:'+responseLaodPDF.getStatusCode());
        System.debug('333333' + responseLaodPDF.getBody());

 

Hi,

Im new salesforce Developer and im asking for a way to active the autocomplete for Visualforce in Eclipse Force.com IDE

 

Thx.

 

Hi All,

 

I have created a visualforce page with outputLink component for get a popup page.

 

 

<apex:repeat value="{!node.children}" var="child">
   <li><span>{!child.name}</span>&nbsp;
   <apex:outputLink value="/a07/e?retURL=%2Fa07%2Fo8&parent={!child.id}&CF00N90000001xlPo={!child.name}" target="_blank">Add</apex:outputLink>
</apex:repeat>

 This URl in output link is contain a standard page(It is for insert new employee). I want to close the child page and refresh the parent page after click save button in child page.

 

How can I do this?

 

 

Thanks in Advance

--

Chamil Madusanka

 

Hi,

Im new salesforce Developer and im asking for a way to active the autocomplete for Visualforce in Eclipse Force.com IDE

 

Thx.

 

    Hi Folks,
                     How can i connect to sales force using Apex code API, can any explain how it can be done pls.

Thanks,
rajesh