Help webservice for iPhone

Help webservice for iPhone

by Spyridon Karavanis -
Number of replies: 4
I am trying to create a soap communication between moodle and iphone. The question I want to ask is if i can get a response from moodle based an my wsdl.

For example moodle replies:
body:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://192.168.1.121/workspace/moodle/webservice/soap/server.php?wstoken=" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:moodle_user_get_users_by_usernameResponse><return SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="ns2:Map"><item><key xsi:type="xsd:string">id</key><value xsi:type="xsd:float">3</value></item><item><key xsi:type="xsd:string">username</key><value xsi:type="xsd:string">kspiros2000</value></item><item><key xsi:type="xsd:string">firstname</key><value xsi:type="xsd:string">Spyros</value></item><item><key xsi:type="xsd:string">lastname</key><value xsi:type="xsd:string">karavanis</value></item><item><key xsi:type="xsd:string">email</key><value xsi:type="xsd:string">kspiros2000@hotmail.com</value></item><item><key xsi:type="xsd:string">auth</key><value xsi:type="xsd:string">manual</value></item><item><key xsi:type="xsd:string">confirmed</key><value xsi:type="xsd:float">1</value></item><item><key xsi:type="xsd:string">idnumber</key><value xsi:type="xsd:string"></value></item><item><key xsi:type="xsd:string">emailstop</key><value xsi:type="xsd:float">0</value></item><item><key xsi:type="xsd:string">lang</key><value xsi:type="xsd:string">en</value></item><item><key xsi:type="xsd:string">theme</key><value xsi:type="xsd:string"></value></item><item><key xsi:type="xsd:string">timezone</key><value xsi:type="xsd:string">99</value></item><item><key xsi:type="xsd:string">mailformat</key><value xsi:type="xsd:int">1</value></item><item><key xsi:type="xsd:string">description</key><value xsi:type="xsd:string"></value></item><item><key xsi:type="xsd:string">city</key><value xsi:type="xsd:string">salamina</value></item><item><key xsi:type="xsd:string">country</key><value xsi:type="xsd:string">GR</value></item></item></return></ns1:moodle_user_get_users_by_usernameResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>



I want a reply with document literal encoding
for example something like that:

body :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://192.168.1.121/workspace/moodle/"><SOAP-ENV:Body><ns1:moodle_user_get_users_by_username><ns1:username>kspiros2000</ns1:username></ns1:moodle_user_get_users_by_username></SOAP-ENV:Body></SOAP-ENV:Envelope>


How can I change the response encoding? In the request I do not have a problem because I cast it to object for example:

$params = self::validate_parameters(self::create_users_parameters(), array('users'=&gt;(array)$users));
Average of ratings: -
In reply to Spyridon Karavanis

Re: Help webservice for iPhone

by Nagendra Shukla -

Hi,

If you can give me full wsdl, we can create all integration libraries for iPhone along with sample UI components to you as well as post in this forum for anyone to use. we do it using our framework and would take a day or two.

Regards,

Nagendra (nshukla@mtgr8.com)

In reply to Nagendra Shukla

Re: Help webservice for iPhone

by Spyridon Karavanis -
I am attaching my wsdl I have fixed the problem but it is not with the proper way basically I have written some complex code in the iphone side in order to parse using encoded maybe it is buggy...
What I want is to be able to get response in literal document style this is the main concern. The code for iphone can be generated here http://sudzc.com/.
Thanks for all the help.
In reply to Nagendra Shukla

Re: Help webservice for iPhone

by Spyridon Karavanis -
Sorry I forgot to specify that the problem I am facing is in the moodle side. Moodle response only with encoded. If you can do the integration in the iphone using encode that would be good too!:D