PipeLine Class Properties
The next tree diagram shows the properties of the Pipeline
class expanded to show all the properties. Code snippets from the web service
described in the next section will clarify some of the properties.

Examining the Properties with an Example
Create a web service project, herein called TPipeLine,
remove the default Service1.asmx file and add a new web service file called, TPProps.asmx.
Now apply web service extensions 2.0, by right clicking the highlighted project
and clicking on WSE2.0 Settings... as shown.

This brings up the WSE2.0 settings dialogue as shown wherein
you enable the two checkboxes, if you want to enable the second checkbox, you
must have enabled the first. The first checkbox enables the project for WSE and
the second will add the web service enhancement soap extensions to the project
which is applicable to ASP.Net projects. The other tabs are not configured in
the preparation of this tutorial.

The first check box adds reference to the
Microsoft.web.services2.dll to the project and an element to the configuration of
the web.config file as shown.
<microsoft.web.services2>
<diagnostics />
</microsoft.web.services2>
The second checkbox adds the following to the configuration
of the web.config file.
<webServices>
<soapExtensionTypes>
<add
type="Microsoft.Web.Services2.WebServicesExtension,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
priority="1" group="0" />
</soapExtensionTypes>
</webServices>
This procedure will be used in all the examples to follow as
the various classes are explored. In order to call up the Pipeline methods we
need to instantiate a new instance of the pipeline using the constructor from
among the overload list shown in this table.
Name
|
Description
|
Pipeline ()
|
Initializes a new instance of the Pipeline class.
|
Pipeline (Pipeline)
|
Initializes a new instance of the Pipeline class with the
specified Pipeline object.
|
Pipeline (SoapInputFilterCollection,
SoapOutputFilterCollection)
|
Initializes a new instance of Pipeline with the specified
collections of SOAP input and output filters.
|
Actor Property
In the discussion to follow, we shall use the parameterless constructor
for Pipeline. We shall add a WebMethod to the ASMX file after removing the
HelloWorld example as shown. In order to reference the WSE2.0, an Imports
Microsoft.Web.Services2 statement should be added to the TPProps class file.
This property has a value System.Uri, the default value according to WSEREF
[Web Services Extensions Reference Documentation] is Microsoft.Web.Services2.Addressing.WSAddressing.AnonymousRole.
The following code will return the Pipeline's Actor property.

When you invoke this method in the browser, you will display
the following, returned by the method:
<string>
http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous
</string>
InputFilters Property
As described in the basics, there are a number of filters in
the pipeline and we should be able to find out what they are by looking at the InputFilters
property by coding the following:
Return pline.InputFilters.Item(0).GetType.ToString
When the method is invoked in the browser, you display the following string:
<string>
Microsoft.Web.Services2.Security.SecurityInputFilter
</string>
In the same way, if you want to find how many filters there
are, use the following:
Return pline.InputFilters.Count. This will display the following in the
browser.
The following table summarizes the statements and the
displayed results by invoking the method.
Index
|
Type of Filter
|
Return
pline.InputFilters.Item(0).GetType.ToString
|
<string>
Microsoft.Web.Services2.Security.SecurityInputFilter
</string>
|
Return pline.InputFilters.Item(1).GetType.ToString
|
<string>
Microsoft.Web.Services2.Referral.ReferralInputFilter
</string>
|
Return pline.InputFilters.Item(2).GetType.ToString
|
<string>
Microsoft.Web.Services2.Policy.PolicyVerificationInputFilter
</string>
|
OutputFilters Property
The OutputFilters property of the Pipeline follows the same
pattern as the InputFilters property. These are summarized in the following
table.
Index
|
Type of Filter
|
Return pline.OutputFilters.Item(0).GetType.ToString
|
<string>
Microsoft.Web.Services2.Security.SecurityOutputFilter
</string>
|
Return pline.OutputFilters.Item(1).GetType.ToString
|
<string>
Microsoft.Web.Services2.Referral.ReferralOutputFilter
</string>
|
Return pline.OutputFilters.Item(2).GetType.ToString
|
<string>
Microsoft.Web.Services2.Policy.PolicyEnforcementOutputFilter
</string>
|
IsIntermediary Property
When messages are going from an originating node(Sender) to
an ultimate endpoint(Receiver) after passing thorough many 'routers'(soap
Processing Nodes) in between, the IsIntermediary property provides a Boolean
value of true, if the node is an Intermediary, and false otherwise. This
property can also be set for a custom soap message. The following code returns
a false as this node is not an intermediary.
Public Function PActor () As String
Dim pline As New Pipeline
Try
Return pline.IsIntermediary
Catch ex As SystemException
Return ex.Message
End Try
End Function