Advertisement
Guest User

Untitled

a guest
May 27th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.97 KB | None | 0 0
  1. Uncaught SoapFault exception: [Receiver] Unknown error.
  2.  
  3. --->Company
  4.  
  5. --->MobileApi
  6.  
  7. --->Model
  8. --->Mobile
  9. ---->Api
  10. ---->V2.php
  11. Api.php
  12.  
  13. --->etc
  14. ---->api.xml
  15. ---->config.xml
  16. ---->wsdl.xml
  17. ---->wsi.xml
  18.  
  19. <?xml version="1.0"?>
  20. <config>
  21. <api>
  22. <resources>
  23. <mobileapi_mobile translate="title" module="mobileapi">
  24. <model>mobileapi/mobile_api</model>
  25. <title>Mobile Api</title>
  26. <!--<acl>mobileapi/mobile</acl>-->
  27. <methods>
  28. <forgotaccess translate="title" module="mobileapi">
  29. <title>Forget the access to the Platform</title>
  30. <method>forgotaccess</method>
  31. </forgotaccess>
  32. </methods>
  33. </mobileapi_mobile>
  34. </resources>
  35. <resources_alias>
  36. <mobile>mobileapi_mobile_mobile</mobile>
  37. </resources_alias>
  38. <v2>
  39. <resources_function_prefix>
  40. <mobileapiMobile>mobileapiMobile</mobileapiMobile>
  41. </resources_function_prefix>
  42. </v2>
  43. </api>
  44.  
  45. <?xml version="1.0"?>
  46. <config>
  47. <modules>
  48. <Company_MobileApi>
  49. <version>1.0</version>
  50. </Company_MobileApi>
  51. </modules>
  52. <global>
  53. <models>
  54. <company_mobileapi>
  55. <class>Company_MobileApi_Model</class>
  56. </company_mobileapi>
  57. </models>
  58. <helpers>
  59. <company_mobileapi>
  60. <class>Company_MobileApi_Helper</class>
  61. </company_mobileapi>
  62. </helpers>
  63. </global>
  64. </config>
  65.  
  66. <?xml version="1.0" encoding="UTF-8"?>
  67. <definitions xmlns:typens="urn:{{var wsdl.name}}"
  68. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  69. xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  70. xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
  71. xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  72. xmlns="http://schemas.xmlsoap.org/wsdl/"
  73. name="{{var wsdl.name}}"
  74. targetNamespace="urn:{{var wsdl.name}}">
  75. <types>
  76. <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
  77. <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
  78.  
  79. <element name="mobileapiMobileForgotaccessRequestParam">
  80. <complexType>
  81. <sequence>
  82. <element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
  83. <element minOccurs="1" maxOccurs="1" name="username" type="xsd:string" />
  84. </sequence>
  85. </complexType>
  86. </element>
  87. <element name="mobileapiMobileForgotaccessResponseParam">
  88. <complexType>
  89. <sequence>
  90. <element minOccurs="1" maxOccurs="1" name="response" type="xsd:string" />
  91.  
  92. </sequence>
  93. </complexType>
  94. </element>
  95. </schema>
  96. </types>
  97.  
  98. <message name="mobileapiMobileForgotaccessRequest">
  99. <part name="parameters" element="typens:mobileapiMobileForgotaccessRequestParam" />
  100. </message>
  101. <message name="mobileapiMobileForgotaccessResponse">
  102. <wsdl:part name="parameters" element="typens:mobileapiMobileForgotaccessResponseParam" />
  103. </message>
  104. <portType name="{{var wsdl.handler}}PortType">
  105. <operation name="mobileapiMobileForgotaccess">
  106. <documentation>Forgot the access</documentation>
  107. <input message="typens:mobileapiMobileForgotaccessRequest" />
  108. <output message="typens:mobileapiMobileForgotaccessResponse" />
  109. </operation>
  110. </portType>
  111. <binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
  112. <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
  113. <operation name="mobileapiMobileForgotaccess">
  114. <soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
  115. <input>
  116. <soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
  117. </input>
  118. <output>
  119. <soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
  120. </output>
  121. </operation>
  122. </binding>
  123. <service name="{{var wsdl.name}}Service">
  124. <port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
  125. <soap:address location="{{var wsdl.url}}" />
  126. </port>
  127. </service>
  128. </definitions>
  129.  
  130. <?xml version="1.0" encoding="UTF-8"?>
  131. <wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
  132. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  133. xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  134. xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
  135. xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  136. name="{{var wsdl.name}}"
  137. targetNamespace="urn:{{var wsdl.name}}">
  138. <wsdl:types>
  139. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
  140.  
  141. <xsd:element name="mobileapiMobileForgotaccessRequestParam">
  142. <xsd:complexType>
  143. <xsd:sequence>
  144. <xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
  145. <xsd:element minOccurs="1" maxOccurs="1" name="username" type="xsd:string" />
  146. </xsd:sequence>
  147. </xsd:complexType>
  148. </xsd:element>
  149. <xsd:element name="mobileapiMobileForgotaccessResponseParam">
  150. <xsd:complexType>
  151. <xsd:sequence>
  152. <xsd:element minOccurs="1" maxOccurs="1" name="response" type="xsd:string" />
  153.  
  154. </xsd:sequence>
  155. </xsd:complexType>
  156. </xsd:element>
  157. <!--<xsd:complexType name="mobileapiMobileForgotaccessRequestParam">-->
  158.  
  159. </xsd:schema>
  160. </wsdl:types>
  161.  
  162. <wsdl:message name="mobileapiMobileForgotaccessRequest">
  163. <wsdl:part name="parameters" element="typens:mobileapiMobileForgotaccessRequestParam" />
  164. </wsdl:message>
  165. <wsdl:message name="mobileapiMobileForgotaccessResponse">
  166. <wsdl:part name="parameters" element="typens:mobileapiMobileForgotaccessResponseParam" />
  167. </wsdl:message>
  168.  
  169. <wsdl:portType name="{{var wsdl.handler}}PortType">
  170.  
  171. <wsdl:operation name="mobileapiMobileForgotaccess">
  172. <wsdl:documentation>Forgot the access</wsdl:documentation>
  173. <wsdl:input message="typens:mobileapiMobileForgotaccessRequest" />
  174. <wsdl:output message="typens:mobileapiMobileForgotaccessResponse" />
  175. </wsdl:operation>
  176. </wsdl:portType>
  177. <wsdl:binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
  178. <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
  179.  
  180. <wsdl:operation name="mobileapiMobileForgotaccess">
  181. <soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
  182. <wsdl:input>
  183. <soap:body use="literal" />
  184. </wsdl:input>
  185. <wsdl:output>
  186. <soap:body use="literal" />
  187. </wsdl:output>
  188. </wsdl:operation>
  189. </wsdl:binding>
  190. <wsdl:service name="{{var wsdl.name}}Service">
  191. <wsdl:port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
  192. <soap:address location="{{var wsdl.url}}" />
  193. </wsdl:port>
  194. </wsdl:service>
  195. </wsdl:definitions>
  196.  
  197. public function forgotaccess($sessionId,$username){
  198.  
  199. echo 'hey this is the username'.$username.'and the sessionId:'.$sessionId;
  200.  
  201. public function forgotaccess($sessionId, $username)
  202. {
  203.  
  204. echo 'hey this is the username'.$username.'and the sessionId:'.$sessionId;
  205.  
  206. error_reporting(E_ALL);
  207. ini_set('display_errors', TRUE);
  208. $api_url = "http://localhost/index.php/api/v2_soap/?wsdl=1";
  209.  
  210. $username = '******';
  211. $password = '******';
  212.  
  213. $client = new SoapClient($api_url,array('cache_wsdl' => WSDL_CACHE_NONE));
  214.  
  215. //var_dump($client->__getFunctions());
  216. //retreive session id from login
  217. $session = $client->login(array("username"=>$username,"apiKey"=>$password));
  218. $session= $session->result;
  219.  
  220.  
  221. $result = $client->mobileapiMobileForgotaccess(array("sessionId"=>$session,"username"=>"test@test.com"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement