Hi there,
I'm trying to send a SOAP request from an external system to our internl JIRA system. If I send the request without the custom field value, all is okay and a new issue is created in JIRA. If, however, I add the custom field value, the request is not created. Therefore I know that the communcation is all fine. I cannot see anything in the logs, the only thing I see is the SOAP authentication which is successful.
I have not been able to find any example and I guess that my custom field value XML is invalid.
Many thanks,
Mark
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://soap.rpc.jira.atlassian.com" xmlns:tns1="http://beans.soap.rpc.jira.atlassian.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <createIssue xmlns="http://soap.rpc.jira.atlassian.com"> <in0 xsi:type="xsd:string">${AuthHandle}</in0> <in1 xsi:type="bean:RemoteIssue" xmlns:bean="http://beans.soap.rpc.jira.atlassian.com"> <project xsi:type="xsd:string">${Project}</project> <summary xsi:type="xsd:string">${ShortDescription}</summary> <description xsi:type="xsd:string">${Description}</description> <type xsi:type="xsd:string">${Type}</type> <status xsi:type="xsd:string">${Status}</status> <reporter xsi:type="xsd:string">${Reporter}</reporter> <customFieldValues xsi:type="jir:ArrayOf_tns1_RemoteCustomFieldValue" soapenc:arrayType="bean:RemoteCustomFieldValue[]" xmlns:jir="http://pgzugchsvn01:8080/rpc/soap/jirasoapservice-v2"> <item> <customfieldId xsi:type="xsd:string">customfield_10000</customfieldId> <values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array"> <item xsi:type="xsd:string">${IncidentNumber}</item> </values> <key xsi:nil="true"/> </item> </customFieldValues> </in1> </createIssue> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
JIRA version : v5.2.4#845-sha1:c9f4cc4
Community moderators have prevented the ability to post new answers.
Edit your request as below:
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://soap.rpc.jira.atlassian.com" xmlns:tns1="http://beans.soap.rpc.jira.atlassian.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <createIssue xmlns="http://soap.rpc.jira.atlassian.com"> <in0 xsi:type="xsd:string">${AuthHandle}</in0> <in1 xsi:type="bean:RemoteIssue" xmlns:bean="http://beans.soap.rpc.jira.atlassian.com"> <project xsi:type="xsd:string">${Project}</project> <summary xsi:type="xsd:string">${ShortDescription}</summary> <description xsi:type="xsd:string">${Description}</description> <type xsi:type="xsd:string">${Type}</type> <status xsi:type="xsd:string">${Status}</status> <reporter xsi:type="xsd:string">${Reporter}</reporter> <customFieldValues xsi:type="jir:ArrayOf_tns1_RemoteCustomFieldValue" soapenc:arrayType="bean:RemoteCustomFieldValue[]" xmlns:jir="http://pgzugchsvn01:8080/rpc/soap/jirasoapservice-v2"> <item> <customfieldId xsi:type="xsd:string">customfield_10000</customfieldId> <values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array"> <values xsi:type="xsd:string">${IncidentNumber}</values> </values> <key xsi:nil="true"/> </item> </customFieldValues> </in1> </createIssue> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://soap.rpc.jira.atlassian.com" xmlns:tns1="http://beans.soap.rpc.jira.atlassian.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<createIssue xmlns="http://soap.rpc.jira.atlassian.com">
<in0 xsi:type="xsd:string">${AuthHandle}</in0>
<in1 xsi:type="bean:RemoteIssue" xmlns:bean="http://beans.soap.rpc.jira.atlassian.com">
<project xsi:type="xsd:string">${Project}</project>
<summary xsi:type="xsd:string">${ShortDescription}</summary>
<description xsi:type="xsd:string">${Description}</description>
<type xsi:type="xsd:string">${Type}</type>
<status xsi:type="xsd:string">${Status}</status>
<reporter xsi:type="xsd:string">${Reporter}</reporter>
<customFieldValues xsi:type="jir:ArrayOf_tns1_RemoteCustomFieldValue" soapenc:arrayType="bean:RemoteCustomFieldValue[]" xmlns:jir="http://pgzugchsvn01:8080/rpc/soap/jirasoapservice-v2">
<item>
<customfieldId xsi:type="xsd:string">customfield_10000</customfieldId>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<valuesxsi:type="xsd:string">${IncidentNumber}</values>
</values>
<key xsi:nil="true"/>
</item>
</customFieldValues>
</in1>
</createIssue>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Can anyone please provide me with an example SOAP request to the above question? Would really appreciated it.
regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
From my understanding, you need to specify the custom field ID and option ID in the SOAP client
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janet ...
thanks for the reply. Yes that would be the case if I was using a SOAP client. But this is a third party tool that where you are required to define the evelope and then simply add replacement keys which are replaced with real values before the whole envelope is sent.
Basically what I really need is an XML example showing me the correct way to define the payload (namely the custom field values). I'm sure that my syntax above is wrong.
I do not have the JIRA API installed and so cannot at the moment programatically create an example. I just need a payload example which I cannot find anywhere on the net.
regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.