I got the PayPal integration working well using plain old HTTP POST using C# & .NET 2/3.5. I also get all transaction details in the response.
So, if I want to use WSDL (SOAP), will there be any advantage? (you can assume I know how to use web services)
Also, are there any examples on a complete C# project using this method? I already looked at http://www.codeproject.com/Articles/42894/Introduction-to-PayPal-for-C-ASP-NET-developers
but that page tells very little about how to make a fully functional transaction using WSDL.
Any ideas?
Or "if it ain't broke, don't fix it"
thanks!
I really don't work from WSDL's very often because I'm primarily a PHP developer. I have worked with them in Adobe Flex, though, and I gotta say I liked what I saw.
Basically, I was able to hook the WSDL up in Flex (which you can do in other IDE's as well) and it automatically gave me access to all of the API calls in the system. I could see all of the possible requests (functions) available to the web service as well as how to build them without even referring to much documentation.
When building HTTP requests directly (NVP/XML/JSON/etc) you gotta refer to documentation quite a bit to see how to build the request, and there's typically more trial and error involved, too, until you get things working. The WSDL helps you get around that, although, in reality you'll probably still be referring quite a bit to documentation.
The WSDL/SOAP tools I've used with PHP don't work nearly as nice as Flex or Visual Studio from what I've seen, so I typically stick to custom class libraries that build my requests for me. when I'm working in other platforms that utilize WSDL's a little nicer, though, I definitely prefer it.
Related
I have developed a Django app which hosts a bunch of forms that collect information about issues and I want to use this data to create Jira issues programmatically.
I have a conceptual idea of how that can be achieved but my problem is that I am a complete software development newbie and also have never used Jira to this date, hence googling stuff is quite hard as I have an almost non-existent vocabulary in these regards and things get quite overwhelming really fast. I want to know if what I have in mind even makes sense before I delve deeper into documentations and figuring out how to implement stuff.
So I'm going to send POST requests from my Django app containing the issue information in JSON format. These POST requests would then be handled by some Java service which in turn uses the JRJC to create issues on Jira. In my head this implies that I have to develop a whole server (or use some kind of framework for that matter) for django to send its requests to and handle them. Would it be possible to write a plugin for JIRA that bypasses the need for such a server so I could just write the service for handling the requests and expose it on some URL based on the domain of my Jira instance?
I apologize if my question appears vague or ill-structured. Any attempts to shine light on my incompetence or pointing fingers in some direction will be greatly appreciated!
I assume that you're talking about Jira Server (hosted by you) rather than Jira Cloud (hosted by Atlassian).
A Jira plugin can expose a REST endpoint, so yes, you can write such a plugin and POST to an endpoint you define, which then uses the Jira Java API to create issues.
See https://developer.atlassian.com/server/framework/atlassian-sdk/rest-plugin-module/ for information on putting REST endpoints in your plugin.
This is my understanding:
Swagger is a notation/rules to write documentation. But why is it called a framework (like Angular/MVC)?
Swashbuckle is a program (JavaScript?) that generates the documentation (based on Swagger rules).
Swagger UI displays the documentation. It uses Swashbuckle to do this.
Is this information correct? If not can someone explain in simple terms what Swagger, Swashbuckle, and Swashbuckle UI mean?
Also, what do I lose as an API developer if I do not use this?
Swagger is a notation/rules to write documentation. But why is it called a framework(Like angular/MVC)?
It is probably called a "framework" because its' purpose is to offer a systematic way of notating the interface of any RESTful service under the OpenAPI Specification. This is a big deal to developers because the spec is overseen by the Open API Initiative under the reputable Linux Foundation.
Swashbuckle is a program(javascript ?) that generates the documentation(based on Swagger rules)
Swashbuckle is more of a package (or a library) that you can make use of in your .NET Web API projects. It's purpose, as you have correctly indicated, is to generate the Swagger spec for your project. Additionally, the Swagger UI is contained within Swashbuckle so if you are developing an API in .NET it's really a nice one-stop shop of a package. It is almost entirely written in C#, not JavaScript.
Swagger UI displays the documentation. It uses Swashbuckle to do this.
Yes, it does display the Swagger spec in a nice, human-friendly manner. However, Swashbuckle is not a necessary component for this. They are, aside from what I just said previously, completely mutually-exclusive.
Also what do I lose as an API developer, if I do not use this.
This is now entering into the realm of opinion but I'll try to be objective about it. I use Swashbuckle to assist in the creation of clients for my application APIs. After getting past the implementation learning curve (which wasn't much), this package has saved me quite a bit of time of writing the clients myself. Writing a web client is a trivial thing for small applications but enterprise-level applications have a tendency to keep growing and/or changing in complexity so it is nice to have the creation/updating of these clients completely automated.
In short, if you decide not to use it you must either resort on an alternative method of API client generation or write/update the clients yourself. If you are only developing the back end this may be completely pointless to you but it would certainly help whoever is responsible for creating the client apps that will consume your API services.
I hope these answers have been helpful. Cheers!
I've run into a similar situation to this chap where I'd like to have dart:io and dart:html in the same application. I know that dart:io is a server-side library and dart:html is a client side. My situation is as follows. I have a program to outputs a huge amount of text to a log file. I've found Dart to be great at text manipulation. I wanted to take the log file text, manipulate it, put some information in headed textareas for readability etc., and view the page.
I have no intentions to put this on the web. It's just for my work computer. I just want the file loading capabilities of dart:io and the nice display of dart:html. The previous post was in April and development on Dart is speedy. Is there now another way of doing what I want?
I know I could write a program to build a HTML file with the manipulated text in the appropriate fields and then open that HTML file but I don't like that idea as much. Is there another way?
You may consider using this library html5lib on server side apps to generate HTML output. Then it's simply a matter of opening the file up in a browser. This can also be automated by calling starting a Process which launches the browser and points to your generated html file.
html5lib is still a work in progress, but I'm sure they would like to hear your feedback.
I do agree that if all you want to do is to create a static web page, then using a lib like html5lib may be the best. However, if you like to do something more I think the way to go is to think of the server side dart as the model and the client side as the "rest". What the rest is depends mostly on if you like MVC, MVP, ...
I have been close to develop a desktop app in dart but I still haven't found an interesting enough example to get me going. I have been thinking of how I would do it though, and I believe that by connecting the two sides (model and "the rest") with a web socket, a make a simple serialization protocol (e.g. json), you can easily create an rpc with a client side wrapper using noSuchMethod() as the proxy and on the server side you use mirrors. You can create callbacks the other way if you like using the web socket. I believe Gilad mentioned a similar rpc technique between isolates in his talk from the HTML5 Dev Conf.
Anyway, what you would get is both dart:io and dart:html in the same "app", but the app would consist of a server side and a client side. This is what I will try for my next desktop app, whatever that will be :)
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
Does anyone know of an example facebook app (or facebook connect app) done in Erlang? I'm looking for something that includes the whole process. Specifically I don't seem to find anything on user authentication.
I've checked out erlang_facebook, erlang2facebook and erlyface but none of them seem to offer a simple and comprehensive example accessible to me as a beginner .
I'd be happy for just a bit of code to plough through though, preferably using mochiweb as backend.
I've played around writing a FB app in Erlang and looked at the projects you mentioned as well. I found it easier to just use FB's graph API directly for authentication, etc. I used Nitrogen/Mochiweb for the web server and made graph requests with httpc:request.
Zotonic (Erlang CMS/Framework) provides Facebook integration, including authentication.
http://zotonic.com/mod-facebook
A few years on and I still find Jeremy Raymond's method satisfying. In particular, wrapping their ever-changing url-as-an-API scheme inside your own API seems to be the most painless. httpc is useful, and so is cowboy if you are familiar with that.
Whatever you choose, you should absolutely not be designing your ideas around their API. Convert their ideas into your project's semantics by wrapping their API. After all, the web isn't the whole internet and you never know when FB might stop being the cool place to waste your life. There is no telling if your application/library/codebase-you-use-on-something-else will outlive theirs.