Skip to content

Does not support large SOAP responses #598

@rajivraman-MRM

Description

@rajivraman-MRM

Bug Report

Q A
BC Break no
Version 4.5.0

Summary

Cannot consume large SOAP responses.

Current behavior

When consuming a large SOAP response, I get this error:

[FATAL] : Resource limit exceeded: Text node too long, try XML_PARSE_HUGE

How to reproduce

I've generated a SOAP client (using the wizard) against a webservice that generates large responses, mainly due to Base64-encoded images within it. We were able to consume these in an older version of PHPro Soap-Client (1.4.1), but it no longer works in 4.5. (I cannot share the webservice with you.)

Expected behavior

PHPro Soap-Client should be able to consume the XML without error. I was able to trace the error down through php-soap, down through veewee-xml, to this code in VeeWee\Xml\Dom\Document:

    public static function fromXmlString(string $xml, callable ...$configurators): self
    {
        return self::configure(
            loader(xml_string_loader($xml, LIBXML_PARSEHUGE)),
            ...$configurators
        );
    }

By passing in the LIBXML_PARSEHUGE flag, the error no longer occurs. Is there any way to snake this down as a config option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions