PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Create a SOAP request with attributes in the main element

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Web Services
View previous topic :: View next topic  
Author Message
Renuplex



Joined: 18 Mar 2008
Posts: 2

PostPosted: Tue Mar 18, 2008 9:17 pm    Post subject: Create a SOAP request with attributes in the main element Reply with quote

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
View user's profile Send private message
Renuplex



Joined: 18 Mar 2008
Posts: 2

PostPosted: Tue Apr 01, 2008 12:35 pm    Post subject: Reply with quote

Is this impossible?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Web Services All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement