question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to create channel when operation is using typed messages with RPC/Encoded

See original GitHub issue

I’m trying to consume a service that requires an operation to be attributed with RPC / Encoded. This is an example: [XmlSerializerFormatAttribute(Style=OperationFormatStyle.Rpc, SupportFaults=true, Use=OperationFormatUse.Encoded)] PingResponse Ping(PingRequest request);

When trying to create a channel of a service that implements the above operation I get the SFxTypedMessageCannotBeRpcLiteral error.

This may be due to the XmlSerializerOperationFormatter constructor passing isEncoded as false to the base class constructor (OperationFormatter), instead of using info from xmlSerializerFormatAttribute.

public XmlSerializerOperationFormatter(OperationDescription description, XmlSerializerFormatAttribute xmlSerializerFormatAttribute, MessageInfo requestMessageInfo, MessageInfo replyMessageInfo) : base(description, xmlSerializerFormatAttribute.Style == OperationFormatStyle.Rpc, false/*isEncoded*/) { _requestMessageInfo = requestMessageInfo; _replyMessageInfo = replyMessageInfo; }

Is RPC/Encoded not supported?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
SajithLakjayacommented, May 21, 2019

Resolved the issue by update of System.ServiceModel.* to 4.5.3

8reactions
Dedruscommented, May 13, 2019

I got this error on new netcoreapp2.2 project, and resolved it with update of nuget packages(System.ServiceModel.*) from 4.4.0 to 4.5.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service Framework - WCF
The specified part in the specified message cannot be exported with RPC or encoded because its type is anonymous.
Read more >
Dealing with SOAP encoding in RPC/Encoded Web Service
I can't manage to create code from WSDL that is in RPC/encoded style - does anyone know which framewok can do that?
Read more >
RabbitMQ tutorial - Remote procedure call (RPC)
This pattern is commonly known as Remote Procedure Call or RPC. In this tutorial we're going to use RabbitMQ to build an RPC...
Read more >
NetWorker 19.7 Error Message Guide | Dell US
RPC error: RPC cannot encode arguments. (376, 341). Type. Notification ... Some type of interference occurred during the transfer of data between the...
Read more >
WSWS
Explanation, Could not create output WSDL file. ... When the use is encoded, parts must be type parts. ... WSWS3507I: Creating channel chain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found