Blackberry - Consume .Net Soap Service - ksoap2

I am new to blackberry app development and was wondering if someone could point me in the right direction(and may be a sample application) of how to consume web service in native apps. I'm using Blackberry JDE plugin for Eclipse.
I am able to consume a restful webservice, but now I want to consume a SOAP service. I am new to eclipse , so I would require in detail information.
Thanks,

I followed this none-ksoap2 route and it worked well for me:
http://www.johnwargo.com/index.php/blackberry/dbja2.html
This series of articles explains how to utilise the support the BlackBerry Platform has built in for JSR 172, the J2ME Web Services Specification, by creating a java stub class through the use of a utility in the Sun Java Wireless Toolkit for CLDC and the wsdl for your web service.
The articles give a very thorough and detailed explanation of the steps required to achieve the objective, so I would not wish to repeat them here in full, nor paraphrase them at the risk of my debased shorter version being quoted later. I understand the risk of answering in this way, and I realise that my short explanation above will in no way compensate should the original articles disappear from the internet.

Hey thanks for all the help. Figured it out. The problem was wcf service. When I tried with a simple web service(.asmx), it worked like charm and all the stubs were generated correctly. Probably wcf uses Soap 1.2 default and asmx service SOAP 1.1.
I even tried using KSOAP2 for calling wcf service with little success. Again switching back to asmx instead of wcf, solved the issue.
Now I have problem of plenty, which method to use(KSOAP or Stub) :)
I am all for non KSOAP method, but the only thing that is stopping me is I have to generated stub files everytime a introduce a new method.
Anyways +1 for all the help

Related

How to consume WCF Service with WSHttpBinding in iOS application?

Can we consume WSHTTPBinding service in iPhone Application?
I am trying to consume such a service, but I am getting status code 415. I also tried it with all different possible ways but getting same error code everytime.
In one article, I read that, to consume WSHttpBinding services, .NET 3.0 is required on client side.
So is there any way to consume the WSHttpBinding service in iPhone applications or its not possible.Need some guidance on this one.
Thanks in advance.
There is a response to your question here.
Short answer is "Usually not, but it depends how you configure the WSHttpBinding. BasicHttpBinding is better (and also prefer transport security)."
As I know the situation with iOS+WSHTTPBinding didn`t changed.

JTAPI (Avaya) with MVC

I was wondering if somebody could answer my questions as I have not used JTAPI before.
I am working on a project where the requirement is to click a link on the MVC website and integrate the call to AVAYA phone (i.e. make phone call using handset via the website)
I have also looked at the Microsoft TAPI but looks like there is no integration with Avaya available with TAPI.
Does anybody know how can I use JTAPI with .Net MVC ? I was assuming it would be an API which I can call from my website but it looks more complicated then it sounds.
Please suggest :)
You may use Avaya DMCC. It has an implementation for .NET
But beware the Avaya licensing policy! DMCC may require extra licenses.
To use JTAPI from ASP.NET you have to use Java classes from .NET
Can you use Java libraries in a VB.net program?
http://www.codeproject.com/Articles/13549/Using-Java-Classes-in-your-NET-Application
I would suggest create an Applet in JTAPI and then integrate in any webapplication whether php,.net I recently did the same thing for my PHP web application.
As #Krishna said with an Applet you could designe your soluciĆ³n, designe that i used to do... Buut now and Day Applets have less support over browsers and they have be come a problem than a solution. The way that i found to solve this issue was use HTML5 with Websocket. In this way i create a Windows Service or daemon (for Linux) to handle JTapi session and create a websocket server Layer, and implement the websocket to create the view int he Asp.net view.
Avaya AES does expose a basic web api providing some basic functionalities which you can call directly from your MVC application, but if you need something more advance, then arguably the best solution would be to build a small Java servlet which you will host on something like Tomcat or JBoss which will expose a SOAP or REST API, which you can call from your MVC app.

Implementing a SOAP 1.2 server with Rails 3

SOAP? Why would you use that?
I am using Ruby Enterprise Edition and Rails 3 to write my web application. The application uses Ustream's Watershed white label broadcasting services to provide live streaming for my users. Unfortunately I have hit a snag during development. Watershed allows an application to provide it's own authentication layer through the implementation of a SOAP service on the application side of things. This authentication layer must be implemented in SOAP 1.2 to work with Watershed. To my great dismay, it seems that the Ruby community has moved on past ye'old SOAP towards a brighter future filled with REST and Unicorns.
This makes me happy 99.9% of the time. However right now I need to make a SOAP 1.2 endpoint in my shiny new Rails 3 application.
If anyone has any suggestions or libraries that I can use, I would be very thankful.
Things I have done already
Tried the built in SOAP support in Ruby. Unfortunatly it seems that it does not support SOAP 1.2.
Looked at WSO2 but didn't want to build an extensive set of Ruby extensions on my server just to support SOAP.
Thought about hard-coding xml responses before deciding that I am a lazy programmer.
It's been a while since this Q was posted, but hey, SOAP isn't speeding off either. I guess you've implemented something, care to share?
Anyway, as a kind of answer, I've been blessed with a customer forcing me to consume his SOAP services (their awesome SOA platform doesn't support other formats...) both for pulling and pushing data. I only consume, as I provide nice and clean RESTful Web Services myself for others. I've been using savon (french for soap?) with great success
http://savonrb.com
If you're truly lazy, you'll hard code the SOAP envelope structure and input your dynamic data. Here's a simple example.
def soap_envelope(pCode)
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:prod='http://xmlns.aBigCompany.com/path/to/NeededService'>
<soapenv:Header/>
<soapenv:Body>
<something:NeededServiceRequest>
<something:productCode>#{pCode}</something:productCode>
</something:NeededServiceRequest>
</soapenv:Body>
</soapenv:Envelope>"
end
And this is one way to use it
products_wsdl = Savon::Client.new "http://ipAtBigCo:xxxx/path/to/services/NeededService?wsdl"
begin
response = products_wsdl.process! do |soap|
soap.xml = soap_envelope("someProductCode")
end
rescue => e
MyLogger.error "Error: SOAP call for code #{pCode} failed. ++"
raise e
end
response.to_hash # This is the nice part
About SOAP 1.2, savon supports it. About actually being a SOAP service provider, I haven't done it in rails (fight it!) and can only wish you good luck. Having to develop the stupid WSDLs yourself is the real pain with SOAP services. Hope this helps anyone.
If you cannot avoid SOAP in Rails 3, then try wash_out gem. You can find it at: https://github.com/roundlake/wash_out
We used in our system. It is not fool-proof and still undergoing some changes, at least you would get started
Although Rails 3 onwards, they have kind-of stopped supporting SOAP - wash_out gem helps you to get started with creating SOAP webservice faster. Anyone interested should have a look at the wash_out wiki on github. In our case, client wanted a SOAP webservice to be exposed; we tried to go the REST way. In the end, we had to say yes to SOAP. I tried aws, soap4r - but wash_out turned out to be best fit.
You can use this gem for soap implementation
savon
You may find what you are looking for here http://aws.rubyonrails.org/

Consuming an ADO.NET Data Service from a WIN32 Delphi application. How?

Simple. I created a LINQ-TO-SQL Entity model, created a website, added a Data Service (*.svc) to this site and made sure it works by writing a simple .NET console application. The service works fine and cannot be modified.
Now I'm going to write a Delphi application (2007) for WIN32 which will have to call this data service. And while Delphi has no major problems importing a SOAP service, it can't import this service since it provides no WSDL...
So, two options. I could figure out how to generate a WSDL based on this data service or I'll have to find another way to consume this service. (Or just give up, but I hate to quit this challenge.) So, any advise?
ADO.NET Data Services are REST services. They are not SOAP WebServices and I don't think REST uses WSDL. You can call REST services from Delphi using HTTP GET/PUT/POST/DELETE. You could use Indy's TIdHTTPClient. See http://msdn.microsoft.com/en-us/library/cc668786.aspx for url examples. The results are in the Atom format, which is a XML format. You could parse it with TXMLDocument. They can also return JSON.
Maybe you can use the project Jedi "url grabber" components to consume the service. I have managed to get live share data using these in the past. I do not know exactly how your setup works, but maybe these can be helpful.
http://www.delphi-jedi.org/
You should also look at synapse, a small easy to use library which works well with REST. The latest version, which can be downloaded via SVN, works well in Delphi 2009.

Integrating Oulook/Exchange Tasks with Linux-based Rails

Is it possible to integrate MS Outlook/Exchange tasks with Rails? I know how to send emails with Rails, but that isn't using anything "special" about exchange, just pointing it at the server.
What is "special" about an Outlook Task and how I can I create/read/update/delete them from Rails. (Even a subset of CRUD would be great.)
PS. I am on a linux based rails system, so solutions that rely on a windows-only function won't work for me.
If you are running Exchange 2007 you should also look at Exchange web services to manipulate things.
I am in the process of building a MS Exchange client access library in Ruby that uses MS Exchange Web services. The code is GPL'd so have at it. Please let me know what kind of issues you have and what other features you'd like to see. It's pretty heavy in development at this point.
http://github.com/zenchild/Viewpoint
Cheers,
Dan Wanek
WebDAV might be the way to go, if you'd like to do it in Ruby. There is a ruby gem call rexchange that can do the trick. However, MSFT is phasing out WebDAV and replacing it with the Exchange Web Services, which is Zoredache suggested. Unfortunately, MSFT only provides API in C# (technically, it's SOAP stuff that is language-agnostic, some Java developers seem to sucessfully build some stuff using EWS, but I have yet known anyone has done this in Ruby.)
Assuming that the tasks are stored in Exchange, you should be able to access the tasks through WebDAV.

Resources