I am trying to do http callout with soap 1.2 request but facing following error..?
Error - System.UnexpectedException: java.lang.IllegalArgumentException: invalid start or end.
request:-
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setHeader('Accept-Encoding','gzip,deflate');
req.setHeader('Content-Type','text/xml;charset=UTF-8;action=\"MRBDirectUploads_v1_Binder_ping\"');
req.setHeader('User-Agent','xxx');
req.setHeader('Host', 'bfs-webservices-test.macquarie.com.au');
req.setHeader('Content-Length','xxx');
req.setEndpoint('https://bfs-webservices-test.macquarie.com.au/bfs/b2b/ws/MRBDirectUploads:v1/MRBDirectUploads_v1_Port');
req.setBody(header);
HTTPResponse res =new HttpResponse();
Http http = new Http();
system.debug('request' +res+'#Header' );
res = http.send(req);
header
variable will have to contain very precise XML (that is normally generated by tooling because it is hard to achieve through manual coding) that is compliant with the SOAP 1.2 specs. – Keith C Sep 3 '15 at 8:15