SOAP-ERROR: Encoding: Violation of encoding rules?

前端 未结 11 517
夕颜
夕颜 2021-01-02 03:42

Guys, I\'m stuck, banging my head off the desk for the past few hours.

I am trying to consume a service, and I have 8 other functions that I call that are almost IDE

相关标签:
11条回答
  • 2021-01-02 04:07

    I had the same problem, and managed to fix it by correcting the WSDL, which was assuming the server would send an integer for a particular value, but was actually sending a string. Perhaps modifying the WSDL from:

    <part name="result" type="xsd:int" /></message>
    

    to

    <part name="result" type="xsd:string" /></message>
    

    May solve your issue, here is some information on the particular case I was facing: https://blog.dotnetframework.org/2016/12/06/uncaught-soapfault-exception-sender-soap-error-encoding-violation-of-encoding-rules/

    0 讨论(0)
  • 2021-01-02 04:08
    <![CDATA[<?xml version="1.0"
    encoding="utf-8"?>
    <CONTENTXML></CONTENTXML]]></xmlCallString>]]>
    
    0 讨论(0)
  • 2021-01-02 04:11

    I had the same problem.

    In soapUI preferences I checked the option Preferences → Editor Settings → Validate Responses and I received this information:

    line 3027: Invalid decimal value: unexpected char '44'.

    This solved my problem. Field contained wrong type value.

    0 讨论(0)
  • 2021-01-02 04:11

    I was getting this error using the SoapUI tool, until I reformatted the response with real test data and not just '?'. Also with SoapUI, the response may be more than expected and may have to shorten to the expected response by removing several optional response parameters. Hope this helps?

    0 讨论(0)
  • 2021-01-02 04:15

    If you upgrade your PHP version to 7.3 or later, the previous WSDL cache may stop working.

    The default install directory is /tmp and disabling cache or deleting the wsdl* cache files should remove the problem. I would recommend clearing the cache, or else your server will pull the WSDL every time (which may not be desirable).

    0 讨论(0)
提交回复
热议问题