The operation 'PRPA_IN201301UV02' could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of parameters.
我在控制台主机上运行 WCF,这是合同:
[MessageContract]
public class opRequest
{
[MessageBodyMember]
public string myProperty;
}
[ServiceContract(Namespace = "urn:hl7-org:v3")]
public interface IHL7v3
{
[OperationContract(Name = "PRPA_IN201301UV02", Action = "urn:hl7-org:v3:PRPA_IN201301UV02")]
string PIXManager_PRPA_IN201301UV02(opRequest clientID);
}
当我从 opRequest 类中删除[MessageContract]
and[MessageBodyMember]
我完全不确定这是否能让我得到我需要的东西,所以我会给出更广泛的范围 - 我试图让 SOAP 主体没有参数名称的封闭标记。例如(从 SOAP 消息中提取的正文)而不是:
<s:Body>
<PRPA_IN201301UV02 xmlns="urn:hl7-org:v3">
<clientID>the xml document is enclosed</clientID>
</PRPA_IN201301UV02>
我希望它是这样的:
<s:Body>
<PRPA_IN201301UV02 xmlns="urn:hl7-org:v3">
my given xml document will go here...
</PRPA_IN201301UV02>
我需要这样才能符合标准(HL7v3 PIX Manager SOAP Web Service)。
有任何想法吗?