![]() However,the sample code in php is Array in key-value format,and the value could be another Array.In certain filter criteria,the Array could be one key multiple value,whereby value are few pair of another Array. Yes,since I learn fundamental programming,I known that method expects an Array,then must pass corresponding type as expected. call() works,you are invited to refer to following link My example methodKey is "sales_order.list" so,the filters shouldįor your better understanding/imagination of how does this. The type of 3rd parameter( filter) depends on the 2nd parameter( methodKey).In Mservice.call(string sessionId,string methodKey,array filters) So I asked what is the definition mservice.call method.?Īrray of filters for the list of sales orders (optional) But I think the problem is not with serialization. ![]() The reason for asking this question is, if mservice.call method expects an array as parameter then dictionary will certainly not work. Without pull data from web service to analyse, I can not continue the rest of job T.T throw following error due to serializationġ)May I pass other data type others than Array? as the root parameter should be in Array.Ģ)Dictionary itself not support serialization,should I serialized it? So I use Dictionary to form similar structure. net likely not support associative array.I struggling that should I use Dictionary to form similar structure because the Noted that the 3rd parameter for web service method. Result = mservice.call(sessionId, "sales_order.list", hashFilter) HashFilter.Add("created_at", filter_value) String sessionId = mservice.login("username", "apikey") mservice is instance of service reference that point to URL of corresponding SOAP API.call() is soap API method I need to convert above code in c#.net for further development that need to run in Windows Server environment.įollowing is my code in c# and problem I facing. $result = $client->call($sessionId, 'sales_order.list', $params) get all of the sales_order on and status is pending $params = array(array( $sessionId = $client->login('apiUser', 'apiKey') $client = new SoapClient(' / If somestuff requires api authentification, The API code in php.įollowing code works fine in php. You may go about your business.I need to write an in-house software in c#.net that need to call web service's method via SOAP API. I should never have assumed that Drupal would be that reasonable and intuitive. Firebug tells me that my input names are constructed exactly like this, but my data comes back as ] => data rather than => array( => data).ĮDIT 2: It seems my real problem was my assumption that $form_state in Drupal would have the same array hierarchy as $_POST. I thought I was just getting my syntax wrong. ![]() Does that make sense?ĮDIT: I tried exactly this already, but apparently Drupal is interfering with what I'm trying to do. I want the input elements in each column to have the same base name, but a different row identifier as an array key. The reason I ask is because I'm making a huge table of form elements (including with multiple selections), and I want to have my data organized cleanly for the script that I'm POSTing to. ![]() I know I can do things like, but is it possible to do things like and have it show up in PHP as $_POST? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |