Web services 如何更改coldfusion发送soap响应的方式?

Web services 如何更改coldfusion发送soap响应的方式?,web-services,soap,coldfusion,wsdl,Web Services,Soap,Coldfusion,Wsdl,我有一个coldfusion Web服务,它接收XML数据并发送回确认 当出现错误时,当前代码返回soap响应作为 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soa

我有一个coldfusion Web服务,它接收XML数据并发送回确认

当出现错误时,当前代码返回soap响应作为

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:updatePendingTicketsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://v02.intouchdataservice">
         <updatePendingTicketsReturn xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><![CDATA[<fault>
<faultcode>TO BE DEFINED IF NEEDED</faultcode>
<faultstring >Content is not allowed in prolog.</faultstring>
<faultactor>InTouch</faultactor>
</fault>]]></updatePendingTicketsReturn>
      </ns1:updatePendingTicketsResponse>
   </soapenv:Body>
</soapenv:Envelope>

如有需要,将予以定义
prolog中不允许包含内容。
InTouch
]]>
但我希望得到的回应是

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
  <soapenv:Fault>
<faultcode>TO BE DEFINED IF NEEDED</faultcode>
<faultstring >Content is not allowed in prolog.</faultstring>
<faultactor>InTouch</faultactor>
  </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

如有需要,将予以定义
prolog中不允许包含内容。
InTouch
有没有一种方法可以改变coldfusion在出现异常时发回响应的方式

除此之外,是否有一种方法可以将XML模式添加到coldfusion WSDL以验证已发送的XML文档


谢谢

我认为没有,但是您可以将整个代码放在try-and-catch中定义您自己的响应代码。

您可以使用
wsdlfile
属性来指定自定义WSDL