WS-Compression for WSE 3

I had received some mails asking me for a version of WS-Compression for WSE 3, and here is finally!
The code includes a complete example of use.

Technorati tags: ,

Print | posted on Tuesday, February 07, 2006 7:21 PM

Feedback

# re: WS-Compression for WSE3

left by Pham Hung at 2/18/2006 11:38 AM Gravatar
Great work! Thanks alot!

# re: WS-Compression for WSE3

left by Dave at 3/22/2006 11:36 AM Gravatar
does this work with other policy assertions?

I get an error with a certificate assertion...

<processingStep description="Entering SOAP filter Microsoft.Web.Services3.Design.MutualCertificate11Assertion+ClientOutputFilter" />
<processingStep description="Exception thrown: WSE910: An error happened during the processing of a response message, and you can find the error in the inner exception. You can also find the response message in the Response property."> at Microsoft.Web.Services3.Messaging.SoapClient.SendRequestResponse(String methodname, SoapEnvelope envelope)
at Microsoft.Web.Services3.Security.SecurityTokenServiceClient.RequestSecurityToken(SecurityTokenMessage request, String methodName)
at Microsoft.Web.Services3.Security.SecurityContextTokenServiceClient.RequestSecurityContextToken(AppliesTo appliesTo)
at Microsoft.Web.Services3.Security.SecurityContextTokenServiceClient.IssueSecurityContextToken(AppliesTo appliesTo)
at Microsoft.Web.Services3.Security.Tokens.SecurityContextTokenManager.RequestTokenFromIssuer(EndpointReference tokenIssuer, String tokenType, AppliesTo appliesTo, Policy policy, SoapProtocolVersion soapVersion, StateManager messageState, StateManager operationState, StateManager sessionState)
at Microsoft.Web.Services3.Security.SecureConversationClientSendSecurityFilter.EstablishSecureConversation(SoapEnvelope envelope)
at Microsoft.Web.Services3.Security.SecureConversationClientSendSecurityFilter.SecureMessage(SoapEnvelope envelope, Security security)
at Microsoft.Web.Services3.Security.SendSecurityFilter.ProcessMessage(SoapEnvelope envelope)
at Microsoft.Web.Services3.Pipeline.ProcessOutputMessage(SoapEnvelope envelope)</processingStep>

# re: WS-Compression for WSE3

left by Rodolfo Finochietti at 3/22/2006 3:05 PM Gravatar
Hi Dave, I have used ws-compression together with other policy
assertions. Could you send me your project to revise it?

# re: does this work with other policy assertions?

left by Alan at 4/13/2006 5:00 AM Gravatar
When ws-compression is used together with MutualCertificate11Assertion and establishSecurityContext is set true, ws-compression compresses RequestSecurityTokenResponse then MutualCertificate11Assertion get wrong token. I am looking for the solution other than setting establishSecurityContext false.

# re: does this work with other policy assertions?

left by Rodolfo Finochietti at 4/26/2006 5:25 PM Gravatar
Hello Alan, I thank you to find this bug. As soon as I have time I will try to correct it.

# WS-Compression for WSE 3 Update

left by rodolfo@blog at 7/25/2006 9:02 AM Gravatar
Today I upgrade WS-compression for WSE3 with a new constructor in the class CompressionAssertion. This constructor allows to set the compression policy by code without necessity of configuration file. Thanks to Kenny Lamoot for this idea.

# re: WS-Compression for WSE 3

left by Stuart Allen at 8/30/2006 10:46 AM Gravatar
In sample project, the policy file cannot be loaded, it gives this error:

Failed parsing the policy document. Could not load file or assembly 'WSCompression' or one of its depenencies.

What am I missing??

# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 8/30/2006 11:38 AM Gravatar
Hi, I execute the same example without problems...

Check that the reference path to the assembly WSCompression in the project is correct.

# WS-Compression for WCF

left by Pablo M. Cibraro (aka Cibrax) at 9/13/2006 9:44 AM Gravatar
Ihave developed a new WS-Compression implementation for WCF. Thiscode is based on the WSE 3.0 implementation

# re: WS-Compression for WSE 3

left by Michael Proctor at 4/1/2007 11:37 AM Gravatar
Any readme? Does the DLL automatically Compress any WebMethods that get called from the WebService?

I have used a previous WSCompression from http://weblogs.asp.net/pglavich/archive/2004/01/24/62475.aspx and it required an attribute to be put on each method.

Surely it isn't as easy as just enabling WSE3 on both projects (Client and WebService) and place the DLL in references?

If you could just pop me a quick hullo to itsupport {@} ntd.com.au that would be great. I just wish the whole compression thing was a "built-in" part of the Framework. But people like you guys make our lives sooo much easier.

Cheers,

Michael Proctor

# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 4/3/2007 9:15 PM Gravatar
Hi Michael,

In my version of WS-Compression it is not necessary to include any attribute in the WebMethods. It is only necessary to configure two policy to activate the compression.

A complete example of use is inside of the distribution zip.

For any doubt contact me.

# re: WS-Compression for WSE 3

left by a beginner at 5/1/2007 2:37 AM Gravatar
Thanks for the excellent work!

can u give me a example for multi parater on client side ... ?

because I am a beginner.

BTW, sorry for my poor English.

# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 5/1/2007 8:13 AM Gravatar
Hi, Thanks for your comments!

A complete sample of use is included in the distribution zip.

# about WS-Compression for WSE 3

