Sending data to the web service - web-services

I'm developing an application that requires storing data on an internet database.
Because of WP7 doesn't support databases,I think if I send my variables-datas to the web services that i craated,i can do what i want.
I know how to write a webservice but how can i send my variables to the webservice from WP7?

You can have a look at http://www.sterlingdatabase.com/ which provides a nice and lightweight database. I'm also using this in my project and it works fine.

Related

How do you create a simple webservice in mule and accept data from a mobile app?

Apologies as I am new to the webservice space. I would like to ask some guidance on how to create a webservice that will receive data from a mobile app (XML or JSON). It will just be a simple call and Inwould need the data to be inserted to our database. I can manage to deal with the DB and the actual flow and my issue is more on how to create the actual webservice from Mule. and thought examples and comment will be appreciated.
Thanks Again
Creating web-services in Mule is pretty easy to implement and start consuming.
You can go through these links to give you a good headstart:
https://docs.mulesoft.com/mule-user-guide/v/3.7/building-web-services-with-cxf
And you can play with this project:
https://github.com/marcotello/MuleESB/tree/master/simplecxfservice
However, as you mention you know something about the mule components and flows, you'll have to do transformation of your XML/JSON input received from the mobile App to be able to be saved in Database properly.
To accept requests from mobile applications - create light weight rest APIs that consume JSON payload over the http protocol.
There are various frameworks to create rest APIs. To develop rest APIs using mule follow:
https://docs.mulesoft.com/mule-user-guide/v/3.7/rest-api-examples
Once you create a rest API, use a JSON-Object transformer with a return type of java.util.map to access each of the fields in the JSON payload.
Check out the available transformers at the below mentioned link.
https://docs.mulesoft.com/mule-user-guide/v/3.7/transformers

Need a sample webserivce which publish data for testing .

I am doing a POC for a tool called informatica functionality if that can be used to read the data from a webservice which publish data. It will be like there is a external data provided which is ready to publish data over webservice and I have to use the adapter of this toll to read that data and create a flat flile out of it. There will be no input provided from our side(other than autentication.). Are there any such web services available which can be sued for that /
You can look an UDDI of some available web services you can use, and also few companies has web services for test purpose like Publicly Available Web Services
In my experience, reading webservice data is fragile using Informatica and it depends on the type of Webservice how well it works.
Testing works best, if you have at least some wsdl file, that you can feed into SoapUI. With the pro-Version you can even use that wsdl File to provide a dummy Webservice which you can then read data using Informatica.
Here are some webservices you can try: http://www.w3schools.com/webservices/ws_use.asp

Communication via Webservice

This is really a stupid question.. I really can't figure this out so need help
Basically, our web application will exchange data with another software company web application. That company has already exposed their webservice, and we can perform crud operation via their rest api. If we can full fill our requirement via their rest api, do my software company need to build our own webservice server? In which case do company build their own webservice server?
You should only need to create a webservice on your side if the other application needs to request and consume data from your application. If you're merely passing data to their API and consuming the response, there should be no need for you to create an API.

Can a REST web service return more than once?

I am familiar with SOAP web services, and have done some PUT/GET/POST verbs in REST web services. Somewhere I read that your REST web service can return a code if something goes wrong at the web service, but can it return twice?
By that I mean: supposed your REST web service is querying a database and it is doing a lazy load, so it is taking a while. You intend to return an array of values from the database back to the client that called the REST web service. But while the REST web service is working on your database query, can it return a string that says "Query is 10% complete, please wait" or something like that? Can the REST web service call another web service that somehow communicates back to the client this information?
I doubt this is possible, otherwise I would have seen it, but I ask anyway.
Target platform is Visual Studio 2010 Professional with C# and MS Sql Server 2008
You could look at COMET, which according to wikipedia:
...is a programming technique that enables web servers to send data to the client without having any need for the client to request it. It allows creation of event-driven web applications which are hosted in the browser.
There are a number of articles on the web about doing this plus a couple of frameworks on sourceforge and github. However this is not trivial. I know it is possible with REST because a previous employer of mine has several real-time feeds based on RESTfull endpoints using COMET for push.
See here:
http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/
http://sourceforge.net/projects/emergetk/
https://github.com/Oyatel/CometD.NET

Java ME consuming .NET Web Service the safe way

I'm developing an application for Blackberry that consumes .NET Web Services that are hosted on our public web server.
We are using JSON as our data interchange format.
So far we have been testing the application and everything is working fine but there is one big thing to solve: the .NET web services are public. If you go to the service URL: http://www.whatever.com/myservice.asmx you can assign values to the parameteres and invoke the service.
Obviously we don't want to have them publicly available and we want them to be secure.
I've been reading some questions here at stackoverflow but I haven't found a good answer.
I was thinking of adding a "password" parameter to every web service that I have and there sending a password to the server so that it can verify that it's the Blackberry trying to consume the service and not some spammer. That password would go as a String in each JSON request that the Blackberry does.
Another thing that is important to mention is that we have a simple web hosting solution from GoDaddy so our hosting is shared, we don't have full control on the computer.
Is this a correct approach?
For better protection depending on content importance you can use checksums or encryption methods.
You can use bouncycastle cryptography API http://www.bouncycastle.org/. This is free and good.
This can be used in both C# web service and blackberry application because it supports both C# and Java.