By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,903 Members | 1,647 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,903 IT Pros & Developers. It's quick & easy.

How do I deploy a SOAP extension on the client proxy

P: n/a
Hi,

I understand that we can install SOAP extensions through web.config at the
server side. How do I install them at the client proxy side?

Thank you,

Alan


Nov 23 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Hi Alan,

For SOAPExtension, of course if can be used at both serverside and
clientside (for .net webservice implementation). And the configuration of
soapExtension at clientside proxy is just like we do in asp.net server
application. We can register the SoapExtension through:
1. client application's app.config file, for example:
==============
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>

<add type="SimpleExtensionLib.ReverseMessageExtension,
SimpleExtensionLib"
priority="3"
group="0" />

<add type="SimpleExtensionLib.LogMessageExtension, SimpleExtensionLib"
priority="4"
group="0" />

</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
==============
2. Also, we can apply soapExtension for individual webmethod in proxy class
by directly applying our cutsom ExtensionAttirbute on the webmethod in the
autogenerated proxy source file, like:
=================

[SimpleExtensionLib.ReverseMessageExtension(Priorit y=1)]
public string HelloWorld() {
object[] results = this.Invoke("HelloWorld", new object[0]);
return ((string)(results[0]));
}
=================
Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
Subject: How do I deploy a SOAP extension on the client proxy
Date: Tue, 13 Sep 2005 10:41:37 -0400
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <ue**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7879
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,

I understand that we can install SOAP extensions through web.config at the
server side. How do I install them at the client proxy side?

Thank you,

Alan

Nov 23 '05 #2

P: n/a
Hi Steven,

Thank you for reply.

I have to use the second method for the client proxy, because only a few of
my proxy methods need to have the extension functionality.

The problem is that the proxy class is being generated by IDE, therefore any
change that I apply to the proxy web methods are being replaced by new code
when we update the web reference.

Do you any remedy for that problem?

Regards,

Alan

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:Oe*************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

For SOAPExtension, of course if can be used at both serverside and
clientside (for .net webservice implementation). And the configuration of
soapExtension at clientside proxy is just like we do in asp.net server
application. We can register the SoapExtension through:
1. client application's app.config file, for example:
==============
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>

<add type="SimpleExtensionLib.ReverseMessageExtension,
SimpleExtensionLib"
priority="3"
group="0" />

<add type="SimpleExtensionLib.LogMessageExtension, SimpleExtensionLib"
priority="4"
group="0" />

</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
==============
2. Also, we can apply soapExtension for individual webmethod in proxy
class
by directly applying our cutsom ExtensionAttirbute on the webmethod in the
autogenerated proxy source file, like:
=================

[SimpleExtensionLib.ReverseMessageExtension(Priorit y=1)]
public string HelloWorld() {
object[] results = this.Invoke("HelloWorld", new object[0]);
return ((string)(results[0]));
}
=================
Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
Subject: How do I deploy a SOAP extension on the client proxy
Date: Tue, 13 Sep 2005 10:41:37 -0400
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <ue**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7879
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi,

I understand that we can install SOAP extensions through web.config at the
server side. How do I install them at the client proxy side?

Thank you,

Alan


Nov 23 '05 #3

P: n/a

Yes, this is a real pain. What I ended up doing was writing a small utility
which
(using regular expressions) modifies the auto-generated proxy file with
the custom changes I needed. The developer has to remember to run this
utility each time after the proxy is auto-generated.

HTH,
Stephen
"A.M-SG" <al******@newsgroup.nospam> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...

The problem is that the proxy class is being generated by IDE, therefore
any change that I apply to the proxy web methods are being replaced by new
code when we update the web reference.

Nov 23 '05 #4

P: n/a
Hi Alan,

Yes, the problem you mentioned is an existing limiation for the
webservice's auto generated proxy from VS.NET/WSDL.EXE. Currently we
haven't any good means to prevent this, just need to modify them after the
autogenerated code complete. Also, the workaround stephen mentioned may
also be a possible means to help if there're any webmethods need to apply
the SoapExtension attribute in your proxy.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "Stephen Ahn" <noaddress_at_noaddress.com>
References: <ue**************@TK2MSFTNGP09.phx.gbl>
<Oe*************@TK2MSFTNGXA01.phx.gbl>
<OL**************@tk2msftngp13.phx.gbl>
Subject: Re: How do I deploy a SOAP extension on the client proxy
Date: Thu, 15 Sep 2005 10:07:10 +1000
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <u7**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: cpe-144-137-91-83.nsw.bigpond.net.au 144.137.91.83
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
microsoft.public.dotnet.framework.webservices:7902
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Yes, this is a real pain. What I ended up doing was writing a small utility
which
(using regular expressions) modifies the auto-generated proxy file with
the custom changes I needed. The developer has to remember to run this
utility each time after the proxy is auto-generated.

HTH,
Stephen
"A.M-SG" <al******@newsgroup.nospam> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...

