- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我用下面的代码把我的头撞在 SOAP api 上。我的目标是创建带有自定义字段的票证。如果您注释掉自定义字段部分,则此代码可以正常工作。知道发生了什么吗?
代码
my $soap = SOAP::Lite->service($wsdl);
my $token = $soap->login($_jira_user,$_jira_pass);
my $customFields = [
{'customFieldId' => $_cf_map{'severity'},'values' => [SOAP::Data->type('string', $severity)]},
{'customFieldId' => $_cf_map{'outage_start'}, 'values' => [SOAP::Data->type('string', $start)]},
{'customFieldId' => $_cf_map{'no_auto_close'}, 'values' => [SOAP::Data->type('string', $no_auto_close == 1 ? 'Yes': 'No')]},
{'customFieldId' => $_cf_map{'nco_serials'}, 'values' => [SOAP::Data->type('string', $serial_string)]},
{'customFieldId' => $_cf_map{'services'}, 'values' => \@services},
];
my $remoteIssueHash = {
'project' => SOAP::Data->type('string' => $_projectkey),
'type' => SOAP::Data->type('string' => $_issuetype),
'summary' => SOAP::Data->type('string' => $summary),
'reporter' => SOAP::Data->type('string' => $user),
'assignee' => SOAP::Data->type('string' => $user),
'customFieldValues' => $customFields,
};
my $remote_issue = $soap->call('createIssue', $token, $remoteIssueHash);
print Dumper [$remote_issue->faultcode(), $remote_issue->faultstring(), $soap->transport()->status(), $remote_issue->result(), $remote_issue ]
exit();
$VAR1 = [
'soapenv:Server.userException',
'org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType',
'500 Internal Server Error',
#big soap object
]
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:tns2="http://exception.rpc.jira.atlassian.com" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:namesp1="http://soap.rpc.jira.atlassian.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns1="http://beans.soap.rpc.jira.atlassian.com" xmlns:impl="http://jira.nyc.hcmny.com:8080/rpc/soap/jirasoapservice-v2" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<namesp1:createIssue>
<c-gensym6 xsi:type="xsd:string">Y6DQd1k2BL</c-gensym6>
<c-gensym8>
<assignee xsi:type="xsd:string">fgulotta</assignee>
<customFieldValues soapenc:arrayType="xsd:anyType[5]" xsi:type="soapenc:Array">
<item>
<customFieldId xsi:type="xsd:string">customfield_10094</customFieldId>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<item xsi:type="xsd:string">4</item>
</values>
<key xsi:type="xsd:string" />
</item>
<item>
<customFieldId xsi:type="xsd:string">customfield_10084</customFieldId>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<item xsi:type="xsd:string">29/Jul/11 05:46 PM</item>
</values>
<key xsi:type="xsd:string" />
</item>
<item>
<customFieldId xsi:type="xsd:string">customfield_10100</customFieldId>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<item xsi:type="xsd:string">Yes</item>
</values>
<key xsi:type="xsd:string" />
</item>
<item>
<customFieldId xsi:type="xsd:string">customfield_10093</customFieldId>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<item xsi:type="xsd:string" />
</values>
<key xsi:type="xsd:string" />
</item>
<item>
<customFieldId xsi:type="xsd:string">customfield_10080</customFieldId>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<item xsi:type="xsd:string">intranet</item>
</values>
<key xsi:type="xsd:string" />
</item>
</customFieldValues>
<summary xsi:type="xsd:string">This is a test ticket.</summary>
<project xsi:type="xsd:string">MON</project>
<type xsi:type="xsd:string">31</type>
<reporter xsi:type="xsd:string">fgulotta</reporter>
</c-gensym8>
</namesp1:createIssue>
</soap:Body>
</soap:Envelope>
<?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>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType</faultstring>
<detail>
<faultData xsi:type="ns1:SAXException" xmlns:ns1="http://sax.xml.org">
<exception xsi:type="ns2:Exception" xsi:nil="true" xmlns:ns2="http://lang.java"/>
<message xsi:type="xsd:string">No deserializer for {http://www.w3.org/2001/XMLSchema}anyType</message>
</faultData>
<ns3:hostname xmlns:ns3="http://xml.apache.org/axis/">deputy.811t.hcmny.com</ns3:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
<?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>
<ns1:createIssue soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://soap.rpc.jira.atlassian.com">
<in0 xsi:type="xsd:string">B2P69v5NrS</in0>
<in1 href="#id0"/>
</ns1:createIssue>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:RemoteIssue" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://beans.soap.rpc.jira.atlassian.com">
<id xsi:type="xsd:string" xsi:nil="true"/>
<affectsVersions xsi:type="ns2:RemoteVersion" xsi:nil="true"/>
<assignee xsi:type="xsd:string">fgulotta</assignee>
<attachmentNames xsi:type="xsd:string" xsi:nil="true"/>
<components xsi:type="ns2:RemoteComponent" xsi:nil="true"/>
<created xsi:type="xsd:dateTime" xsi:nil="true"/>
<customFieldValues soapenc:arrayType="ns2:RemoteCustomFieldValue[3]" xsi:type="soapenc:Array">
<customFieldValues href="#id1"/>
<customFieldValues href="#id2"/>
<customFieldValues href="#id3"/>
</customFieldValues>
<description xsi:type="xsd:string" xsi:nil="true"/>
<duedate xsi:type="xsd:dateTime" xsi:nil="true"/>
<environment xsi:type="xsd:string" xsi:nil="true"/>
<fixVersions xsi:type="ns2:RemoteVersion" xsi:nil="true"/>
<key xsi:type="xsd:string" xsi:nil="true"/>
<priority xsi:type="xsd:string" xsi:nil="true"/>
<project xsi:type="xsd:string">MON</project>
<reporter xsi:type="xsd:string">fgulotta</reporter>
<resolution xsi:type="xsd:string" xsi:nil="true"/>
<status xsi:type="xsd:string" xsi:nil="true"/>
<summary xsi:type="xsd:string">This is a test ticket.</summary>
<type xsi:type="xsd:string">31</type>
<updated xsi:type="xsd:dateTime" xsi:nil="true"/>
<votes xsi:type="xsd:long" xsi:nil="true"/>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:RemoteCustomFieldValue" xmlns:ns3="http://beans.soap.rpc.jira.atlassian.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<customfieldId xsi:type="xsd:string">customfield_10094</customfieldId>
<key xsi:type="xsd:string" xsi:nil="true"/>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<values xsi:type="xsd:string">4</values>
</values>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:RemoteCustomFieldValue" xmlns:ns4="http://beans.soap.rpc.jira.atlassian.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<customfieldId xsi:type="xsd:string">customfield_10084</customfieldId>
<key xsi:type="xsd:string" xsi:nil="true"/>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<values xsi:type="xsd:string">27/Jul/11 02:21 PM</values>
</values>
</multiRef>
<multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:RemoteCustomFieldValue" xmlns:ns5="http://beans.soap.rpc.jira.atlassian.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<customfieldId xsi:type="xsd:string">customfield_10100</customfieldId>
<key xsi:type="xsd:string" xsi:nil="true"/>
<values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<values xsi:type="xsd:string">Yes</values>
</values>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
最佳答案
我设法使用 perl 和 SOAP::Lite 创建了一个问题(要求)。关键是使用数组构建请求并使用 SOAP::Data->type() 定义类型。我无法使用“fixVersions”属性填写修复版本,但我是通过自定义字段“customfield_10040”完成的。您可以使用 getItem() 调用来检查在您的情况下使用了哪一个。
my $soap = SOAP::Lite->service($URI);
my $token = $soap->login($USERNAME,$PASSWORD);
my $fieldValues = [
SOAP::Data->type('RemoteCustomFieldValue', {'customfieldId' => 'customfield_10040',
'values' => [
SOAP::Data->type('string', '10051'),
SOAP::Data->type('string', '10052')
]
}),];
my $affectedValues = [
SOAP::Data->type('RemoteVersion', {'name' => 'FINS 1.16.1',
'id' => SOAP::Data->type('string', '10051')}),
SOAP::Data->type('RemoteVersion', {'name' => 'FINS 1.16.1a',
'id' => SOAP::Data->type('string', '10052')})
];
my $fixedValues = [
SOAP::Data->type('RemoteVersion', {'name' => 'FINS 1.16.1',
'id' => SOAP::Data->type('string', '10051')})
];
my $customFields = SOAP::Data->type('RemoteCustomFieldValue', $fieldValues);
my $fixVersion = SOAP::Data->type('RemoteVersion' , $fixedValues);
my $affectedVersion = SOAP::Data->type('RemoteVersion' , $affectedValues);
my $component = SOAP::Data->type('RemoteComponent', \{'name' => 'CST', 'id' => SOAP::Data->type('string', '10194')});
my $remoteIssueHash = {
'project' => SOAP::Data->type('string' => $PROJECT),
'type' => SOAP::Data->type('string' => 10),
'summary' => SOAP::Data->type('string' => $summary),
'reporter' => SOAP::Data->type('string' => $reporter),
'assignee' => SOAP::Data->type('string' => $assignee),
'customFieldValues' => SOAP::Data->type('array' => $customFields),
'affectsVersions' => SOAP::Data->type('array' => $affectedVersion),
'components' => SOAP::Data->type('array' => $component),
'fixVersions' => SOAP::Data->type('array' => $fixVersion), ## this doesn't do anything
'description' => SOAP::Data->type('string' => $description),
'environment' => SOAP::Data->type('string' => 'Some environment'),
};
my $remote_issue = $soap->call('createIssue', $token, $remoteIssueHash);
print Dumper [$remote_issue->faultcode(), $remote_issue->faultstring(), $soap->transport()->status(), $remote_issue->result(), $remote_issue ];
exit();
关于perl - 在 JIRA 中使用带有 Soap Lite 和 perl 的自定义字段创建问题的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6851402/
我正在使用 SOA 客户端 Firefox 插件向某些 ONVIF 摄像机发送 SOAP 请求。您将在下面看到“GetServices”请求。它对于一台相机工作正常,但对于另一台(AXIS 相机)我收
我正在使用 SOA 客户端 Firefox 插件向某些 ONVIF 摄像机发送 SOAP 请求。您将在下面看到“GetServices”请求。它对于一台相机工作正常,但对于另一台(AXIS 相机)我收
有谁知道 Fiddler 是否可以显示 ASMX Web 服务的原始 SOAP 消息?我正在使用 Fiddler2 和 Storm 测试一个简单的 Web 服务,结果各不相同(Fiddler 显示纯
使用 SOAP 协议(protocol)时,是否可以使用 SOAP 取消挂起的远程函数调用? 我看到三种不同的情况: A) 向需要很长时间才能完成的服务发出请求。例如,当复制包含大量文件的目录时,可以
人们还在写吗SOAP services还是已经通过了它的技术architectural shelf life ?人们是否回归二进制格式? 最佳答案 SOAP 的替代方案不是二进制格式。 我认为您看到了
SOAP 协议(protocol)工作的默认端口号是多少? 最佳答案 没有“SOAP 协议(protocol)”之类的东西。 SOAP 是一种 XML 模式。 但是,它通常通过 HTTP(端口 80)
之间有什么区别 和 以及如何在它们之间切换? 如何将响应从 具有定义的命名空间 "http://schemas.xmlsoap.org/soap/envelope/" ,它的特殊含义是底层 XML
我正在从 Mule 进行 SOAP 调用。我正在使用 default-exception-strategy 来捕获异常。发生异常时,如何发送我自己的故障代码和故障字符串而不是通用的 soap 故障消息
我正在编写一个 powershell 脚本,它将每 10 分钟 ping 一次soap web 服务,以使其保持活跃状态,从而提高性能。我们已经在 IIS 中尝试了多种技术,应用程序池空闲超时和只
如有任何帮助,我们将不胜感激;我已经研究了几天了。 下面是我目前得到的代码;不幸的是,当我运行它时出现 HTTP 415 错误; 无法处理消息,因为内容类型为“text/xml; charset=UT
我们需要使用其他团队开发的网络服务。使用 JAX-WS用于生成网络服务。我们正在使用 wsimport 生成客户端 stub 。 问题是我需要将以下信息作为 header 与 SOAP 正文一起传递:
我的意思是,真正的互操作:从 Java 到 .NET,从 PHP 到 Java,等等。 我之所以这样问,是因为我们的权力希望我们使用 SOAP Web 服务实现面向公众的 API,并且我试图强调支持
我写了一个拦截器进行测试。但是我在Interceptor中获得的Soap消息正文始终为null。 我的Cxf是Apache-CXF-2.4.0 bean.xml是这样的:
我正在尝试查询货币的 netsuite api。以下soap请求在SOAP UI客户端中对我有用。但是我很难尝试使用 ruby 的 savon gem 0.9.7 版进行相同的工作。
我创建了一个示例 Mule 流,首先根据 http://www.mulesoft.org/documentation/display/current/Consuming+Web+Services+wi
我正在尝试使用此 SOAP 服务:http://testws.truckstop.com:8080/v13/Posting/LoadPosting.svc?singleWsdl使用 node-soap
我有几个 SoapUI 测试步骤,其中响应返回空(即“-> 空/空响应”),这正是我所期望的。 如何断言对测试步骤请求的响应为空? 到目前为止,我已经尝试了以下但没有运气: 审查可用的断言,无需定制
我正在尝试构建一个手动 HTTP 请求,以便从我认为是相当简单的 SOAP Web 服务调用中返回响应。但是,我无法正确构建请求,并且没有得到我期望的响应。 适用wsdl声明: wsdl 目标命名空间
我正在尝试使用 Insomnia 调用 SOAP 电话 - 特别是试图让帖子成功。我将 URL 定义为端点,并将正文类型作为带有 SOAP 内容(信封、标题、正文)的 XML。我在标题中定义了用户 I
我正在学习 SOAP 实现,并且对于 SOAP 1.2 信封的适当 namespace URI 感到有些困惑。 w3c specification for SOAP指的是“http://www.w3.
我是一名优秀的程序员,十分优秀!