left by a beginner at 5/1/2007 9:32 PM Gravatar

I dont kown how to write a function in AppClient.cs which has multi parameter.

[SoapMethod( "SomeOperation" )]
public string SomeOperation( string data1, string data2, int count )
{
// ????
}

-----------------------------------------
http://prototypes.shockbyte.com.ar/misc/WSCompression3.zip

# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 5/2/2007 9:09 AM Gravatar
Sorry, I do not understand what is the problem...

Can you give me more details about this concern?

# re: WS-Compression for WSE 3

left by Michael Proctor at 5/14/2007 1:19 AM Gravatar
Nearly there, still having issues though, I finally worked out the bits and pieces I was missing out of your example.

I have set:
WebService side :-
1) copied the policyCache.config to the root of the webservice
2) Added to the web.config
<microsoft.web.services3>
<diagnostics>
<trace enabled="true" input="inputtrace.webinfo" output="outputtrace.webinfo"/>
</diagnostics>
<policy fileName="policyCache.config"/>
</microsoft.web.services3>
3) Added the attribute to the webservice class
<Policy("ServerPolicy")> _
4) Added references to the WSCompression.DLL
5) Added to the webservice class file
Imports WSCompression
Imports Microsoft.Web.Services3
Imports Microsoft.Web.Services3.Messaging

Then in the client
1) copied the policyCache.config to the root of the appliccation
2) Added into the app.config
<microsoft.web.services3>
<diagnostics>
<trace enabled="true" input="inputtrace.webinfo" output="outputtrace.webinfo"/>
</diagnostics>
<policy fileName="policyCache.config" />
</microsoft.web.services3>
3) Added to the startup class in my app
<Policy("ClientPolicy")> _
4) Added to main class
Imports Microsoft.Web.Services3
Imports WSCompression


Now I get soap header compression was not understood exception when I try and invoke a webmethod, any ideas?

# re: WS-Compression for WSE 3

left by Michael Proctor at 5/14/2007 1:57 AM Gravatar
I think I just noticed my problem however I have no idea how to fix it :(

In your test app it the policy attribute isn't on the main app but the actually SOAP client itself, the problem I have is I use WSDL to have my SOAPClient generated. How can I have the Web Reference that gets updated by WSDL to have this attribute. I cannot seem to find the code for the proxy class in the project.

Thanks for your help.

# re: WS-Compression for WSE 3

left by Michael Proctor at 5/14/2007 7:44 PM Gravatar
I think I may have worked it out, except I am having problems with the WSE3 addin for VS2005, I noticed on some other websites about using servicewse.setpolicy for policy assertion on proxy generated classes. the drama is my VS2005 is doing the wse3wsdl so I am only getting service and no option for servicewse, I have just tried re-installing and trying to get this to work however I think that will solve the problem, thanks again for your help and if you have any suggestions please drop me a line. ta

# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 5/15/2007 8:09 AM Gravatar
Try reinstalling the WSE 3 add-in. Proxies can also be generated "manually" with the wse3wsdl.exe command line tool included in the WSE 3 instalation directory.

To configure the compression policy you should use the SetPolicy method of the generated proxy.

# re: WS-Compression for WSE 3

left by Dominic Williams at 6/10/2007 5:58 AM Gravatar
Firstly, thank you for this work!

But please can I urge you to make a few simple updates to the download that could make this project much more useful to other developers, and save a lot of time.

These would be:

1. An example showing how a client application can call a web service method that has multiple parameters e.g.
public string SomeOperation( string param1, Class1 param2 )

2. A complete Web service, complete with all necessary files - for example, Test Site references Service.ashx but it is not included.

Many thanks.


# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 6/16/2007 12:31 AM Gravatar
Hi dominic,

Thank you for the suggestions!. When I have some time I will write a more complete sample.

# re: WS-Compression for WSE 3

left by Chirag Dave at 7/4/2007 7:48 PM Gravatar
A very good job done…
Kindly get us few hints for how to support the implementation of multiple parameter method call using your AppClient code…

# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 7/15/2007 2:46 AM Gravatar
Hi Chirag,

Unfortunately in WSE 3 the Web Services based on SoapService don't support multiple parameters. You have to use an DTO object to encapsulate the transport of the parameters, or use SoapReceiver. The compression policy works with SoapService or SoapReceiver.

# Compression over WCF channels

left by Noticias externas at 8/9/2007 2:11 PM Gravatar
Hey guys, it&amp;#39;s been a while. Easy questions, I want to compress the&#160;data sent over the wire but haven&amp;#39;t

# re: WS-Compression for WSE 3

left by Gavin Sinai at 1/15/2008 7:17 AM Gravatar
Hi

Is it possible to have optional compression? I.e. the server gives the client the option of using compression, the client does not neccesarily have to use the option.

Regards

Gavin

# re: WS-Compression for WSE 3

left by Rodolfo Finochietti at 1/15/2008 8:43 AM Gravatar
Hi Gavin,

The actual implementation of WS-Compression not support the feature that you need, but is possible to modified then for support another more complex compression protocol.

# re: WS-Compression for WSE 3

left by skidzTweak at 6/2/2008 3:40 AM Gravatar
I got this working great... thx, was not to hard to implement. Before I tried this, I tried to get iis 6.0 compression to work for me. Got responses to compress, but could not figure out how to compress the upload myself, so I implemented this instead and works great.
Title  
Name
Email (never displayed)
Url
Comments   
Please add 4 and 7 and type the answer here: