I having an issue passing a URL value into the header.
I have added this code:
CustomerFieldscheduling.CFSPartnerSlotsServiceImplPort cfsPort = new CustomerFieldscheduling.CFSPartnerSlotsServiceImplPort(); Blob headerValue = Blob.valueOf('LOGIN' + ':' + 'LOGINPWD'); String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue); String sURL = 'https:/testURL'; System.debug('authorizationHeader'+authorizationHeader); cfsPort.inputHttpHeaders_x = new Map<String,String>(); cfsPort.inputHttpHeaders_x.put('URL',sURL); cfsPort.inputHttpHeaders_x.put('Authorization',authorizationHeader);
CustomerFieldscheduling.CFSPartnerSlotsServiceImplPort cfsPort = new CustomerFieldscheduling.CFSPartnerSlotsServiceImplPort();
Blob headerValue = Blob.valueOf('LOGIN' + ':' + 'LOGINPWD');
String authorizationHeader = 'Basic ' +EncodingUtil.base64Encode(headerValue);
String sURL = 'https:/testURL';
System.debug('***authorizationHeader***'+authorizationHeader);
cfsPort.inputHttpHeaders_x = new Map<String,String>();
cfsPort.inputHttpHeaders_x.put('URL',sURL);
cfsPort.inputHttpHeaders_x.put('Authorization',authorizationHeader);
When i tried to invoked the webservice, able to connect to the operation that i need to call but getting the error of the URL not being part of the request that i sent
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> env:Header/ </env:Header>env:Body....</env:Body>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
</env:Header><env:Body>....</env:Body>
the web service is expecting a request in this format
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> env:Header https:/testURL </env:Header>env:Body
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header>
<URL>https:/testURL</URL>
</env:Header><env:Body>
Can you please share idea on how i could attain the said format.