Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用C从SOAP信封检索数据的LINQ查询_C#_Linq_Web Services_Soap - Fatal编程技术网

C# 使用C从SOAP信封检索数据的LINQ查询

C# 使用C从SOAP信封检索数据的LINQ查询,c#,linq,web-services,soap,C#,Linq,Web Services,Soap,我试图对web服务调用SOAP调用,并检索记录。我能够检索命名空间b中的记录。但无法进一步从命名空间c或d检索。在下面的示例中,我创建了一个XDocument,它是一个SOAP信封。这是从web服务调用方法或函数。它正在生成多个记录。我想显示城市和州以及名称 <s:Envelope> <s:Header> <h:MessageHeader></h:MessageHeader> </s:

我试图对web服务调用SOAP调用,并检索记录。我能够检索命名空间b中的记录。但无法进一步从命名空间c或d检索。在下面的示例中,我创建了一个XDocument,它是一个SOAP信封。这是从web服务调用方法或函数。它正在生成多个记录。我想显示城市和州以及名称

<s:Envelope>
    <s:Header>
        <h:MessageHeader></h:MessageHeader>             
    </s:Header>
    <s:Body>

    <a:Name>ABC</a:AccountName>
    <a:Value xmlns:b='http://'>
        <b:Address xmlns:c='http://'>
            <c:City>Mumbai</c:City>
            <c:CountryCode i:nil='true'/>
            <c:County i:nil='true'/>
            <c:StateOrProvinceCode>MH</c:StateOrProvinceCode>
            <c:Street1>120 ABCD</c:Street1>
            <c:Street2 i:nil='true'/>
            <c:ZipOrPostalCode i:nil='true'/>
        </b:Address>
    </s:Body>
</s:Envelope>
如果:

.Element(e+"Get_Eesponse")
是这样的:

.Element(e+"Get_Response")
而不是:

p.element("city")
应该是这样的:

p.Element(c+"City")

请发布完整的文档,而不仅仅是信封元素。另外,请说明你是如何定义s、e、b等的。我更新了你提到的行。但是找不到错误“Where”
p.Element(c+"City")