laravel-soap icon indicating copy to clipboard operation
laravel-soap copied to clipboard

Adding attribute to Envelope tag

Open badcom opened this issue 6 years ago • 1 comments

Hello,

My XML looks something like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:string:string">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:apSrv>
         <urn:dsContext>
            <ttContext>
			<contextGroup>PARAM</contextGroup>
			<contextName>password</contextName>
			<contextValue>xxxxxxxx</contextValue>
			<contextOperator />
			<contextType />
			</ttContext>
			<ttContext>
			<contextGroup>PARAM</contextGroup>
			<contextName>username</contextName>
			<contextValue>xxxxxx</contextValue>
			<contextOperator />
			<contextType />
		</ttContext>
         </urn:dsContext>
      </urn:apSrv>
   </soapenv:Body>
</soapenv:Envelope>

I want to know how I can add the xmlns:urn="urn:string:string" attribute to the Envelope tag. I need that in order for the call to work.

Thank you!

badcom avatar Sep 23 '18 02:09 badcom

It seems that I need to override the __doRequest method in order to achieve that. Something like this:

https://www.binarytides.com/modify-soapclient-request-php/

Can that be done with your wrapper?

badcom avatar Sep 23 '18 03:09 badcom