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

XMLDSig help #286

Closed omorales-sernutec closed 1 year ago

omorales-sernutec commented 1 year ago

Hello, I'm trying to implement XMLDSig using the services your package generates.

In order to achieve this, I'm creating my own SoapClient class as done in PackageEws365. With that, I can create the XMLDSig header tags based on XML body content.

The question is, once I have the headers built, how can I call the setSoapHeader method to add them. I've done it replacing the string in the XML request, but I doesn't seem very clean.

Thanks for your help and for sharing your work. Very useful package.

omorales-sernutec commented 1 year ago

Hi, I've figured it out using this in custom SoapClient class https://github.com/robrichards/wse-php/blob/master/examples/soap-wsa-example.php

mikaelcom commented 1 year ago

Thanks for the feedback and the code sample