WsdlToPhp / PackageGenerator

Generates a PHP SDK based on a WSDL, simple and powerful, WSDL to PHP
https://providr.io
MIT License
418 stars 73 forks source link

How to force CDATA for a specific SOAP Element? #296

Closed michabbb closed 1 year ago

michabbb commented 1 year ago

dear all,

eBay had another great idea to make developers crazy πŸ˜• and I have no idea how to solve this with your project, so I please need some help/advise.

based on ebay WSDL I am able to generate the classmap and create a request like this:

<SOAP-ENV:Body>
        <ns1:ReviseFixedPriceItemRequest>
            <ns1:Item>
                <ns1:Description>&lt;!DOCTYPE html&gt; &lt;!--suppress HtmlFormInputWithoutLabel
                    --&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"/&gt;
                    &lt;title&gt;Kunde&lt;/title&gt; &lt;meta name="viewport"
                    content="width=device-width,initial-scale=1"/&gt; &lt;link rel="stylesheet"...................
                </ns1:Description>             
               </ns1:Item>
        </ns1:ReviseFixedPriceItemRequest>
    </SOAP-ENV:Body>

but ebay forces us (next month) to send this request like that:

<SOAP-ENV:Body>
    <ns1:ReviseFixedPriceItemRequest>
        <ns1:Item>
            <ns1:Description>
                <![CDATA[
                    <!DOCTYPE html> <!--suppress HtmlFormInputWithoutLabel --> <html> <head> <meta charset="UTF-8"/>
                    <title>Kunde</title> <meta name="viewport" content="width=device-width,initial-scale=1"/> <link rel="stylesheet"...................
                ]]>
            </ns1:Description>            
        </ns1:Item>
    </ns1:ReviseFixedPriceItemRequest>
</SOAP-ENV:Body>

and sadly I have absolutely no clue how to make this work. i would be very happy, if you could help me here !! πŸ™ πŸ™

here's the latest trading WSDL of ebay.

thanks !!! micha