function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Error with POST request


Iam trying to implement webservices where i need to post the data from salesforce to external syatem and i wrote an apex class with POST request and i get the below error

The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.  Check that the sender and receiver's EndpointAddresses agree".

What does the error mean??

Thanks. Any help is appreciated.
Hey there,

You just need to verify that your endpoint is correct. For some reason, the code is not being able to find the valid endpoint hence, it is not being able to POST the information. 

I suggest, if you like to see if your POST message is working or not, you could POST information into a test endpoint just to check and then finally put your required endpoint to make the magic happen.

Test endpoint URL:
Create a Request Bin Here and grab that url and put it as your endpoint and add it to your remote site settings and run your POST request. Then go back to this URL and see if it posted the information that you sent or not.

Hope that helped!

Thanks Shrestha. Iam sure my end point url is correct. Because i tested in SOPA UI and it worked. The end point url where the WSDL file is defined only has SOAP12 binding. It doesnot have SOAP1.1 address. Do you think that might be the reason.

Could you send the code that you have.
Here is my code

global static void sendCommunication(Integer ChildNumber, String CommType, Integer ClientID) {

HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();


String username = test';
String password = 'test';

Blob headerValue = Blob.valueOf(username + '' + password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
req.setHeader('Authorization', authorizationHeader);
req.setHeader('Content-Type',  'application/soap+xml; charset=utf-8');

String reqBody = '<soap:Envelope xmlns:soap="" xmlns:tem="" xmlns:plan="">'


try {
    res = http.send(req);
} catch(System.CalloutException e) {
    System.debug('Callout error: '+ e);


Hi there,

Could you try 2 things;
1. comment out the code;
2.  If that does not work then try changing BASIC to Basic: String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);

Let me know where you stand?
sorry, both did not work. I read somewhere that if the client and server bindings doesnot match, it throws that type of error. So doesn't it matter for the POST request  if the wsdl file has soap12 action rather than soap action??
I think it would.
So you think the WSDL file must and should have the SOAP 1.1 binding for it to work?? I just need this confirmation so that i can go ahead and ask the client to make the SOAP1.1 available.

I do not know for sure if that will solve your problem, sorry! But for testing if that would work or not you could try.