I have a Monotouch project that today uses WCF Web Services to get data. Now I want to migrate it in order to start using ASP.NET Web Api Json.
Does anyone know how can I send a viewmodel data from a ASP.NET Web Api and then read it in monotouch?
Thanks for the help in advance.
I think you should read this Xamarin article.
In general, Web API is just standard HTTP passing either XML or JSON back and forth. There is not necessarily a client framework accessing it--you can consume it with raw HttpWebRequests or the equivalent in whichever programming language you are using.
Considering that, your options are:
Use an open-source library to do it (something like RestSharp)
Create the HttpWebRequest calls, and format the XML or JSON for the requests and responses yourself (you can use the .Net BCL to do this or other open source projects)
I tend to do the former, just because I like fine grained control of what is going on. #1 might be easier for you though.
Related
so i am able to call app insight's api "https://api.applicationinsights.io/v1/apps/xx/xx/xx" from my C# code.
i can get the json response.
i have this response in json and i want to serialize it into C# objects. do i have to create matching C# classes my self or is there any built in c# models i can use and serialize them?
Not really a direct answer to your question, but instead of consuming REST API directly and doing the conversion/serialization yourself you can simply use Application Insights .Net SDK.
The SDK will do all the necessary conversions for you and give you nice C# objects. The source code for this is also open source and is available here: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query.
You can take a look here for all the models available to you for direct use here: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/applicationinsights/Microsoft.Azure.ApplicationInsights.Query/src/Generated/Models.
In my opinion, if you choose to use app insights api, that means you didn't add any other sdk into your project, that means there's no any built in models for you.
And if you choose to use sdk instead, here's a sample for it, and per my testing, it only provides QueryResults as the response, here's my testing result, and this is the introduction for preparation. Pls note, you need wait for a while to make the newly added role to take effect. If you can't find the api permission mentioned in the document, you can search for it like what I did.
I am trying to integrate Acumatica with an interfacing system and I need to be able to send and receive data in xml format, say for example one is Customer info, that should be sent to the interfacing system.
For some reasons, we ruled out the Import/ Export scenarios and we need to achieve the interface using FTP.
I'm unable to find much info online on how to FTP data in and out of Acumatica. So if anyone can share links to some documentation, it will be very helpful. Thanks.
Seeing as you want to be able to send and receive data in an XML format, you might want to check the Web Service options.
There are two possibilities, the Contract Based SOAP API and the Screen Based SOAP API. Both of these are sending SOAP request in XML format.
If you are starting a new project, Acumatica is suggesting you use either version of the Contract Based API (SOAP or REST). So your best bet is probably in looking at Contract Based SOAP API.
As there is not much information on the structure behind what is being sent you will probably have to create yourself project in c# first and inspect the structure of the package being sent to the server hosting the Acumatica instance so that you can reproduce it using your own FTP Interface.
You need to work with .Net native FtpWebRequest class. You can find more information at MSDN FtpWebRequest.
I was wondering whether or not BreezeJS is compatible when using other technologies other than Web API and/or Entity Framework? As I'm currently in development of a SPA using Service Stack to retrieve data and ORMLite?
So I am curious how BreezeJS handle's this as I know it uses it's own API Controller usually with an extension of the DbContext class which Entity Framework uses. Thanks.
There is currently a sample called NoDb in the samples zip available on the breeze website. This sample does not use EF, but it does use WebApi. So I'd start by looking there. ( additional documentation on this sample should be added within a day or two as well).
In terms of using ServiceStack instead of WebApi, breeze supports the concept of a "dataServiceAdapter" and currently ships with two, an OData adapter and a WebApi adapter. It is certainly possible to write a ServiceStack adapter that breeze could use but this is not trivial. Please add this as a feature request ( and vote for it) on the breeze User Voice. We take these requests seriously.
I need to create a JSON service to get and post data from a local and remote http/https server on Linux for my mobile apps. -I'm using MySQL as DB engine-
I tried with Glassfish EJB/JSP (I like Java), but it was a kind of frustrating, due the poor support that my linux development machine (mint 13) has for Oracle Glassfish.
In your opinion, what is the best way to make a remote JSON server on that environment? which alternatives do I have?
If you want to accept and send back JSON, you want a JAX-RS-based service, not a JSP one.
You will most likely use Jersey, RESTEasy, CXF, or similar implementations of the JAX-RS specification.
Sending back JSON from a JAX-RS implementation is trivial; that's what JAX-RS is designed to do. Generally speaking, JSP is used for web applications (where HTML, CSS, images, and JavaScript are returned), while JAX-RS is used for RESTful web services, where JSON, XML, and YAML is returned. You can use JSP to produce JSON, but it is not common.
As far as your overall architecture is concerned, any webserver is fine (Apache, Tomcat, etc.) and you can use either Springframework or a full app server like JBoss or Glassfish. Springframework has its own REST support, but I've used JAX-RS several times with Spring and it works very well. Since you already are using Glassfish, integrating a JAX-RS implementation should be straightforward. This article from Oracle shows you how.
Well, I guess you need to find a good framework where you feel confident.
I use Zend PHP + Doctrine to serve my apps. Why? I just create simple controllers in a good MVC like Zend and use all power from Doctrine to handle queries. Ok, but why? Because I develop quick and neat code on it.
Best
Is it possible to develop a Web Part without usage of .NET technologies? I'm looking for possibilities of integration of legacy (for example java) applications into SharePoint.
Any valid way for .Net CLR to call your code will do what you want. However with that said, it is likely to be very low level, very obscure and very difficult to do.
A more straightforward approach to reusing your Java or whatever code was if there was some sort of public cross language interface for you to exploit in your .Net skeleton. The obvious answer is a REST or SOAP wrapper around the Java code but it doesn't have to be that. It could be CORBA or JMS or all sorts of things.
Even if you want to integrate Java apps, the web Part will be coded in .NET.
There are a few ways to accomplish this, all of which involve a .NET web part exposing external data. All of your common integration methods apply including exposing the legacy application through web services or even directly accessing the database - you could use whatever your organization is accustomed to with other integrations.
Another possible option, depending on your SharePoint version is the Business Data Catalog (2007) or Business Connectivity Services (2010). These options, while can be a little bit of a pain to set up (though third party tools are available) do allow for some automatic integration of other applications into SharePoint.