简体   繁体   English

没有Soap Wrapper的Web服务响应

[英]Webservice Response without Soap Wrapper

Whenever you call any webservice in response it will include the response with the soap wrapper in it. 每当您调用任何Web服务作为响应时,它将在其中包含带有肥皂包装的响应。 Is there any way we can return webservice response without any soap wrapper. 有什么方法可以在没有任何肥皂包装的情况下返回Web服务响应。

eg This is what soap response looks like: 例如,这是肥皂反应的样子:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <getEmployeeListResponse xmlns="http://test.com/Employee/">
            <getEmployeeListResult>
                <EmployeeLookup>
                    <Employee>                  
                        <Id>123</Id>
                        <Name>John</Name>
                    </Employee>
                    <Employee>
                        <Id>325</Id>
                        <Name>Henry</Name>
                    </Employee>
                </EmployeeLookup>
            </getEmployeeListResult>
        </getEmployeeListResponse>
    </soap:Body>
</soap:Envelope>

And i want something like this: 我想要这样的东西:

<EmployeeLookup>
    <Employee>                  
        <Id>123</Id>
        <Name>John</Name>
    </Employee>
    <Employee>
        <Id>325</Id>
        <Name>Henry</Name>
    </Employee>
</EmployeeLookup>

Just wanted to know if it is possible through webservice or not? 只想知道是否可以通过网络服务? Thanks 谢谢

据我所知,服务响应将始终具有soap标头,您必须从响应流中提取主体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM