Adding a SOAP / XML parameter in PHP -


i using soap in php.

at moment submitting tag

<tag>data</tag> 

but want submit

<tag parameter=value>data</tag> 

for life of me, can't find out how this. don't know parameter=value pair referred as?

can please?

okay - after bit of hard looking, , lucky google, have found out answer own question.

to add parameter (or several) xml tag use 'soapvar' command :

$xmlvar = soapvar('<anytype xsi:type="invoiceline">'.$line_xml.'</anytype>',xsd_anyxml) 

this produce following xml :

<anytype xsi:type="invoiceline"><otherstuff>data</otherstuff></anytype> 

so , good. problem appoach need able isolate 'otherstuff' goes in middle of tag sandwich - in case it's $line_xml variable. long can this, approach seems work fine.


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -