Reason .net WCF client for using RPC / encoded instead of Document / Literal / Wrapped using Delphi service

I have a .Net WCF client / proxy built on top of the Delphi service. The Delphi service provides SOAP messages in a format that my client was unable to process.

Based on the guide given here: Delphi SOAP Envelope and WCF I realized that WCF expects the Document / Literal / Wrapped style to become serializable. As it turned out, the Delphi service uses "rpc" as its style.

I cannot force the delphi service to change my style.

Is there a way I can tell the WCF client to use "rpc" instead.

For reference, here is the Delphi service I'm building with: http://www.tntschools.com/AkiTimeTableService/wsdl/ICourses

+5
source share
1 answer

When adding a link to the service in this way, each generated message contract is executed similarly to the following:

[DebuggerStepThrough]
[GeneratedCode( "System.ServiceModel", "4.0.0.0" )]
[MessageContract( WrapperName = "GetCourseList", WrapperNamespace = "urn:CoursesIntf-ICourses",
    IsWrapped = true )]
public partial class GetCourseListRequest
{
    [MessageBodyMember( Namespace = "", Order = 0 )]
    public string licence;

    public GetCourseListRequest()
    {
    }

    public GetCourseListRequest( string licence )
    {
        this.licence = licence;
    }
}

Each generated operating contract is executed similarly to the following:

[GeneratedCode( "System.ServiceModel", "4.0.0.0" )]
[ServiceContract( ConfigurationName = "ServiceReferences.ICourses" )]
public interface ICourses
{
    [OperationContract( Action = "urn:CoursesIntf-ICourses#GetCourseList", ReplyAction = "*" )]
    [XmlSerializerFormat( Style = OperationFormatStyle.Rpc, SupportFaults = true,
        Use = OperationFormatUse.Encoded )]
    [ServiceKnownType( typeof( TCourse ) )]
    GetCourseListResponse GetCourseList( GetCourseListRequest request );

    // Remaining operation contracts omitted
}

Check Reference.csto see if your messages and work contracts are the same. If they are, the problem lies elsewhere. An exception message would be useful for tracking the problem (for example, it could be the order of the elements in the returned SOAP message).

+4
source

All Articles