Blackberry SOAP web service call without KSOAP - web-services

I've had nothing but problems using libraries that claim to simplify consuming SOAP Web Services. I've been using KSoap2 on the Blackberry to accomplish this, but I'm not liking the process at all.
On Android I manually created my envelopes with much success, I ended up doing the same on iPhone after much disappointment using SudzC.
I would like to do this for Blackberry as well. What classes should I use and how should I structure the envelope?
Thanks a lot.

See this article on the use of the Java Wireless Toolkit to create your coded stubs from your wsdl. It will save you a lot of time (and pain). I based my SOAP web service code on this article, and it worked well for me.
http://www.johnwargo.com/index.php/blackberry/dbja2.html

I'm consuming REST services that output XML documents, and we're doing all XML processing with the DOM libraries provided by RIM (using classes like net.rim.device.api.xml.parsers.DocumentBuilder and net.rim.device.api.xml.parsers.DocumentBuilderFactory).
The HTTP part can be done Java ME IO support (with javax.microedition.io.HttpConnection). Making your own SOAP WS client sounds like a lot of work, but it can certainly be done.

Related

Is it possible to write soap web services using .net core?

I have been tasked to explore if its possible to write soap services on .net core. It seems like there is a test version of WCF for consuming. But i have not been able to find much abt producing soap web services. Is it possible?
So the WCF client libraries have been ported to .net core but the server side libraries haven't as of the time of writing. There is this long running issue which is a request for the server side libraries to be ported over and Microsoft are saying it will happen, see this from a few weeks ago:
WCF for .NET Core is very much on our radar, and we are working with the ASP.NET Core to prioritize this work. We will share more details when they are available to broadcast publicly.
Of course you don't need WCF necessarily to do SOAP but I guess that's what you were asking. A quick search gives this repo and I guess the are probably others but WCF isn't there yet.
If you need something production quality on .NET Core now you can use Service Stack. Info on SOAP services is here:
http://docs.servicestack.net/soap-support
Info on .NET Core is here:
http://docs.servicestack.net/netcore
Unfortunately it is not a free product, but it's pretty solid and in my view worth the cost.
https://servicestack.net/pricing

Access Exchange Mails using EWS without C# code?

Is there a way I can access the Exchange Mails/Calendars/Addressbook without .NET or non cross platform thing? I want to access them with C++ but on both MS and Linux. Their docs says it is possible but there is no any non C#/.Net example.
EWS combines the functionality that is included in WebDAV and CDOEX, and provides logic that makes common scenarios such as calendaring workflows easy to implement. EWS is a SOAP-based XML Web service that can be accessed remotely from any operating system and any language that can send requests over HTTPS.
Please share with me if there is any way or I'm missing something!
Thanks!
I agree that there are few examples outside the C# / Powershell realm. That being said, if you stick to plain EWS, it should be possible. I have no idea the WebServce access from C++ is anything similar to C#. In C# you point Visual Studio (or wsdl.exe) to the WSDL of the WebService and it will create a set of proxy classes which do all the SOAP handling.
If you don't have something similar with C++ you'll need to build the SOAP requests yourself.
See http://msdn.microsoft.com/en-us/library/bb204119(v=exchg.140).aspx for a reference to the EWS operations and XML elements.
One thing you might want to utilize is the EWS Managed API. It has a nice tracing feature which dumps all the requests/responses to the console. So, you can write up a small test program and see what the request has to look like. This could help you building the EWS requests on the C++ side.

How to connect a C++ program to a WCF Service?

In the place I work there are some software written in C# and some written in C++ (the most important ones). Some time ago we decided it would be a good idea to track any possible problem in the software, by sending stack trace and exception information over a web service. So I came with a WCF Service, that gets the information and store them on a database and send an automatic e-mail. It worked, we had to secure it through password, it's done, but now I want our other software, the one written in C++, to use this webservice (this software is used both on windows and linux, so we can't just make a call to another software in the user machine).
I've googled about it, and found this tutorial on how to use gSOAP, which so far didn't help me very much (lots of errors, it is not very detailed, and the web.config file is impossible to read). I was wondering if is there any other way to achieve this. In adition, since I'm using authentication on my webservice, it now has a wsHttpBinding (which AFAIK isn't supported by gSOAP).
Can you guys help me out?
Since your WCF service is in C# with .NET, and the only issue is getting the C++ application to be able to talk to it, one way is to follow the advice in REST / SOAP Endpoints for a WCF service and related articles.
Your C# programs continue to have the full SOAP access to your service.
Your C++ programs could do something like this for REST access:
"Browse" to the HTTP GET URL for the service command you wanted.
Then toss (or parse and use) whatever response came back.
It is a pretty minimal change to your WCF service to offer both SOAP and REST.
The REST ability opens your service to JavaScript as well as C++ clients.
You may need to restrict the interface to simple data, or class objects that are easy to parse in C++.
Will the machines running the C++ applications have the .NET Framework installed?
Check out: Create WCF service for unmanaged C++ clients

How do I test webservices?

I am a novice in web services. I am totally new to testing web services.
A new project demands that I test the web services, and the customer is in favor of any open source tool.
What is the approach to testing web services?
Also Please suggest a tool(with minimal scripting) to test web services?
Check out SoapUI - one of the best web service test tools - plus it's free!!
They also have a "Pro" version which costs - you can do more stuff, like load testing etc., but the free version is quite good enough for most of your testing, I'd say!
Given a WSDL (online or stored as file), it'll create stubs for each method, which you can then use to create requests (as XML), fill in the blanks (the parameter values), and then you can send off your request to the web service and see what comes back as a response.
SoapUI also allows you to write scripted tests than can be run over and over again.
Excellent tool - can't praise it enough!
Marc
Additionally you could use Firefox Poster in order to test your web service by passing XML-packets manually.
Check it here:
FF Poster
SoapUI is a great tool to test SOAP webservices. It allows you to test a SOAP client or a SOAP server.
Another very useful tool is Fiddler. Fiddler isn't necessarily aimed at testing webservices (it's a HTTP debugger), but since SOAP webservices run over HTTP, you can use it to testing. Another very important advantage of using Fiddler is the fact that you can test REST webservices also.
You might want to consider robot framework. It is a generic, keyword-driven testing framework. There are libraries for testing REST and SOAP based web services. It can also be used to test web pages (via a selenium library), databases, and a whole lot more.
robotframework has a ton of built-in keywords, and there are additional libraries that do much more. You are also able to develop your own keywords in python, java, .NET languages, or any other language.

What is a good platform for devoloping web services in C++?

We're looking at developing a Web Service to function as a basis for a browser display/gui for a networked security prototype written in C++. My experience with web services has been limited to Java. I prefer Web Services in Java because it's on the "beaten path".
One sure was to do this would be to simply code a Java client which invokes the web service, and call it as a command line with parameters from the C++ code.
It's not ideal, since generally speaking an API is preferable, but in this case it would work and be a pretty safe solution.
A resource which does handles web service development in C++ is called gSOAP, at this url: http://gsoap2.sourceforge.net
Any thought on which is a better approach? Has anyone used gSOAP, and if so, what did you think?
I'd done things with gSOAP, it's not awful. I'm increasingly opposed to the RPC model for web services, though; it forces you into a lot of connection and session state that adds complexity. A REST interface is simpler and more robust.
To me is Axis C++.
For RPC style, have a look at Thrift,
I found it quite better ( faster, clearer, a lot of languages implementations) than soap.
My colleague ended up using a combination of Axis2 / java (for the service) and gsoap for the client. He created the wsdl from the Java service by generating it from a C++ header (using c2wsdl (?) or something like that. He said it was better than using a Java interface because that generated two sets of wsdl, for seperate versions of soap.
Then he used wsdl2java to generate the webservice and a test web client. Once we got that working, he used gsoap to create the web client (in C++), and it worked fine.
thanks for all the answers! I ended using a combination of them.
I had very good experience with gsoap - very simple, performance is good.
If it is acceptable to run only on Windows, there is a brand-new API for that purpose: WWSAPI
Instead of calling the java client from the command line, you can create a java virtual machine inside your C app, instantiate the class and call any methods. This is what the java.exe app does and I think the source code is included in the jdk.
Depends on how low level you want to go. You might checkout yield.