开发者

How do I return a specific SOAP response from an ASP.Net site?

开发者 https://www.devze.com 2023-01-31 07:25 出处:网络
An external development partner has a service that will post a SOAP request to one of our services. The format of their request is fixed (by them).

An external development partner has a service that will post a SOAP request to one of our services. The format of their request is fixed (by them).

We are required to respond with a SOAP message of a fixed format (fixed by them again).

I have created a Generic Handler in ASP.Net that successfully receives their request (which we parse manually and process).

However, they want a response that looks like this:

HTTP/1.1 200 OK
Date: Thu, 01 Apr 2010 09:30:25 GMT
Serve开发者_Python百科r: Jetty/5.1.4 (Windows XP/5.1 x86 java/1.5.0_15
Content-Type: multipart/related; boundary=soaptestserver; type="text/xml"; start="<theenvelope>"
SOAPAction: ""
Content-Length: 796
Connection: close

--soaptestserver
Content-ID: <theenvelope>
Content-Transfer-Encoding: 8bit
Content-Type: text/xml; charset=utf-8
Content-Length: 442

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAPENV="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"><SOAPENV:
Body><ns1:processResponse xmlns:ns1="urn:TripFlow" SOAPENV:
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><message
href="cid:thecontentmessage"/></ns1:processResponse></SOAP-ENV:Body></SOAPENV:
Envelope>
--soaptestserver
Content-ID: <thecontentmessage>
Content-Transfer-Encoding: 8bit
Content-Type: text/xml; charset=utf-8
Content-Length: 65

<?xml version="1.0" encoding="UTF-8"?><STATUSLVL>00</STATUSLVL>
--soaptestserver--

I have been so sheltered from raw SOAP by using .Net Webservices / WCF for years, that I have no clue about how to go about making a response like this.

What should I do?

0

精彩评论

暂无评论...
验证码 换一张
取 消