开发者

Java ME consuming .NET Web Service the safe way

开发者 https://www.devze.com 2023-01-12 17:18 出处:网络
I\'m developing an application for Blackberry that consumes .NET Web Services that are hosted on our public web server.

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 开发者_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.

0

精彩评论

暂无评论...
验证码 换一张
取 消