Re: WcfFacility on client side produces wrong Soap-Actions

88 views
Skip to first unread message

Craig Neuwirt

unread,
Aug 29, 2012, 8:47:53 AM8/29/12
to castle-pro...@googlegroups.com
Not sure off top of my head.  Any chance of duplicating this in a small test so I can run it?


On Aug 28, 2012, at 7:27 AM, Hanno wrote:

Hy,
we are facing a problem when using WcfFacility on the client side with a Service which is derived from a common base interface.

This is a part of our base interface:

    [ServiceContract]
    public interface IEditableService<TEntity>
    {
        [OperationContract]
        IEnumerable<TEntity> SaveAndReturn(IEnumerable<TEntity> entities);
    }


Our Service will then extend the base interface and provide additional operations:

    [ServiceContract]
    public interface IInstallationService: IEditableService<Installation>
    {
   ... some additional operations go here
    }

Part of the WSDL after deploying the IInstallationService on IIS:

<wsdl:operation name="SaveAndReturn">
    <wsdl:input wsaw:Action="http://tempuri.org/IEditableServiceOf_Installation/SaveAndReturn" message="tns:IInstallationService_SaveAndReturn_InputMessage"/>
    <wsdl:output wsaw:Action="http://tempuri.org/IEditableServiceOf_Installation/SaveAndReturnResponse" message="tns:IInstallationService_SaveAndReturn_OutputMessage"/>
</wsdl:operation>


When using a Service Reference generated by VS everything seems fine and the Service is workable with the generated class.
Part of generated Reference.cs:

System.Collections.Generic.List<Installation> SaveAndReturn(System.Collections.Generic.List<Installation> entities);


But when using the WcfFacility on the client side the Dynamic Proxy generated by Castle will produce invalid Soap requests and we get the following error:

The message with Action 'http://tempuri.org/IEditableService_x0060_1/SaveAndReturn' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

Note the strange part in the action. Instead of the expected 'IEditableServiceOf_Installation' we get 'IEditableService_x0060_1'.

Any idea why the action is malformed when we are using WcfFacility?


Regards,
Hanno

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/castle-project-users/-/0ksLJZJGKWQJ.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.

Hanno

unread,
Aug 30, 2012, 2:53:31 AM8/30/12
to castle-pro...@googlegroups.com
Attached you can find a VS-solution reproducing the error (see Program.cs).

It seems that the abstract implementation of the parent interface introduces the bug...


Thanks for checking this out,
Hanno
To unsubscribe from this group, send email to castle-project-users+unsub...@googlegroups.com.
WcfTest.rar

Hanno

unread,
Sep 10, 2012, 2:18:07 AM9/10/12
to castle-pro...@googlegroups.com
Any update on this issue?

Regards,
Hanno


Craig Neuwirt

unread,
Sep 10, 2012, 1:08:06 PM9/10/12
to castle-pro...@googlegroups.com
Haven't had a chance to look it at it yet. I'll try and look at it this week.

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.

To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages