 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Renuplex
Joined: 18 Mar 2008 Posts: 2
|
Posted: Tue Mar 18, 2008 9:17 pm Post subject: Create a SOAP request with attributes in the main element |
|
|
Hi all,
I'm using pear soap to communicate with a SOAP Server. Some of the parameters to pass are in the form of attributes rather than elements. I've poked around quite a bit but haven't found a way of getting what I'd like...
What I have now is:
$test = new SOAP_Value('QueryID','string','test_id', array('test'=>'ok'));
$params = array($test);
$x=$client->call('TestRequest',$params,'','Routes');
Which produces the following:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<TestRequest>
<QueryID xsi:type="xsd:string" test="ok">test_id</QueryID></TestRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What I'd like to manage is have attributes in the <TestRequest> element, like <TestRequest testAttr="test!">....
Can anyone please lead me on the right tracks?
Thanks alot!
Laurent |
|
| Back to top |
|
 |
Renuplex
Joined: 18 Mar 2008 Posts: 2
|
Posted: Tue Apr 01, 2008 12:35 pm Post subject: |
|
|
| Is this impossible? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|