如何使用REST API在Maximo的工作订单中的“在多资产/位置中添加资产?” >> [[

问题描述 投票:0回答:1
我正在尝试使用REST API调用在工作订单上的“多资产/位置的多资产”部分中添加资产,但是很遗憾,我遇到了错误。

下面是我正在使用的SOAP UI xml。

有什么建议吗?

<?xml version="1.0" encoding="UTF-8"?> <con:soapui-project id="2d3ce397-18aa-4daf-9c10-530848618806" activeEnvironment="Default" name="OBJMULTIASSET-POST" resourceRoot="" soapui-version="5.5.0" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:RestService" id="d361bf06-2b3e-4ee5-9892-7544b4a9449f" wadlVersion="http://wadl.dev.java.net/2009/02" name="http://maximo.client.com:9080" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache/><con:endpoints><con:endpoint>http://maximo.client.com:9080</con:endpoint></con:endpoints><con:resource name="OBJMULTIASSET" path="/maxrest/rest/os/MULTIASSETOBJ" id="f7ebc10c-f458-4b7a-a13f-0d0c845933d1"><con:settings/><con:parameters><con:parameter><con:name>recordkey</con:name><con:value>'1114'</con:value><con:style>QUERY</con:style><con:default>'1114'</con:default><con:path xsi:nil="true"/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>SITEID</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>RECORDCLASS</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>WORKSITEID</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>WORKORGID</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>REPLACEMENTSITE</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>PROGRESS</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>PERFORMMOVETO</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>ORGID</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>ISPRIMARY</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>ASSETNUM</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="OBJMULTIASSET 1" id="5b5c0333-63ae-4a5d-b85c-9b9bc6269a90" method="POST"><con:settings/><con:parameters/><con:representation type="RESPONSE"><con:mediaType>application/json</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:OBJ="http://maximo.client.com/maxrest/rest/os/OBJMULTIASSET">OBJ:Response</con:element></con:representation><con:representation type="FAULT"><con:mediaType>text/html;charset=UTF-8</con:mediaType><con:status>400</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="REQUEST"><con:mediaType>application/json</con:mediaType><con:params/></con:representation><con:request name="Request 1" id="b15d9e02-1ee0-4d03-9ac2-80e938c404cd" mediaType="application/json" postQueryString="false"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;entry key="MAXAUTH" value="bWF4YWRtaW46bWF4YWRtaW4=" xmlns="http://eviware.com/soapui/config"/></con:setting></con:settings><con:endpoint>http://maximo.client.com:9080</con:endpoint><con:request/><con:originalUri>http://maximo.client.com/maxrest/rest/os/OBJMULTIASSET</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters> <con:entry key="ORGID" value="EAGLENA"/> <con:entry key="ASSETNUM" value="CAL100"/> <con:entry key="PERFORMMOVETO" value="0"/> <con:entry key="ISPRIMARY" value="0"/> <con:entry key="recordkey" value="1299"/> <con:entry key="WORKSITEID" value="BEDFORD"/> <con:entry key="WORKORGID" value="EAGLENA"/> <con:entry key="PROGRESS" value="0"/> <con:entry key="RECORDCLASS" value="WORKORDER"/> <con:entry key="REPLACEMENTSITE" value="BEDFORD"/> <con:entry key="SITEID" value="BEDFORD"/> </con:parameters><con:parameterOrder><con:entry>recordkey</con:entry><con:entry>SITEID</con:entry><con:entry>RECORDCLASS</con:entry><con:entry>WORKSITEID</con:entry><con:entry>WORKORGID</con:entry><con:entry>REPLACEMENTSITE</con:entry><con:entry>PROGRESS</con:entry><con:entry>PERFORMMOVETO</con:entry><con:entry>ORGID</con:entry><con:entry>ISPRIMARY</con:entry><con:entry>ASSETNUM</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:properties/><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAu

我正在尝试使用REST API调用在工作订单上的“多资产/位置的多资产”部分中添加资产,但不幸的是,我遇到了错误。以下是我正在使用的SOAP UI xml。有什么建议么 ? 
rest api maximo maximo-anywhere oslc
1个回答
0
投票
通过将WORKORDER对象作为父对象添加到对象结构中的MULTIASSETLOCCI表来解决此问题。
© www.soinside.com 2019 - 2024. All rights reserved.