• Murali Krishna 56
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi,

Can send can send attachment(s) from Salesforce to and external system using WSDL or HTTP Callout? If yes, is there any limit of size of file can be sent?

From what I found out so far, it seems.. attachment (blob) can not be sent using WSDL call..

The following data types are only supported when used as call ins, that is, when an external Web service calls an Apex Web service method. These data types are not supported as callouts, that is, when an Apex Web service method calls an external Web service.
•             blob
•             decimal
•             enum

Can we use HTTPRequest method setBodyAsBlob (to an EndPoint URL) and set MIME type and send the file instead in case WSDL based callout does not support it?

Please suggest, would really appriciate any help/input, thanks in advance.

Regards,
Subhajit

Hi,

 

I have a remoteAction annotated method in one of my apex classes and I'm trying to call that action from a visualforce.

My call looks like 

 

Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.DetailsController.addCompany}',id, name, function(response, event)

 where 'id' and 'name' are additional params to the action. The above snippet always throws "No remoted actions found to resolve" error. Any idea where I'm going wrong? Thanks. 

I have a formula field Requirement_Type__c  in object called Requirement__c as follows:

$RecordType.DeveloperName

Now,in object2__c which is related to Requirement__c, when i am creating a new formula field as,

Requirement__r.Requirement_Type__c

I am getting a error,

Error: Error in referenced formula Requirement__r.Requirement_Type__c, Field $RecordType.DeveloperName does not exist. Check spelling.


Any thoughts?

Hello All,

 

I need to send an uploaded document to a third party webservice. I can send text files fine. But all other file types are getting corrupted.

I have been struggling for the past 3 weeks with this problem . I ahve tried several variations like Content-Transfer-Encoding : base64 and sending the

EncodingUtil.base64Encode(blob) with no luck. Is there some thing I am missing. I need to be ableto send pdfs, images, doc files.

Please help.

 

Thanks

Gopi

String response; String boundary = 'AaBbCcX30'; String m_URL = 'some url'; String content = 'Content:\r\n--' + boundary + '\r\nContent-Disposition:form-data;name="' + p_fileName + '";filename="'+p_fileName+'"\r\n'; content +='Content-Type:' + p_fileContentType + ',charset=ISO-8859-1,*,utf-8\r\n'; content +='Content-Transfer-Encoding: binary\r\n\r\n'; content += p_fileBlob +'\r\n\r\n'; content += '--'+boundary+'--\r\n'; System.debug(p_fileBlob.size()+'content ' + content); Http m_http = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint(m_URL); req.setHeader('Content-Type','multipart/form-data;boundary='+boundary); req.setMethod('POST'); req.setBody(content); HttpResponse m_httpResp = null; m_httpResp = m_http.send(req); m_strHttpResp = m_httpResp.getBody();

 

  • March 09, 2009
  • Like
  • 0