curl -i -X POST \
-H "Content-Type:application/xml" \
-d \
'<?xml version="1.0"?>
<methodCall>
<methodName>sample.sumAndDifference</methodName>
<params>
<param><value><int>1</int></value></param>
<param><value><int>2</int></value></param>
</params>
</methodCall>' \
'http://localhost/xmlrpc_server.php?XDEBUG_SESSION_START=sublime.xdebug' |
curl -i -X POST \
-H "Content-Type:application/xml" \
-d \
'<?xml version="1.0"?>
<methodCall>
<methodName>sample.sumAndDifference</methodName>
<params>
<param><value><int>1</int></value></param>
<param><value><int>2</int></value></param>
</params>
</methodCall>' \
'http://localhost/xmlrpc_server.php?XDEBUG_SESSION_START=sublime.xdebug'
xmlrpc_server.php
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><struct>
<member><name>sum</name>
<value><int>3</int></value>
</member>
<member><name>difference</name>
<value><int>-1</int></value>
</member>
</struct></value>
</param>
</params>
</methodResponse> |
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><struct>
<member><name>sum</name>
<value><int>3</int></value>
</member>
<member><name>difference</name>
<value><int>-1</int></value>
</member>
</struct></value>
</param>
</params>
</methodResponse>
Related Posts