Skip to content

Latest commit

 

History

History
43 lines (38 loc) · 1.9 KB

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

File metadata and controls

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

Using SOAP Headers in Pipeline Components

To access the SOAP header context properties in pipeline components, you use a combination of the context property name and target namespace as discussed in Using SOAP Headers in Orchestrations.

The following code example sets the request SOAP header in a send pipeline component for a property name OrigDest:

public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)  
{  
   try  
      {  
       string stringVar = "<?xml version=\"1.0\"?>  
          <OrigDest xmlns=\"http://SOAPHeaderSchemas.OrigDestSOAPHeader\">  
             <Origination>Home</Origination>  
             <Destination>Work</Destination>  
          </OrigDest>";  
inmsg.Context.Write("OrigDest","http://schemas.microsoft.com/BizTalk/2003/SOAPHeader", stringVar);  
      }  
   catch (Exception ex)  
      {  
   throw new Exception("Pipeline component exception - " + ex.Message);  
      }  
return inmsg;  
}  

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

Note

When you consume (call) Web services from an orchestration, the SOAP adapter only supports pass-through style receive and send pipelines. You can use a custom pipeline, but it cannot contain components that modify the body parts of the message. These components include the XML Assembler, XML Disassembler, and XML Validator components.

See Also

Default Pipelines
SOAP Headers with Consumed Web Services