The problem is that the proxy class is being generated by IDE, therefore
any change that I apply to the proxy web methods are being replaced by new code when we update the web reference.


Nov 23 '05 #5

P: n/a
Thank you Steven.

Now I know that I am not missing any technique.

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:tk*************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

Yes, the problem you mentioned is an existing limiation for the
webservice's auto generated proxy from VS.NET/WSDL.EXE. Currently we
haven't any good means to prevent this, just need to modify them after the
autogenerated code complete. Also, the workaround stephen mentioned may
also be a possible means to help if there're any webmethods need to apply
the SoapExtension attribute in your proxy.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "Stephen Ahn" <noaddress_at_noaddress.com>
References: <ue**************@TK2MSFTNGP09.phx.gbl>
<Oe*************@TK2MSFTNGXA01.phx.gbl>
<OL**************@tk2msftngp13.phx.gbl>
Subject: Re: How do I deploy a SOAP extension on the client proxy
Date: Thu, 15 Sep 2005 10:07:10 +1000
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <u7**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: cpe-144-137-91-83.nsw.bigpond.net.au 144.137.91.83
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7902
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Yes, this is a real pain. What I ended up doing was writing a small
utility
which
(using regular expressions) modifies the auto-generated proxy file with
the custom changes I needed. The developer has to remember to run this
utility each time after the proxy is auto-generated.

HTH,
Stephen
"A.M-SG" <al******@newsgroup.nospam> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...

The problem is that the proxy class is being generated by IDE, therefore
any change that I apply to the proxy web methods are being replaced by

new
code when we update the web reference.


Nov 23 '05 #6

P: n/a
You're welcome Alan,

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
From: "A.M-SG" <al******@newsgroup.nospam>
References: <ue**************@TK2MSFTNGP09.phx.gbl>
<Oe*************@TK2MSFTNGXA01.phx.gbl>
<OL**************@tk2msftngp13.phx.gbl>
<u7**************@TK2MSFTNGP09.phx.gbl>
<tk*************@TK2MSFTNGXA01.phx.gbl>
Subject: Re: How do I deploy a SOAP extension on the client proxy
Date: Thu, 15 Sep 2005 09:09:15 -0400
Lines: 73
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <eo**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: 199.71.241.10
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
microsoft.public.dotnet.framework.webservices:7910
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Thank you Steven.

Now I know that I am not missing any technique.

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:tk*************@TK2MSFTNGXA01.phx.gbl...
Hi Alan,

Yes, the problem you mentioned is an existing limiation for the
webservice's auto generated proxy from VS.NET/WSDL.EXE. Currently we
haven't any good means to prevent this, just need to modify them after the
autogenerated code complete. Also, the workaround stephen mentioned may
also be a possible means to help if there're any webmethods need to apply
the SoapExtension attribute in your proxy.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "Stephen Ahn" <noaddress_at_noaddress.com>
References: <ue**************@TK2MSFTNGP09.phx.gbl>
<Oe*************@TK2MSFTNGXA01.phx.gbl>
<OL**************@tk2msftngp13.phx.gbl>
Subject: Re: How do I deploy a SOAP extension on the client proxy
Date: Thu, 15 Sep 2005 10:07:10 +1000
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <u7**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: cpe-144-137-91-83.nsw.bigpond.net.au 144.137.91.83
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.webservices:7902
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Yes, this is a real pain. What I ended up doing was writing a small
utility
which
(using regular expressions) modifies the auto-generated proxy file with
the custom changes I needed. The developer has to remember to run this
utility each time after the proxy is auto-generated.

HTH,
Stephen
"A.M-SG" <al******@newsgroup.nospam> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...

The problem is that the proxy class is being generated by IDE, therefore
any change that I apply to the proxy web methods are being replaced by

new
code when we update the web reference.



Nov 23 '05 #7

P: n/a
Hi,

I found this article that may be what you are looking for:
http://msdn2.microsoft.com/en-us/library/x4s9z3yc

I am having the same issue and I am going to try the method described in the
article.

Good Luck,

Jim

"A.M-SG" wrote:
Hi,

I understand that we can install SOAP extensions through web.config at the
server side. How do I install them at the client proxy side?

Thank you,

Alan


Nov 23 '05 #8

P: 1
can i have the copy of that utility to add my customer attribute please.

thanx

faheem

Yes, this is a real pain. What I ended up doing was writing a small utility
which
(using regular expressions) modifies the auto-generated proxy file with
the custom changes I needed. The developer has to remember to run this
utility each time after the proxy is auto-generated.

HTH,
Stephen


"A.M-SG" <alanalan@newsgroup.nospam> wrote in message
news:OLHKuVWuFHA.2792@tk2msftngp13.phx.gbl...[color=blue]
>
> The problem is that the proxy class is being generated by IDE, therefore
> any change that I apply to the proxy web methods are being replaced by new
> code when we update the web reference.
>
>[/color]
Apr 21 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.