You need to sign in to do that
Don't have an account?
priyankasingla3101.3916265522429534E12
Is it possible to create custom Headers using Apex code?
Hi,
Salesforce provides some standard SOAP headers such as AllowFieldTruncationHeader, MruHeader etc.
But can we create custom headers using apex code, so that they would be visible in the custom WSDL that gets generated from that APEX code?
Salesforce provides some standard SOAP headers such as AllowFieldTruncationHeader, MruHeader etc.
But can we create custom headers using apex code, so that they would be visible in the custom WSDL that gets generated from that APEX code?
The standard WSDL-->Apex feature does not support including any WSS or WSP headers in the outgoing SOAP request.
You will need to forgo the WSDL-->Apex generated classes and instead manually construct the request SOAP message and then invoke the web service using the Apex HTTP callout classes.
This thread should be helpful in showing you how to do this - http://boards.developerforce.com/t5/Apex-Code-Development/SOAP-Webservice-Callout-Issue-Generating-Output-Headers-Response/m-p/171411/highlight/true#M26424.
Hope this helps.
Regards,
Ashish