无法在C#中镜像Soap Sample

时间:2019-03-04 10:36:21

标签: c# soap

我有一个导入的WSDL文件,我试图使用该文件来生成一个Soap请求。 我正在使用.NetCore,并想使用

生成文件
  

https://devzone.channeladam.com/library/channeladam-soap/

当我生成请求时,虽然没有生成“ WrapperName”,而是输出了类名“ FileRequest”!有办法强迫这种行为吗?

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.2-preview-20726-1305")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "https://services/Returns", IncludeInSchema = true)]
[System.ServiceModel.MessageContractAttribute(WrapperName="File", WrapperNamespace="https://services/Returns/", IsWrapped=true)]
public partial class FileRequest
{

    [System.ServiceModel.MessageBodyMemberAttribute(Namespace="https://services/Returns/", Order=0)]
    [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
    public ReturnsEI.FileRequestType ReturnFileRequestMsg;

创建请求:

     string envelopeXml = SoapBuilder.CreateSoap12Envelope()
           .WithHeader.AddAction(@"https://services/File")
           .WithBody.AddEntry(CreateTestfileRequest())
           .Build()
           .ToString();

0 个答案:

没有答案