douyiyang6317 2017-03-16 16:48
浏览 159

从soap服务器响应中删除文档类型声明DTD

  1. The response my webservice gives is not accepted by my (future) customer's system.
    1.1 Client receives "DTD encountered in SOAP context" error.
    1.1.1 IBM Knowledge Center

0x00030004 DTD encountered in SOAP context
Explanation:
An XML Firewall service has rejected a SOAP message because the message contained a DTD (Document Type Declaration). Such messages are not allowed by the SOAP standard.
Correct the problem by removing the DTD from the XML document or by reconfiguring the XML Firewall service to a non-soap parsing mode, such as "xml" or "unprocessed"-last option not possible because client side-. Administrator response: None Severity: error

  1. So, I need to remove the DTD from the xml document.
    2.1 Problem is, we use a soap library that handle this for us. [PhpSoapServer][2]

  2. SOAPUI get the response just fine

xml

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.uv.com/wsdl/VoucherService/xsd">
   <SOAP-ENV:Body>
      <ns1:GetLinkVoucherResponse>
         <url>https://u-v.io/OLaGsFr</url>
      </ns1:GetLinkVoucherResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and raw

HTTP/1.1 200 OK
Server: nginx/1.11.8
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers,     Authorization, X-Requested-With
Cache-Control: no-cache
Date: Thu, 16 Mar 2017 15:48:36 GMT
Set-Cookie:      laravel_session=XXREMOVEDCHARg1NzVNSlE9PSIsInZhbHVlIjoiVHlJdVwvNUVDMm9uTEtkRjJRSWpRaFwvYjY5NlVuQW5LeHUwMThRbEZoYWY4TkTWFmOVJoalZ3RVNnZUtKRzYzSGxkN2N5UjgzXC9yZ09ST0E9PSIsIm1hYyI6ImZmNTQyMzIzZWQ1NTE3ZTk2ODM3ZWMwMGIzYmMyMDViNGQ0YThlOWNlNjY0MjJjODM0NWY4NmI0OTI3YjFhOTQifQ%3D%3D; expires=Thu, 16-  Mar-2017 17:48:36 GMT; Max-Age=7200;
path=/; HttpOnly
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Encoding: gzip

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-    ENV="http://schemas.xmlsoap.org/soap/envelope/"    xmlns:ns1="http://www.uv.com/wsdl/VoucherService/xsd"><SOAP-ENV:Body>       <ns1:GetLinkVoucherResponse><url>https://u-v.io/OLaGsFr</url>       </ns1:GetLinkVoucherResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

So, how to comply with our (future) customer IBM soap firewall ?

Which part of the raw file is about the DTD ?

context: trying to build a startup after winning sponsored hackathon. I'm the less than tech-savy pm trying to help the tech guys.

Thank you for your time

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 这是哪个作者做的宝宝起名网站
    • ¥60 版本过低apk如何修改可以兼容新的安卓系统
    • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
    • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
    • ¥50 有数据,怎么用matlab求全要素生产率
    • ¥15 TI的insta-spin例程
    • ¥15 完成下列问题完成下列问题
    • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!