That's great and works as expected. I'm able to get the context from the
soap envelope and stuff in my keys. The only issue i'm having now is that
then the call comes back from the service, i want to verify a custom security
token (this is still in my derived SoapClient class). Does the context in
the SoapEnvelope work the same for ResponseSoapContext? I tried using
ResponseSoapContext.Current here, but didn't work. In short, I just want to
ensure that SoapEnvelope.context can be used for both the request and
response context.
Thanks again.
[quoted text, click to view] "Lucien" wrote:
> There's an example in TcpSyncStockService (you need to use context on
> envelope):
>
> // Example:
>
> // SoapEnvelope e = new SoapEnvelope();
>
> // e.SetBodyObject(message);
>
> // KerberosToken k = new KerberosToken("host/" +
> System.Net.Dns.GetHostName() );
>
> // e.Context.Security.Tokens.Add(k);
>
> // e.Context.Security.Elements.Add(new Signature(k));
>
> // return (StockQuotes)base.SendRequestResponse("GetStockQuotes",
> e).GetBodyObject(typeof(StockQuotes));
>
>
>
> "WSE_Developer" <WSEDeveloper@discussions.microsoft.com> wrote in message
> news:1F7E68CC-07C0-4EFF-928D-392267FF33C6@microsoft.com...
> > Hello all,
> > I'm building a TCP web service using SoapClient/SoapService as my base
> > proxy and WS classes, and need to stuff in a Username token on the client
> > side. Problem is, the RequestSoapContext.Current object is null on the
> proxy
> > side. Am I doing something wrong here? What do i need to do to add
> security
> > tokens to a TCP web service using SoapClient? Any help would be greatly
> > appreciated.
> >
> > Thanks!
>
>
Yes it works the same may. Access the context of the returned SoapEnvelope.
[quoted text, click to view] "WSE_Developer" <WSEDeveloper@discussions.microsoft.com> wrote in message
news:60609446-D6C4-47EA-8C04-2E40831951D4@microsoft.com...
> That's great and works as expected. I'm able to get the context from the
> soap envelope and stuff in my keys. The only issue i'm having now is that
> then the call comes back from the service, i want to verify a custom
security
> token (this is still in my derived SoapClient class). Does the context in
> the SoapEnvelope work the same for ResponseSoapContext? I tried using
> ResponseSoapContext.Current here, but didn't work. In short, I just want
to
> ensure that SoapEnvelope.context can be used for both the request and
> response context.
>
> Thanks again.
>
> "Lucien" wrote:
>
> > There's an example in TcpSyncStockService (you need to use context on
> > envelope):
> >
> > // Example:
> >
> > // SoapEnvelope e = new SoapEnvelope();
> >
> > // e.SetBodyObject(message);
> >
> > // KerberosToken k = new KerberosToken("host/" +
> > System.Net.Dns.GetHostName() );
> >
> > // e.Context.Security.Tokens.Add(k);
> >
> > // e.Context.Security.Elements.Add(new Signature(k));
> >
> > // return (StockQuotes)base.SendRequestResponse("GetStockQuotes",
> > e).GetBodyObject(typeof(StockQuotes));
> >
> >
> >
> > "WSE_Developer" <WSEDeveloper@discussions.microsoft.com> wrote in
message
> > news:1F7E68CC-07C0-4EFF-928D-392267FF33C6@microsoft.com...
> > > Hello all,
> > > I'm building a TCP web service using SoapClient/SoapService as my
base
> > > proxy and WS classes, and need to stuff in a Username token on the
client
> > > side. Problem is, the RequestSoapContext.Current object is null on
the
> > proxy
> > > side. Am I doing something wrong here? What do i need to do to add
> > security
> > > tokens to a TCP web service using SoapClient? Any help would be
greatly
> > > appreciated.
> > >
> > > Thanks!
> >
> >
> >