How to remove an attachment using JIRA soap service

Reading the API I don't see any methods that can do this?




Yes, it would need a custom SOAP plugin. Not too hard, just annoying that the method isn't there.


SOAP doesn't support this, but you can do it via HTTP, e.g. (C#)

using (System.Net.WebClient client = new System.Net.WebClient())
    string url = "http://jira-server/secure/DeleteAttachment.jspa?id=" +
                 issue.id + "&deleteAttachmentId=" + attachment_id;

    client.Credentials = System.Net.CredentialCache.DefaultCredentials;
    string response = client.DownloadString(url);
    // do whatever validation/reporting with the response...

You can check the url from your web browser - has to be the deletion confirmation page, not the link from the initial delete button.

受限制的 HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。

  • 用于 JIRA api 的 .NET 包装器?(.NET wrapper for JIRA api?)
    问题 我正在研究 JIRA 实现并且需要使用 API。 有谁知道 JIRA SOAP API 的现有 .NET 包装器? 回答1 在 Visual Studio .NET 项目中,右键单击项目引用并选择“添加服务引用”,输入 JIRA 的 WSDL 描述符的 URL(http://your_installation/rpc/soap/jiraservice-v1.wsdl),Visual Studio 将自动生成用于访问 JIRA SOAP API 的 .NET 类。 参数名称并不是特别有意义,因此您首先需要大量参考文档。 回答2 在 Visual Studio .Net 2010 中,选择菜单 Project 和 Add Service Reference。 在对话框中选择高级选项。 然后在新对话框中选择 Add Web Reference。 http://localhost:8080/rpc/soap/jirasoapservice-v2?wsdl 其中localhost:8080是您安装的 jira。 我没有让它在 VS2010 中工作,只是添加服务引用。 然后它只创建没有任何参数的方法。 例如,登录方法声称没有参数,尽管 [documentation](http://docs.atlassian.com/software/jira/docs/api/rpc-jira
  • 将名称空间声明从有效载荷移动到轴创建的 Web 服务上的信封(Move namespace declaration from payload to envelope on an axis created web service)
    问题 我刚刚使用 axis 和 eclipse 创建了一个 Web 服务客户端,它不适用于我的 Web 服务提供商。 Web 服务客户端创建的消息如下所示: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <enviarMensajeRequest xmlns="http://www.springframework.org/spring-ws/Imk-Zenkiu-Services"> <usuario>someuser</usuario> <clave>somepassword</clave> <mensaje>somemessage</mensaje> <contacto> <buzonSMS>somenumber</buzonSMS> <primerNombre>somefirstname</primerNombre> <primerApellido
  • How do I get a list of custom fields in JIRA with Perl SOAP?
    I was curious if anyone else had an idea how to get a list of all of the custom fields you have created in JIRA? If so, how did you do it? I've been trying to use a Perl SOAP routine I found on JIRA SOAP service documentation, but I have no idea how to implement it.
  • 泡沫 + JIRA = SAXException(Suds + JIRA = SAXException)
    问题 我使用 Python 2.6 和 suds 0.3.7 与 JIRA 4.0 交互。 当我连接到 JIRA 服务器时,我可以很好地获得有关所有问题的信息。 然而,当我想更新一个问题时,我从 suds 得到一个 SAXException(大概): WebFault:服务器引发错误:org.xml.sax.SAXException:反序列化时在数组元素中找到字符数据 我正在按照此处描述的步骤操作:http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client 只用 suds 替换 SOAPpy 调用。 我尝试更新一个问题看起来像这样,除了例外: >>> w="http://bugs/rpc/soap/jirasoapservice-v2?wsdl" >>> from suds.client import Client >>> client = Client(w) >>> auth = client.service.login("myname","mypass") >>> issue = client.service.getIssue(auth,"BUG-30112") >>> issue.summary This is the original summary for BUG-30112 >>> >>>
  • Spring WS Web 服务。 使用 SAAJ 向响应添加附件 - 端点没有适配器(Spring WS web service. Adding an attachment to the response using SAAJ - No adapter for endpoint)
    问题 我真的很难让 Spring-WS 返回带有附件的响应。 我已经设法让 MTOM 版本工作,但这对客户端有一些先决条件,因为我相信客户端也必须启用 MTOM(如果这不正确,请纠正我)。 我现在想要做的是使用标准 SOAP 和使用 SAAJ 和 Spring-WS 的附件实现。 为此,我实现了一个端点,该端点仅将本地文件系统中的图像附加到响应。 @Endpoint public class TestEndPoint { private SaajSoapMessageFactory saajMessageFactory; @PayloadRoot(namespace="http://ws.mypackage.com", localPart="downloadMessageRequestSaaj") @ResponsePayload public JAXBElement<DownloadResponseSaajType> invoke(@RequestPayload DownloadMessageRequestSaaj req, MessageContext context ) throws Exception { DownloadResponseSaajType response = new DownloadResponseSaajType()
  • Spring WS web service. Adding an attachment to the response using SAAJ - No adapter for endpoint
    I am really struggling getting Spring-WS to return a response with attachments. I have managed to get an MTOM version to work but this has some pre-requisites on the client as i believe that the client has to be MTOM enabled as well (please correct me if this is not correct). What i am trying to do now is to use the standard SOAP with attachment implementation using SAAJ and Spring-WS. To do this i implemented an endpoint that just attaches an image from the local filesystem to the response. @Endpoint public class TestEndPoint { private SaajSoapMessageFactory saajMessageFactory; @PayloadRoot
  • Suds + JIRA = SAXException
    I'm using Python 2.6 and suds 0.3.7 to interact with JIRA 4.0. When I connect to the JIRA server, I get information on all the issues just fine. However, when I want to update an issue, I get a SAXException from suds (presumably): WebFault: Server raised fault: org.xml.sax.SAXException: Found character data inside an array element while deserializing I'm following the steps described here: http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client only replacing SOAPpy calls with suds. My attempt to update an issue looks like this, complete with exceptions: >>> w="http://bugs/rpc/soap
  • 使用其余api更新jira问题。 不肥皂(Updating a jira issue with the rest api. NOT soap)
    问题 我的更新jira问题的php函数是这样的。我已经对问题ID进行了硬编码。它在if (property_exists($result, 'errors')) 。 说参数不是对象。 function post_to($resource, $data) { $jdata = json_encode($data); $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_POST => 1, CURLOPT_URL => JIRA_URL . '/rest/api/latest/' . $resource, CURLOPT_USERPWD => USERNAME . ':' . PASSWORD, CURLOPT_POSTFIELDS => $jdata, CURLOPT_HTTPHEADER => array('Content-type: application/json'), CURLOPT_RETURNTRANSFER => true )); $result = curl_exec($ch); curl_close($ch); return json_decode($result); } function create_issue($issue) { return post_to('issue/10224
  • HTTP 标头中缺少 Spring WebServiceTemplate SOAPAction(Spring WebServiceTemplate SOAPAction missing in HTTP Header)
    问题 我在通过 Spring-ws WebServiceTemplate 调用 SOAP 1.2 WebService 时遇到了困难。 正在发出的请求在 Http 标头中缺少 SOAPAction,并且服务器抛出错误“无法处理没有有效动作参数的请求。请提供有效的肥皂动作。” 通过wireshark进行监控,我能够确定缺少SOAP Action。 我也不支持任何代理。 我已经通过 TCP Mon(类似于 SOAP UI 的工具)运行请求来确保我尝试发送的 SOAP XML 是有效的,并且能够获得响应。 这是我的弹簧配置: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www
  • How do I use Ruby's SOAP::Attachment class?
    So I'm writing a Ruby client for a SOAP web service, and I've figured out how to call a simple method: # WebServiceClient.rb require 'soap/wsdlDriver' wsdl_url = 'http://urlmadness?wsdl' service = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver result = service.simpleMethod(:sayHello => 'Hello') p result.return Now I need to write something that will call a web method that is expecting an attached file as a SOAP MIME Attachment (SwA). I've looked into Ruby's SOAP::Attachment class but I can't seem to figure out how to use it, and I can't find any examples anywhere. Does anybody know
  • ColdFusion SOAP response with attachments
    I am using Coldfusion9 to interact with a 3rd party SOAP service with which I need to both send and receive SOAP with attachments. I am having no issue in receiving the SOAP which may or may not have binary attachments by using ToString() around the HTTP content to convert the SOAP Body into a usable string, however the service requires that I send my response back using attachments as well which is where I am coming undone. I've just never done this in ColdFusion and i'm not exactly sure how I should be presenting this to the originating service so that the SOAP body is referenced via an ID
  • 使用 AXIS2 创建的 ADB 存根在客户端获取原始 XML SOAP 响应(Getting raw XML SOAP-response on client side using ADB-stubs created by AXIS2)
    问题 我使用 AXIS2 创建的 ADB 存根访问 SOAP 服务。 我想记录服务返回的任何 Axis Fault 的原始 XML 响应。 我可以将这些错误捕获为“ServiceError”。 但是,我没有找到检索原始 XML 的方法(请参见下面的示例)。 我找到了一种使用 getOMElement 访问原始 XML 请求/响应以进行常规处理的方法(请参见下面的示例)。 但是,这不适用于故障。 如何使用 ADB 存根获取原始 XML 错误? 示例 Java 代码: public void testRequest(String URL) throws AxisFault { MyServiceStub myservice = new MyServiceStub(URL); MyRequest req = new MyRequest(); try { TypeMyFunctionResponse response = myservice.myFunction(req); // logging full soap response System.out.println("SOAP Response: " + response.getOMElement(null, OMAbstractFactory.getOMFactory()) .toStringWithConsume()); }
  • 您可以在.NET运行时更改动态Web参考的位置/端点吗?(Can you change the location/endpoint of a dynamic web reference at run-time in .NET?)
    问题 以一种相当标准的方式,我在Jira中创建了一个针对SOAP服务的Web引用,用于我正在构建的扩展(Jira是不熟悉它的人的问题跟踪器)。 Visual Studio自动生成一个.Settings文件和一个包含Web服务URL的app.config 。 由于我正在开发要构建的ALM产品的扩展/插件,因此扩展的使用者将最终决定该Web服务指向的位置,因为它将与使用者的Jira实例集成在一起。 假设将存储Web服务URL并将其从数据库中提取。 如何获得自动生成的服务,以使用数据库中的URL而不是生成的app.config的URL? 注意:我们正在使用框架的v2.0,因此WCF不是一个选择。 回答1 即使在2.0 Web服务中,您也应该可以将Web服务代理的“ U​​rl”属性更改为所需的值。 回答2 使用允许uri的客户端的构造函数。
  • Can you change the location/endpoint of a dynamic web reference at run-time in .NET?
    In a fairly standard fashion, I created a Web Reference to a SOAP service in Jira for an extension that I'm building (Jira is an issue tracker for those unfamiliar with it). Visual Studio auto-generates a .Settings file and an app.config that contains the web service URL. Since I'm developing an extension/plugin to an ALM product we're building, the consumer of the extension will be the one who ultimately decides where this web service points to, because it will be integrated with the consumer's instance of Jira. Assume that the web service URL would be stored and pulled from a database. How
  • confluence与jira账号对接、查看到期时间及问题总结
  • 尝试调用 CXF/SOAP 网络服务时出现 LinkageError(LinkageError whilst trying to invoke CXF/SOAP webservice)
    问题 我有一个项目(比如 myproject),我在其中托管了 CXF RESTful 服务和 CXF WS/SOAP 服务,并在 JBoss (6.0.0.FINAL) 上运行。 我们所有的内部系统都使用RESTful接口,第三方系统使用SOAP接口(作为回调接口) 以下网址工作正常。 REST URL: http://localhost:8080/myproject/internal/someOperation ( content-type: application/json和 POST body) SOAP WSDL: http://localhost:8080/myproject/cbsoap?wsdl 现在我的问题是实际的 SOAP 调用不成功。 我使用 SOAPUI 来尝试 SOAP 调用,但只是为了能够查询 WSDL。 我收到以下错误:- javax.servlet.ServletException: Servlet execution threw an exception org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) root cause java.lang.LinkageError: loader
  • 用于获取完整用户列表的 Jira Rest Api(Jira Rest Api for getting full user list)
    问题 如何获取使用 Jira Rest Apis 的所有用户的列表。 我试过了:- /rest/api/latest/user/search?username= 在这里,我尝试使用空白用户名字符串,但它没有返回完整的用户列表。 当用户名长度至少为 1 时,我们只会得到一些结果。 如何从 Jira rest API 获取完整的用户列表? 回答1 我认为 Rest API 没有这种能力。 据我所知,您必须选择不同的方式,例如,您可以使用 Soap API 来执行此操作,如问题 JIRA SOAP API 中所示:获取用户列表。 另一种方法可能是直接查询数据库。 回答2 您可以创建一个循环,在其中您将遍历所有字母,然后再循环显示名称以该字母开头的每个用户的结果。 像这样: char[] ch = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; int j = ch.length; for (int i = 0; i < ch.length; i++) { System.out.print(Character.toString(Character.toUpperCase(ch[i]))); --j; String
  • 如何使用REST API将附件发布到JIRA?(How to POST attachment to JIRA using REST API?)
    问题 如何在C#中使用JIRA REST API和HttpWebRequest将附件发布到JIRA? 从/ rest / api / 2 / issue / {issueIdOrKey} / attachments下的文档中: 邮政为一个问题添加一个或多个附件。 此资源需要分多个部分。 媒体类型的multipart / form-data在RFC 1867中定义。大多数客户端库都具有简化处理multipart帖子的类。 例如,在Java中,Apache HTTP组件库提供了MultiPartEntity,使提交多部分POST变得简单。 为了防止XSRF攻击,由于此方法接受multipart / form-data,因此具有XSRF保护。 这意味着您必须在请求中提交X-Atlassian-Token标头:nocheck,否则将被阻止。 包含附件的multipart / form-data参数的名称必须为“文件” 上载一个名为“ myfile.txt”的文件以发出REST-123的简单示例: curl -D- -u admin:admin -X POST -H“ X-Atlassian-Token:nocheck” -F“ file=@myfile.txt” http://myhost.test/rest/api/2/issue/TEST -123 /附件 我有 foreach
  • Jira attach file to issue with PHP and CURL
    I have found several examples on how to upload an attachment to an issue in jira, however I have not been able to make any of them work. I posted this question on the Jira Community Help Forums but it has been over a week with 0 replies so hoping the community here can help. Here is my current attempt: $Jirausername = 'myUsername'; $Jirapassword = 'myPassword'; $ch=curl_init(); $headers = array( 'X-Atlassian-Token: nocheck', 'Content-Type: multipart/form-data' ); $data = array('file' => "testing.txt"); curl_setopt_array( $ch, array( CURLOPT_URL=>'https://myCompany.net/rest/api/latest/issue/TAG
  • SharePoint SOAP GetListItems VS jQuery - 如何使用 Ajax 循环自定义列表项以及 Ajax 刷新列表内容?(SharePoint SOAP GetListItems VS jQuery - How to use Ajax to cycle through Custom List items as well as Ajax refresh the list contents?)
    问题 我正在使用 jQuery 通过 GetListItems 方法访问 Sharepoint 2007 的 SOAP 界面,以读取自定义的公告列表,使该列表每分钟刷新一次(以防列表的所有者添加新内容,以便无需最终用户刷新其共享点屏幕即可看到新内容)。 我想要做的不仅是刷新该列表,我还想让列表中的每个项目一次循环一个(也许让每个项目保持可见 10 秒,然后下一个项目将加载到该空间中。 这是我到目前为止的代码: <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="/SiteCollectionDocuments/jquery.timers-1.0.0.js" ></script> <script type="text/javascript"> $(document).ready(function() { // Create the SOAP request // NOTE: we need to be able to display list attachments to users, hence the addition of the //