Answer the question
In order to leave comments, you need to log in
How to properly pass data to xmlrpc_encode_request?
Greetings, I'm trying to deal with xmlrpc
In the open spaces, I found this example
xmlrpc_encode_request('examples.getStateName', [41]);
формируется такой xml=>
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value>
<int>41</int>
</value>
</param>
</params>
</methodCall>
<PCDescRQ Lang="en">
<Auth>
<Username>string</Username>
<Password>string</Password>
</Auth>
<PcId>string</UnitId>
<SessionID>string</SessionID>
</PCDescUnitRQ>
and I can't figure out if it's possible to create such a request via xmlrpc_encode_request(PCDescRQ...) $request = xmlrpc_encode_request(
'PCDescRQ',
array(
"Auth"=>array("username"=>"string", "password" => "string"),
"PcId"=>"string",
"SessionID"=>"string"
)
);
=><?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>PCDescRQ</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>Auth</name>
<value>
<struct>
<member>
<name>username</name>
<value>
<string>string</string>
</value>
</member>
<member>
<name>password</name>
<value>
<string>string</string>
</value>
</member>
</struct>
</value>
</member>
<member>
<name>PcId</name>
<value>
<string>string</string>
</value>
</member>
<member>
<name>SessionID</name>
<value>
<string>string</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question