【问题标题】:Error in processing entity WorkOrder unable to create entity object处理实体时出错 WorkOrder 无法创建实体对象
【发布时间】:2014-04-28 13:32:43
【问题描述】:

我在调用 GetAssetEquipmentOp 时收到以下错误:

“处理实体时出错 WorkOrder 无法创建实体对象”

这是目前为止的代码:

public stringType getAssetDescription(string equipmentcode)
        {

            try
            {

                // Setup Service Objects
                MP0302_GetAssetEquipment_001.GetAssetEquipmentService getservice = new MP0302_GetAssetEquipment_001.GetAssetEquipmentService();
                MP0302_GetAssetEquipment_001.MP0302_GetAssetEquipment_001 getrequest = new MP0302_GetAssetEquipment_001.MP0302_GetAssetEquipment_001();
                MP0302_GetAssetEquipment_001.MP0302_GetAssetEquipment_001_Result getresult = new MP0302_GetAssetEquipment_001.MP0302_GetAssetEquipment_001_Result();

                // Setup Return Object
                stringType desc = new stringType();

                // Setup Service Parameters
                getrequest.ASSETID = new MP0302_GetAssetEquipment_001.EQUIPMENTID_Type();
                getrequest.ASSETID.EQUIPMENTCODE = equipmentcode;
                getrequest.ASSETID.ORGANIZATIONID = new MP0302_GetAssetEquipment_001.ORGANIZATIONID_Type();
                getrequest.ASSETID.ORGANIZATIONID.ORGANIZATIONCODE = _orgCodeBody;

                // Setup Datastream Object
                Datastream.EWS.Session sess = new Datastream.EWS.Session(_userid, _passwd, _orgCodeHead, _url, _tenant, false);

                // Prepare Service Request
                sess.PrepareServiceRequest(getservice);

                // Call Web Service and get result
                getresult = getservice.GetAssetEquipmentOp(getrequest);

                // Extract Description
                desc.stringValue = getresult.ResultData.AssetEquipment.ASSETID.DESCRIPTION;
                desc.errorNum = 0;

                // Close Up/Dispose
                sess.CompleteServiceRequest(getservice);
                sess.Dispose();

                // Return value
                return desc;

            }
            catch (Exception ex)
            {
                stringType errorStringType = new stringType();
                errorStringType.errorNum = 1;
                errorStringType.errorDesc = ex.Message;
                return errorStringType;
            }

        }

我已检查以下内容:

- 用户组具有BECONN等接口权限
- 用户选择了“连接器”选项
- 用户拥有状态授权,包括*到 Q 用于 EVNT

任何帮助将不胜感激。

【问题讨论】:

    标签: infor-eam


    【解决方案1】:

    问题解决了!问题是工单号不存在。这是一个非常具有误导性的错误,但是一旦测试了现有的工作订单,它就会毫无问题地获取工作订单。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多