Re: [SOAP] Editing XML payload before sending

[email protected] (Samisa Abeysinghe)
Newsgroups php.soap
Message-ID <[email protected]>
You canot trap the payload before it is sent.
However, if you know the exact payload XML, you can do this:
|$Result=$Client->SomeCall(new SoapVar('<Element 
attr="AttrValue">ElValue</Element>', XSD_ANYXML));

Thanks,
Samisa...

|Roine Edmundsson wrote:
> Greetings, I have the problem when building complex structures that contain
> arrays for elements that can be there 1 to n amount of times. The element
> types that should be on the form 
>
> <show>
>    ...
> </show>
> <show>
>   ...
> </show>
>
> turn out as 
>
> <show>
>   <SOAP-ENC:Struct>
>      ...
>   </SOAP-ENC:Struct>
>   <SOAP-ENC:Struct>
>      ...
>   </SOAP-ENC:Struct>
> </show>
>
> Since the format is consistent I am now wondering if one could tamper with
> the payload that is created before it is sent. since it would be simple with
> a regexp to replace the <show> and </show> with the big nothing and then do
> a replacement on the 'SOAP-ENC:Struct' for to 'show' and then send the
> payload to the other part. 
>
> Anyone know if this is possible in a not overly complex manner (even though
> such suggestions are appreciated aswell since I am quite stuck at the
> moment).
>
> All and every contributions on this will be greatly appreciated. 
>
> /Roine Edmundsson
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.