0

I have an old asmx web service which reads SOAP and send back data. I am trying to convert the web service to WCF service.

The problem am having is that the request i am receiving is in RPC.Encoded format. </ns1:create> SPCR2023-00033-01application/pdffalse2023-03-16 ...etc

In WCF, I created the message contract [MessageContract] public class Document { [MessageBodyMember] public string[] Keys; [MessageBodyMember] public string IdentifierDisplay; [MessageBodyMember] public string contextType;....

The problem here is that it cannot read the request and getting object reference error. string module = document.Keys[1];

But the wcf works in test client and soap. The source cannot change their format.

What should I Change to make it work. Is there a way to decode the soap and put it in the format WCF expects.

Any help is appreciated.

VKM
  • 1
  • 3
  • Take a look at the solution in [this case](https://answers.sap.com/questions/11476917/wcf-webservice-with-rpcencoding.html). – Jiayao Mar 23 '23 at 06:42
  • That did not help any other reccomendation – VKM Apr 12 '23 at 23:17
  • What kind of binding did you use and it's better to post the app.config if you could. And the class [FaultContractAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.servicemodel.faultcontractattribute?view=dotnet-plat-ext-7.0&redirectedfrom=MSDN) specifies one or more SOAP faults that are returned when a service operation encounters processing errors. This may help you locate the problem. – Jiayao Aug 14 '23 at 09:27

0 Answers0