Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with WCF client calling one-way operation
    text
    copied!<p>I have run into a problem when calling web service on a SAP PI bus from my WCF client. The operation is defined as one-way, and the method on my proxy operation contract is decorated accordingly when the service reference is added. However, the service client gets an exception when calling the according operation: </p> <p><strong><em>The one-way operation returned a non-null message with Action=''</em></strong></p> <p>Using SoapUI, the method on the bus can be called successfully, and it returns a SOAP envelope with an empty body. The bus people told me, this is according to the SOAP specs:</p> <hr> <p>(SOAP specs, chapter 4.7.9, One-way operations):</p> <p>There are differing interpretations of how HTTP is to be used when performing one-way operations. </p> <p><strong>R2714</strong> For one-way operations, an INSTANCE MUST NOT return a HTTP response that contains an envelope. Specifically, the HTTP response entity-body must be empty. </p> <p><strong>R2750</strong> A CONSUMER MUST ignore an envelope carried in a HTTP response message in a one-way operation. </p> <p><strong>R2727</strong> For one-way operations, a CONSUMER MUST NOT interpret a successful HTTP response status code (i.e., 2xx) to mean the message is valid or that the receiver would process it. </p> <hr> <p>So it seems, my WCF client doesn't comply with R2750.</p> <p>I have found out that when I force the operation contract on the proxy to be <em>IsOneWay = false</em>, everything works.</p> <p>Is there anything wrong with the way WCF handles one way operations or do I do something wrong (more likely)? Is there anything else I should do, it just doesn't seem right to override the generated WCF proxy client.</p> <p>Thanks for any suggestions.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload