次のようなコードがあります。
<OperationContract()>
<Description("")>
<WebGet(Bodystyle:=WebMessageBodyStyle.Bare, UriTemplate:="TestConnection")>
Function TestConnection() As String
Public Function TestConnection() As String Implements ITestSvc.TestConnection
WebOperationContext.Current.OutgoingResponse.ContentType = "text/plain"
Return "Connection Success"
End Function
しかし、それは戻ります<string xmlns='...'>Connection Success</string>
XMLラッパーなしで「接続成功」のみを返すにはどうすればよいですか。MessageEncoder で何かできることはわかっています。しかし、操作レベルで利用できるようにしたいです (特定の操作には XML/JSON ラッパーが必要で、特定の操作には必要ありません)。
誰でもこれについて私を助けることができますか?