.NET wrapper for JIRA api? - jira

I'm working on a JIRA implementation and need to make use of the API.
Does anyone know of an existing .NET wrapper for the JIRA SOAP API?

In a Visual Studio .NET project, right click the project references and choose 'Add Service Reference', enter the URL of JIRA's WSDL descriptor (http://your_installation/rpc/soap/jiraservice-v1.wsdl), and Visual Studio will auto-generate a .NET class for accessing the JIRA SOAP API.
The parameter names aren't particularly meaningful so you'll need to refer back to the documentation quite a bit at first.

In Visual Studio .Net 2010 choose menu Project and Add Service Reference. In the dialogue choose advanced option. Then in the new dialogue choose Add Web Reference.
http://localhost:8080/rpc/soap/jirasoapservice-v2?wsdl where localhost:8080 is your installation of jira.
I did not get it to work in VS2010 with just Add Service Ref. It then only created methods without any parameters. For example the login method claims to have no arguments althought the [documentation](http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html#login(java.lang.String, java.lang.String)) says there should be a user and a password parameter. See this jira forum for more info in the matter.
I did not need to use the old program Wsdl.exe. But I do not get any intellisense of the parameters more then what type it is like:
this.JiraSrvTalker.createIssue(string In0 and,RemoteIssue In1)
To know that the first parameter should be a token from
this.LoginToken = this.JiraSrvTalker.login(JiraAdmin, JiraAdminPwd);
you have to check documentation.

I was also unable to get parameters on the methods when using a service reference. What I had to do was a strange 'add web reference' trick.
Add Service Reference
Click 'Advanced...', in the lower left corner
Click 'Add Web Reference...', also in the lower left corner
http://<servername>/rpc/soap/jirasoapservice-v2?wsdl
You will now have a 'Web Reference' folder under service references, with the <servername> as the name.
var jira = new com.myserver.JiraSoapServiceService();
var loginToken = jira.login("user", "pass");
var issue = new com.myserver.RemoteIssue();
jira.createIssue(loginToken, issue);

JIRA SOAP API has been deprecated. So use REST API instead.
Here is JIRA REST API .NET wrapper: Atlassian.Net SDK

As per this page https://developer.atlassian.com/jiradev/support/archive/jira-rpc-services/creating-a-jira-soap-client/remote-api-soap-examples, JIRA SOAP API has been deprecated, and as per this page https://developer.atlassian.com/jiradev/latest-updates/soap-and-xml-rpc-api-deprecation-notice, completely removed from JIRA 7.0+.
I would recommend to go with JIRA REST API.

Related

Can't access webservice using Xamarin and WCF

I would like to consume a public web service using Xamarin and WCF. For this demo, I'll be using Xamarin.iOS .
This is the (public) webservice I'm trying to consume:
http://www.webservicex.net/globalweather.asmx?WSDL
Inside Xamarin Studio, I add a Web Reference with the URL from the webservice. The selected Framework is set to Windows Communication Foundation (WCF).
Now, I'm using the following code to connect with the service:
var _client = new GlobalWeatherSoapClient();
_client.BeginGetWeather ("Berlin", "Germany", (ar) => {
var result = _client.EndGetWeather(ar);
}, null);
When executing this code, I'm getting a System.NullReferenceException. This is the problem, why isn't it working correct?
The strangest part: When I'm not using WCF, but select .NET 2.0 Web Services as Framework, everything seems to be working fine.
I can't see what's wrong with my WCF code - according to the docs, everything should work ok.
I hope somebody can help me out! Thanks in advance!
You are not following the docs.
Quote from that page:
To generate a proxy to a WCF service for use in Xamarin.iOS projects,
use the Microsoft SilverlightServiceModel Proxy Generation Tool
(SLSvcUtil) that ships with the Silverlight SDK on Windows. This tool
allows specifying additional arguments that may be required to
maintain compliance with the service endpoint configuration.
So, first thing is that you need to create a proxy on a Windows machine with slsvcutil. Adding WCF references to project through Xamarin Studio does not work. It only works for .NET 2.0 Web Services, that's why that option is OK.
Second thing, after you have created your proxy on Windows with slsvcutil, you need to add it to your project.
Third, you need to initialize it like this, with basic http binding (again, code from the above link):
var binding = new BasicHttpBinding () {
Name= "basicHttpBinding",
MaxReceivedMessageSize = 67108864,
};
//...
client = new Service1Client (binding, new EndpointAddress ("http://192.168.1.100/Service1.svc"));
Suggestion: forget about WCF on iOS. That article contains very useful information on other means of client-server communication.

ASP.NET MVC Windows Azure organization authentication

I'm trying to configure the organization authentication in an ASP.NET MVC project in Visual Studio 2013 RC.
After filling the data in the create project dialog, like Microsoft instructed in their tutorials, I'm getting an error which says that the configure failed.
I've tried to do so as well in Visual Studio 2012 using the identity addon.
Maybe it's related to Windows Azure AD?
Here is the error that I'm getting:
Hopes that someone knows how to fix that issue. Thanks for any help and suggestion!
This question is old, but today I found a workaround that I'd like to share.
It seems like we can't use Microsoft Account when we're using WAAD.
So:
Create a WAAD.
Add an administrator
Choose local directory account, not Microsoft Account.
Grant this account Global Administrator permissions.
Open Visual Studio and create a new web based project.
Choose in authentication the "Organization Accounts".
Specify your WAAD URL (e.g. "foo#onmicrosoft.com").
When you're required to insert your user and password, use the local account username and password. for example ("oz#foo.onmicrosoft.com").
This will allow you to pass the error.
Edit:
Microsoft published a post that referred to this problem and show the solution (the one I described above). http://www.cloudidentity.com/blog/2013/12/11/setting-up-an-asp-net-project-with-organizational-authentication-requires-an-organizational-account/
I would check for two things:
The account used to login to Windows Azure while has Global Admin role in AAD
App ID URI specified in the project creation dialog is valid. Valid App ID URI for domain mydomain.onmicrosoft.com has format https://mydomain.onmicrosoft.com/uniqueUri. Note that you can leave this field blank and the tool will automatically pick the correct App ID URI for you.
If these two things don't help, I would encourage you to run DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) in the background while trying to create a similar project and you can see the actual error message in the trace in DebugView.
In follow up to OzB:
Once you've setup the user in AAD as per OzB's account,
note that you must also then go to "Settings" in Azure and add that account as an administrator of the Azure subscription, otherwise you can't upload the website itself.

Using the razor engine in SharePoint 2013 Visual Web Part

I'm trying to make use of the razor engine in a SharePoint 2013 Web Part. This, I read, shouldn't be too difficult since SharePoint 2013 Visual Web Parts can be built using .NET Framework 4.0
I'm simply not sure of where to begin to do this. I've seen an article on uploading the .cshtml file onto a document library and referencing the document library in the Web Part, but it is a bit unclear.
Does anyone have an idea of how I can start? Or point me to a step-by-step guide to achieve what I am after.
What my end goal is: Take a piece of an MVC application, customize it and make it a Web Part. I need to be able to modify or access SharePoint content on that site which is why I cannot use an App Part.
Okay.
First install the Office Development Templates from
http://www.microsoft.com/visualstudio/eng/office-dev-tools-for-visual-studio
This will give you the following template selection on reopening Studio
Then navigate to wherever EwsManagedApi32.msi is and enter the following command in an elevated prompt -
EwsManagedApi32.msi addlocal="ExchangeWebServicesApi_Feature,ExchangeWebServicesApi_Gac"
Now your templates are usable and the one you want is "VS2012 Web Part".
Now, by default this will add an ASP.NET project, which is not what you want, so manually delete the ASP.NET project, add an MVC one, highlight the SharePoint project in Solution Explorer, hit F4, and select the MVC project in the "Web Project" dropdown at the bottom of the properties.
And there you go. One controller per web part, sorted.
I am sharing link SharePoint MVC webpart that uses Knock out framework using MVC for SharePoint. It has step by step instructions which might help you.
Hope this will be a good starting point
http://www.codeproject.com/Tips/739445/SharePoint-Razor-View-WebPart

Create web service using external WSDL through Add Service Reference

I have an ASP.NET MVC3 project in .NET 4 which needs to act as a SOAP server to receive notifications from another website.
I have created web services before, but I don't know how to set up a way to receive these notifications where the WSDL is provided by the external website.
I know I can create a service and get that to produce its own WSDL, but I'm assuming there must be an easy way to add a service reference, and then create a service that uses the objects/methods generated by it.
How do I do this?
Thanks
You can use the svcutil tool from visual studio commands line, to create the required configuration and proxy files

Integrating FedEx Web Services into .Net, stuck at step 1

I'm signed up, I've downloaded sample code, I've got a WSDL...and yet I have no idea how to get this stuff into my existing .Net application. The WSDL was in a zip file, not a URL so I can't just "Add Web Reference." I've run the wsdl tool from the .Net command prompt, and it made a nice class for me...yet dropping that into my web_reference folder doesn't give me any kind of instantiatable class.
I know I'm missing something stupid. Can someone point me in the right direction please?
The proper way to load the FedEx API WSDL file in Visual Studio 2010:
Open the Solution Explorer
Right click your project
Click 'Add Service Reference'
Click the 'Advanced...' button
Click the 'Add Web Reference...' button
Enter the exact path to the WSDL file for the specific FedEx web reference you're using. For example, I extracted mine to the root of my C:\ drive, so all I entered into the URL field was "C:\ShipService.wsdl" without quotes. If you leave quotes, it won't work.
When you hit go, Visual Studio should consume the wsdl into workable classes for you. Click Add Reference and enjoy!
Note: Make sure you read the FedEx documentation well - a lot of their services have gotchyas and implementation can be a nightmare. For example, their address validation service is consumed incorrectly and creates two-dimensional arrays in Reference.cs where they shouldn't exist - this is detailed in the documentation. Worse yet, the fact that they don't allow address validation on their dev environment isn't documented anywhere! Good luck!
Actually, you can just "Add Web Reference". Give the path to the URL.
OTOH, you should be doing all new web service development (even client development) using WCF. Microsoft now considers ASMX web services to be "legacy technology".
BTW, I just tried using their address validation service, and it won't work with .NET. Both ASMX and WCF clients will attempt to use the XML serializer to consume this service, and there is a bug there that prevents that service from being used.
Matt, the WSDL zip file has the WSDL and its associated transactions for that service. Unzip the file and then "Add the reference" to the WSDL in your code.
Try changing the namespace of the proxy class to that of your application. I currently use the proxy class with C# and it works in spite of FedEx's limited documentation and samples.

Resources