如何在ASMX中更改/编辑SOAP响应

时间:2017-09-14 02:49:18

标签: asp.net oracle web-services soap wsdl

我为我们的客户创建了一个soap web服务,我需要更改响应:

<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>
      <send_messageResponse xmlns="send_message_response">
         <message_response>
            <message_id>2001</message_id>
            <description>sent</description>
            <status>sent</status>
         </message_response>
      </send_messageResponse>
   </soap:Body>
</soap:Envelope>

    <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>
      <send_message_response xmlns="send_message_response">
         <message_response>
            <message_id>2001</message_id>
            <description>sent</description>
            <status>sent</status>
         </message_response>
      </send_messageResponse>
   </soap:Body>
</soap:Envelope>

我尝试添加

[WebMethod]
        [return: XmlElement("message_response")]
        [SoapDocumentMethod("send_message", RequestNamespace = "urn", ResponseNamespace = "send_message_response", Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]

但仍无法改变回应。我也想知道是否有任何创建Oracle Field Service Cloud的出站API的经验?因为我们的客户是oracle :))

0 个答案:

没有答案