Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 1.24 KB

accessing-soap-headers-in-pipeline-components.md

File metadata and controls

34 lines (30 loc) · 1.24 KB
description title ms.custom ms.date ms.service ms.reviewer ms.suite ms.topic
Learn more about: Accessing SOAP Headers in Pipeline Components
Accessing SOAP Headers in Pipeline Components
06/08/2017
biztalk-server
article

Accessing SOAP Headers in Pipeline Components

You can access SOAP header context properties in pipeline components. You use a combination of the context property name and the target namespace http://schemas.microsoft.com/BizTalk/2003/SOAPHeader.

The following code example gets the request SOAP header in a receive pipeline component for the property OrigDest:

public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)  
{  
   try  
   {  
   string stringVar = inmsg.Context.Read("OrigDest",    "http://schemas.microsoft.com/BizTalk/2003/SOAPHeader").ToString();  
   }  
   catch (Exception ex)  
   {  
   throw new Exception("Pipeline component exception - " + ex.Message);  
   }  
return inmsg;  
}  

For more information about pipeline components, see Developing Custom Pipeline Components.

See Also

SOAP Headers with Published Web Services