Where has the Message Body Gone?
Hi, all. According to my last threadMessage Routing doesn't work, I have corrected some problems and the message could be routed to my destination service. But now comes another problem that the message body seemed lost.
First let me give a short introduction about the projects. There are totally 5 projects:
- Client: The console UI.
- ClientService: Contains ClientServiceHandler class that inherites from CsfService.
- http://localhost/ClientServiceSite/: Hosting the ClientService.
- http://localhost/ServerService: The destination web service.
- CsfHelper: A helper project to simplifiy CSF work.
The destination web service is a simple asmx, which code is as follows:
using System;
using System.IO;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public void Log(string content)
{
using (StreamWriter writer = File.CreateText(@"C:\log.txt"))
{
writer.WriteLine(content);
}
}
}
The ClientServiceHandler class is as follows:
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Microsoft.ConnectedServices.Sdk;
using Microsoft.ConnectedServices.Sdk.Addressing;
using Microsoft.ConnectedServices.Sdk.Client;
using Microsoft.ConnectedServices.Sdk.Messaging;
using CsfHelper;
namespace ClientService
{
[CsfService(Namespace = "http://osdt/research/2006/10/ClientService")]
public class ClientServiceHandler : CsfService
{
[Operation(Action = "http://osdt/research/2006/10/ClientService/CreateSession")]
public void CreateSession()
{
m_SessionID = SessionHelper.CreateSession(SessionManifestHelper.GetSessionManifestFromXmlFile(@"C:\manifest.xml"));
}
[Operation(Action = "http://osdt/research/2006/10/ClientService/Talk")]
public void Talk(string content)
{
Header header = new Header();
header.Addressing = new AddressingHeaders(new Uri("http://localhost/ClientServiceSite/ClientService.ashx"));
header.Addressing.To = new Uri("http://localhost/session30/session.ashx");
header.Addressing.Action = "http://tempuri.org/Log";
header.CsfProperties.SessionId = new Uri(m_SessionID);
header.Security.Add(SecurityHelper.GetUsernameToken());
Message msg = Message.CreateMessage(header, content);
MessageSender sdr = new MessageSender();
sdr.SendAsync(msg);
}
[Operation(Action = "http://osdt/research/2006/10/ClientService/TalkResponse")]
public void TalkResponse(string content)
{
using (StreamWriter writer = File.CreateText(@"C:\logResponse.txt"))
{
writer.WriteLine(content);
}
}
[Operation(Action = "http://osdt/research/2006/10/ClientService/TerminateSession")]
public void TerminateSession()
{
SessionHelper.TerminateSession(m_SessionID);
}
private string m_SessionID;
}
}
Thehttp://localhost/ClientServiceSite is just used to host the ClientServiceHandler by adding httpHandler to its web.config file as follows:
<httpHandlers>
<add verb="*" path="ClientService.ashx" type="ClientService.ClientServiceHandler, ClientService"/>
</httpHandlers>
CsfHelper contains nothing but several helper classes to simplify manifest deserialization, session creation, session termination, and security token obtaining.
The Client project contains web reference to ClientService and talk to the destination service through it. Here's code inside the Main method:
ClientServiceHandler proxy = new ClientServiceHandler();
proxy.CreateSession();
proxy.Talk("Allen Lee");
proxy.TerminateSession();
The manifest is as follows:
<Session
timestamp="0001-01-01T00:00:00.0000000-08:00"
timeout="30"
serialize="None"
routeAnyAction="true"
ackOnRouteMsgToParticipants="false"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://Microsoft/ConnectedServices/2006/06/Session/">
<SessionName>HelloWorld</SessionName>
<Participants>
<Participant timeout="30" role="Service" inChannelResponse="false" type="WebService">
<ParticipantName>ServerService</ParticipantName>
<ParticipantID>ServerService</ParticipantID>
<ParticipantUrl>http://localhost/ServerService/Service.asmx</ParticipantUrl>
</Participant>
<Participant timeout="30" role="Service" inChannelResponse="false" type="WebService">
<ParticipantName>ClientService</ParticipantName>
<ParticipantID>ClientService</ParticipantID>
<ParticipantUrl>http://localhost/ClientServiceSite/ClientService.ashx</ParticipantUrl>
</Participant>
</Participants>
<RoutingTable version="0" timestamp="0001-01-01T00:00:00.0000000-08:00">
<Routes>
<Route>
<Criteria>(ACTION EQ 'http://tempuri.org/Log')</Criteria>
<Destination>ServerService[http://tempuri.org/Log]</Destination>
</Route>
<Route>
<Criteria>(ACTION EQ 'http://tempuri.org/LogResponse')</Criteria>
<Destination>ClientService[http://osdt/research/2006/10/ClientService/TalkResponse]</Destination>
</Route>
</Routes>
</RoutingTable>
</Session>
Session_InputTrace.webinfo is as follows:
<?xml version="1.0" encoding="utf-8"?>
<log>
<inputMessage utc="10/16/2006 3:32:15 PM" messageId="urn:uuid:fa25b367-b08a-45bd-bc08-435e6021128b">
<processingStep description="Unprocessed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<wsa:Action>http://Microsoft/ConnectedServices/2006/06/Session/CreateSession</wsa:Action>
<wsa:MessageID>urn:uuid:fa25b367-b08a-45bd-bc08-435e6021128b</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>http://research-osdt.contoso.com/Session30/SessionManagerAdmin.ashx</wsa:To>
<wsse:Security env:mustUnderstand="true">
<wsu:Timestamp wsu:Id="Timestamp-0187685f-05d8-430f-a263-3df5d8c75e11">
<wsu:Created>2006-10-16T15:32:15Z</wsu:Created>
<wsu:Expires>2006-10-16T15:37:15Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-c05d366c-8a37-4b0b-8b10-a346648e68cb">
<wsse:Username>Session-Service@contoso.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">research=0sdt</wsse:Password>
<wsse:Nonce>U1AQV+nzaOw5D1mVZURWhQ==</wsse:Nonce>
<wsu:Created>2006-10-16T15:32:15Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<CreateSession xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/">
<Session timestamp="0001-01-01T00:00:00-08:00" timeout="30" persist="None" state="Active" routeAnyAction="true" ackOnRouteMsgToParticipants="false">
<SessionName>HelloWorld</SessionName>
<Participants>
<Participant timeout="30" role="Service" inChannelResponse="false" type="WebService">
<SoapVersion>Default</SoapVersion>
<ParticipantName>ServerService</ParticipantName>
<ParticipantID>ServerService</ParticipantID>
<ParticipantUrl>http://localhost/ServerService/Service.asmx</ParticipantUrl>
<Actions />
<PolicyDocument>
<Include>
<SecondaryCredentialMap>
<PrimaryCredentialForMessage>None</PrimaryCredentialForMessage>
<PrimaryCredentialForTransport transportAuthenticationType="Ntlm">None</PrimaryCredentialForTransport>
</SecondaryCredentialMap>
</Include>
</PolicyDocument>
</Participant>
<Participant timeout="30" role="Service" inChannelResponse="false" type="WebService">
<SoapVersion>Default</SoapVersion>
<ParticipantName>ClientService</ParticipantName>
<ParticipantID>ClientService</ParticipantID>
<ParticipantUrl>http://localhost/ClientServiceSite/ClientService.ashx</ParticipantUrl>
<Actions />
<PolicyDocument>
<Include>
<SecondaryCredentialMap>
<PrimaryCredentialForMessage>None</PrimaryCredentialForMessage>
<PrimaryCredentialForTransport transportAuthenticationType="Ntlm">None</PrimaryCredentialForTransport>
</SecondaryCredentialMap>
</Include>
</PolicyDocument>
</Participant>
</Participants>
<RoutingTable version="0" timestamp="0001-01-01T00:00:00-08:00">
<Routes>
<Route>
<Criteria>(ACTION EQ 'http://tempuri.org/Log')</Criteria>
<Destination>ServerService[http://tempuri.org/Log]</Destination>
</Route>
<Route>
<Criteria>(ACTION EQ 'http://tempuri.org/LogResponse')</Criteria>
<Destination>ClientService[http://osdt/research/2006/10/ClientService/TalkResponse]</Destination>
</Route>
</Routes>
</RoutingTable>
</Session>
</CreateSession>
</env:Body>
</env:Envelope>
</processingStep>
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion+RequireSoapHeaderFilter" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion+RequireSoapHeaderFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceInputFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceInputFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.InputTraceFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.InputTraceFilter" />
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Design.AuthorizationAssertion+AuthorizationFilter" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Design.AuthorizationAssertion+AuthorizationFilter" />
<processingStep description="Processed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header />
<env:Body>
<CreateSession xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/">
<Session timestamp="0001-01-01T00:00:00-08:00" timeout="30" persist="None" state="Active" routeAnyAction="true" ackOnRouteMsgToParticipants="false">
<SessionName>HelloWorld</SessionName>
<Participants>
<Participant timeout="30" role="Service" inChannelResponse="false" type="WebService">
<SoapVersion>Default</SoapVersion>
<ParticipantName>ServerService</ParticipantName>
<ParticipantID>ServerService</ParticipantID>
<ParticipantUrl>http://localhost/ServerService/Service.asmx</ParticipantUrl>
<Actions />
<PolicyDocument>
<Include>
<SecondaryCredentialMap>
<PrimaryCredentialForMessage>None</PrimaryCredentialForMessage>
<PrimaryCredentialForTransport transportAuthenticationType="Ntlm">None</PrimaryCredentialForTransport>
</SecondaryCredentialMap>
</Include>
</PolicyDocument>
</Participant>
<Participant timeout="30" role="Service" inChannelResponse="false" type="WebService">
<SoapVersion>Default</SoapVersion>
<ParticipantName>ClientService</ParticipantName>
<ParticipantID>ClientService</ParticipantID>
<ParticipantUrl>http://localhost/ClientServiceSite/ClientService.ashx</ParticipantUrl>
<Actions />
<PolicyDocument>
<Include>
<SecondaryCredentialMap>
<PrimaryCredentialForMessage>None</PrimaryCredentialForMessage>
<PrimaryCredentialForTransport transportAuthenticationType="Ntlm">None</PrimaryCredentialForTransport>
</SecondaryCredentialMap>
</Include>
</PolicyDocument>
</Participant>
</Participants>
<RoutingTable version="0" timestamp="0001-01-01T00:00:00-08:00">
<Routes>
<Route>
<Criteria>(ACTION EQ 'http://tempuri.org/Log')</Criteria>
<Destination>ServerService[http://tempuri.org/Log]</Destination>
</Route>
<Route>
<Criteria>(ACTION EQ 'http://tempuri.org/LogResponse')</Criteria>
<Destination>ClientService[http://osdt/research/2006/10/ClientService/TalkResponse]</Destination>
</Route>
</Routes>
</RoutingTable>
</Session>
</CreateSession>
</env:Body>
</env:Envelope>
</processingStep>
</inputMessage>
<inputMessage utc="10/16/2006 3:32:16 PM" messageId="urn:uuid:abe3c6f1-f7d8-4fcd-8812-45f4ba1a1930">
<processingStep description="Unprocessed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<wsa:Action>http://tempuri.org/Log</wsa:Action>
<wsa:From>
<wsa:Address>http://localhost/ClientServiceSite/ClientService.ashx</wsa:Address>
</wsa:From>
<wsa:MessageID>urn:uuid:abe3c6f1-f7d8-4fcd-8812-45f4ba1a1930</wsa:MessageID>
<wsa:To>http://localhost/session30/session.ashx</wsa:To>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<wsse:Security env:mustUnderstand="true">
<wsu:Timestamp wsu:Id="Timestamp-b6030519-0423-4bf7-bb2d-bbe6674d7430">
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
<wsu:Expires>2006-10-16T15:37:16Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-612fcc3a-1867-4cac-ac25-1482505d96dd">
<wsse:Username>Session-Service@contoso.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">research=0sdt</wsse:Password>
<wsse:Nonce>XOb9henrTOk2qrHqGJYgDw==</wsse:Nonce>
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<string xmlns="http://tempuri.org/">Allen Lee</string>
</env:Body>
</env:Envelope>
</processingStep>
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion+RequireSoapHeaderFilter" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion+RequireSoapHeaderFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceInputFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceInputFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.InputTraceFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.InputTraceFilter" />
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Design.AuthorizationAssertion+AuthorizationFilter" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Design.AuthorizationAssertion+AuthorizationFilter" />
<processingStep description="Processed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
</env:Header>
<env:Body>
<string xmlns="http://tempuri.org/">Allen Lee</string>
</env:Body>
</env:Envelope>
</processingStep>
</inputMessage>
<inputMessage utc="10/16/2006 3:32:16 PM" messageId="urn:uuid:2fa7c49e-e076-413b-b85d-cdcbe0231b9d">
<processingStep description="Unprocessed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<wsa:Action>http://Microsoft/ConnectedServices/2006/06/Session/TerminateSession</wsa:Action>
<wsa:MessageID>urn:uuid:2fa7c49e-e076-413b-b85d-cdcbe0231b9d</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>http://research-osdt.contoso.com/Session30/SessionManagerAdmin.ashx</wsa:To>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<wsse:Security env:mustUnderstand="true">
<wsu:Timestamp wsu:Id="Timestamp-7123343e-6f74-4eef-9c52-2df096cc3308">
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
<wsu:Expires>2006-10-16T15:37:16Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-be7e99c5-a810-4a1b-b64b-6384e4f240b4">
<wsse:Username>Session-Service@contoso.com</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">research=0sdt</wsse:Password>
<wsse:Nonce>ASESZT/lBLI8cXxvKhTXgg==</wsse:Nonce>
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<TerminateSession xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/" />
</env:Body>
</env:Envelope>
</processingStep>
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion+RequireSoapHeaderFilter" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Design.RequireSoapHeaderAssertion+RequireSoapHeaderFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceInputFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceInputFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.InputTraceFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.InputTraceFilter" />
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Design.AuthorizationAssertion+AuthorizationFilter" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Design.AuthorizationAssertion+AuthorizationFilter" />
<processingStep description="Processed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
</env:Header>
<env:Body>
<TerminateSession xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/" />
</env:Body>
</env:Envelope>
</processingStep>
</inputMessage>
</log>
Session_OutputTrace.webinfo is as follows:
<?xml version="1.0" encoding="utf-8"?>
<log>
<outputMessage utc="10/16/2006 3:32:16 PM" messageId="urn:uuid:a615334b-0d8f-4766-b53a-2016267493ed">
<processingStep description="Unprocessed message">
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<CreateSessionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/">
<SessionID>urn:639ab751-796b-4aa4-9c81-2ab4ab196281</SessionID>
<SessionLocations>
<SessionLocation transport="http">
<SessionManagerAdminWSUri>http://research-osdt.contoso.com/Session30/SessionManagerAdmin.ashx</SessionManagerAdminWSUri>
<SessionAdminWSUri>http://research-osdt.contoso.com/Session30/SessionAdmin.ashx</SessionAdminWSUri>
<SessionWSUri>http://research-osdt.contoso.com/Session30/Session.ashx</SessionWSUri>
</SessionLocation>
</SessionLocations>
</CreateSessionResponse>
</env:Body>
</env:Envelope>
</processingStep>
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.OutputTraceFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.OutputTraceFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceOutputFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceOutputFilter" />
<processingStep description="Processed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<wsa:Action>http://Microsoft/ConnectedServices/2006/06/Session/CreateSessionResponse</wsa:Action>
<wsa:From>
<wsa:Address>http://research-osdt.contoso.com/Session30/SessionManagerAdmin.ashx</wsa:Address>
</wsa:From>
<wsa:MessageID>urn:uuid:a615334b-0d8f-4766-b53a-2016267493ed</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:fa25b367-b08a-45bd-bc08-435e6021128b</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-11a418ce-de1c-4c04-b09a-7febb88e52e5">
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
<wsu:Expires>2006-10-16T15:37:16Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</env:Header>
<env:Body>
<CreateSessionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/">
<SessionID>urn:639ab751-796b-4aa4-9c81-2ab4ab196281</SessionID>
<SessionLocations>
<SessionLocation transport="http">
<SessionManagerAdminWSUri>http://research-osdt.contoso.com/Session30/SessionManagerAdmin.ashx</SessionManagerAdminWSUri>
<SessionAdminWSUri>http://research-osdt.contoso.com/Session30/SessionAdmin.ashx</SessionAdminWSUri>
<SessionWSUri>http://research-osdt.contoso.com/Session30/Session.ashx</SessionWSUri>
</SessionLocation>
</SessionLocations>
</CreateSessionResponse>
</env:Body>
</env:Envelope>
</processingStep>
</outputMessage>
<outputMessage utc="10/16/2006 3:32:16 PM" messageId="urn:uuid:1b5366e5-1e95-4690-8af7-212dc206058d">
<processingStep description="Unprocessed message">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<string xmlns="http://tempuri.org/">Allen Lee</string>
</soap:Body>
</soap:Envelope>
</processingStep>
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Processed message">
<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsa:Action>http://tempuri.org/Log</wsa:Action>
<wsa:From>
<wsa:Address>http://localhost/session30/session.ashx</wsa:Address>
<wsa:ReferenceProperties>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<csfse:OriginalFrom xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">http://localhost/ClientServiceSite/ClientService.ashx</csfse:OriginalFrom>
<csfse:OriginalMessageID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:uuid:abe3c6f1-f7d8-4fcd-8812-45f4ba1a1930</csfse:OriginalMessageID>
</wsa:ReferenceProperties>
</wsa:From>
<wsa:MessageID>urn:uuid:1b5366e5-1e95-4690-8af7-212dc206058d</wsa:MessageID>
<wsa:To>http://localhost/ServerService/Service.asmx</wsa:To>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-b5d85790-bebd-4e96-b4a3-15a0227facf0">
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
<wsu:Expires>2006-10-16T15:37:16Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<string xmlns="http://tempuri.org/">Allen Lee</string>
</soap:Body>
</soap:Envelope>
</processingStep>
</outputMessage>
<outputMessage utc="10/16/2006 3:32:16 PM" messageId="urn:uuid:334f763f-1c48-4bec-bfb6-f43c33588b4e">
<processingStep description="Unprocessed message">
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<TerminateSessionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/" />
</env:Body>
</env:Envelope>
</processingStep>
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.OutputTraceFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.InternalUtils.TraceFilters.OutputTraceFilter" />
<processingStep description="Entering SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceOutputFilter" />
<processingStep description="Exited SOAP filter Microsoft.ConnectedServices.Sdk.Security.DynamicAssertionServiceOutputFilter" />
<processingStep description="Processed message">
<env:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<wsa:Action>http://Microsoft/ConnectedServices/2006/06/Session/TerminateSessionResponse</wsa:Action>
<wsa:From>
<wsa:Address>http://research-osdt.contoso.com/Session30/SessionManagerAdmin.ashx</wsa:Address>
</wsa:From>
<wsa:MessageID>urn:uuid:334f763f-1c48-4bec-bfb6-f43c33588b4e</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:2fa7c49e-e076-413b-b85d-cdcbe0231b9d</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-f1f86efe-dcbd-490e-b364-251fc9b09b06">
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
<wsu:Expires>2006-10-16T15:37:16Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</env:Header>
<env:Body>
<TerminateSessionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://Microsoft/ConnectedServices/2006/06/Session/" />
</env:Body>
</env:Envelope>
</processingStep>
</outputMessage>
</log>
The InputTrace.webinfo of ServerService is as follows:
<?xml version="1.0" encoding="utf-8"?>
<log>
<inputMessage utc="10/16/2006 3:32:16 PM" messageId="urn:uuid:1b5366e5-1e95-4690-8af7-212dc206058d">
<processingStep description="Unprocessed message">
<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsa:Action>http://tempuri.org/Log</wsa:Action>
<wsa:From>
<wsa:Address>http://localhost/session30/session.ashx</wsa:Address>
<wsa:ReferenceProperties>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<csfse:OriginalFrom xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">http://localhost/ClientServiceSite/ClientService.ashx</csfse:OriginalFrom>
<csfse:OriginalMessageID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:uuid:abe3c6f1-f7d8-4fcd-8812-45f4ba1a1930</csfse:OriginalMessageID>
</wsa:ReferenceProperties>
</wsa:From>
<wsa:MessageID>urn:uuid:1b5366e5-1e95-4690-8af7-212dc206058d</wsa:MessageID>
<wsa:To>http://localhost/ServerService/Service.asmx</wsa:To>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-b5d85790-bebd-4e96-b4a3-15a0227facf0">
<wsu:Created>2006-10-16T15:32:16Z</wsu:Created>
<wsu:Expires>2006-10-16T15:37:16Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<string xmlns="http://tempuri.org/">Allen Lee</string>
</soap:Body>
</soap:Envelope>
</processingStep>
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Exited SOAP filter Microsoft.Web.Services3.Security.Wse2PipelinePolicy+LegacyFilterWrapper" />
<processingStep description="Processed message">
<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<csfse:SessionID xmlns:csfse="http://Microsoft/ConnectedServices/2006/06/Session/">urn:639ab751-796b-4aa4-9c81-2ab4ab196281</csfse:SessionID>
</soap:Header>
<soap:Body>
<string xmlns="http://tempuri.org/">Allen Lee</string>
</soap:Body>
</soap:Envelope>
</processingStep>
</inputMessage>
</log>
This is a very long threat! The projects is just to test whether the message sent from client could be routed to the destination service. After the execution of the Client, the log.txt was created under C:, but inside the log file there was nothing! The session trace files and destination service input trace file indicated that message has been routed to the destination service. But why?
Another question is that how CSF passes messages to methods? Does it pass the whole message to a method or just the message body? Sometime I saw some service method defined its parameter as Message type, and sometime .NET primitive type. Which way is proper?

