Posts

Showing posts with the label web-services

Service Reference error upon creation

Image
Clash Royale CLAN TAG #URR8PPP Service Reference error upon creation I'm currently having an issue with adding an OData service in a C# project. The service looks like this. My step by step process looks like this: STEP 1: Entering the OData URL STEP 2: After hitting OK, the following error pops up. STEP 3: Trying to update the service ----> Which results in following error. I can't seem to figure out what causes these issues. If anyone has any suggestions, please let me know. It would be greatly appreciated! 1 Answer 1 Instead of using the service reference with UWP. I used Ajax calls to get the data. Some of them weren't allowed in a Unity build. This is why I used tags to exclude scripts like this: #if (UNITY_EDITOR) ... your class/code ... #endif More information about this can be found by following this url. https://support.unity3d.com/hc/en-us/articles/208456906-Excluding-Script...

Prestashop Web service to return JSON

Image
Clash Royale CLAN TAG #URR8PPP Prestashop Web service to return JSON After extensive search over internet i am sure that Prestashop does not return data in JSON format, it only returns in XML format (which leads to cross domain accessing issue unfortunately). Now, I am trying to convert XML(returned by Prestashop) to JSON. I want to write php code which could take XML from web service and sent back JSON. For this purpose i tried many tutorial but in vain. The converted JSON does not have value in it, so is useless. The methods i tried are listed below. http://www.sitepoint.com/php-xml-to-json-proxy/ PHP convert XML to JSON XML to convert: <name> <language id="1" xlink:href="http://localhost/prestashop/api/languages/1"> <![CDATA[ iPod Nano ]]> </language> </name> Returned JSON: "name":{"language":{"@attributes":{"id":"1"}}} I hope for the help in this regard. Thank you. ...

How to correctly use soap webservice client in c#

Image
Clash Royale CLAN TAG #URR8PPP How to correctly use soap webservice client in c# I am new to c# and trying to consume a SOAP web service, i generated a service reference to the WSDL and am able to do the following to retrieve a DataSet of the response. SportingGatewaySoapClient myServices = new SportingGatewaySoapClient("GatewaySoapID"); RSportResults sportsResults = myServices.SportResults("username","password"); System.Data.DataSet dataSet = sportsResults.dsSportResults; I am able to see the correct information if I iterate through the dataset like you would normally : foreach (DataTable table in dataSet.Tables) { foreach (DataRow row in table.Rows) { foreach (object item in row.ItemArray) { Console.WriteLine(item); } } } But I am failing to see how I can Unmarshall the data directly into the generated classes s...