Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Axapta Dynamics AX AIF Web服务错误“;库存维度仓库是必需的…“;_Axapta_X++_Dynamics Ax 2009 - Fatal编程技术网

Axapta Dynamics AX AIF Web服务错误“;库存维度仓库是必需的…“;

Axapta Dynamics AX AIF Web服务错误“;库存维度仓库是必需的…“;,axapta,x++,dynamics-ax-2009,Axapta,X++,Dynamics Ax 2009,当我试图通过php向AX发送特定报价时,AX中出现以下错误: 库存维度仓库是必需的,因此必须 指定的 据我所知,这是一个令人不快的障碍: ... $line->InventDim = array(); $inventDim = new SalesQuotationService_AxdEntity_InventDim(); $inventDim->InventLocationId = '01'; $inventDim->InventSiteId = 'SITE

当我试图通过php向AX发送特定报价时,AX中出现以下错误:

库存维度仓库是必需的,因此必须 指定的

据我所知,这是一个令人不快的障碍:

...
$line->InventDim = array();
  $inventDim = new SalesQuotationService_AxdEntity_InventDim();
  $inventDim->InventLocationId = '01';  
  $inventDim->InventSiteId = 'SITE 1';
  $inventDim->class = 'entity';
  $inventDim->configId = $configId;
  $inventDim->inventSerialId='';  

  $line->InventDim[] = $inventDim;
...
对于使用新定义的标记为Serl-Conf的库存维度的所有报价,此过程失败。具有其他库存维度(如STD)的其他报价工作正常

在AX中,在物料明细->现存量->维度显示中,为库存维度定义了以下内容:

Field                        Object field name
Item Number                  InventSum.ItemID (not part of InventDim) 
Configuration                configID
Size                         InventSizeId
Color                        InventColorId
Site                         InventSiteId
Warehouse                    InventLocationId
Batch Number                 inventBatchId
Location                     wMSLocationId
Pallet ID                    wMSPalletId
Serial Number                inventSerialId
Closed Transactions          (not listed under Inventory Dimensions)
Quantity <> 0                (not listed under Inventory Dimensions)

它所指的肯定是
InventLocationId

我怀疑您没有填充
\Data Dictionary\Tables\SalesQuotationTable\Fields\InventLocationId

在SalesQuotence标题上仅仅因为您引用了
$line

首先,我想看看AIF网关中的XML消息。它的格式好吗?我怀疑
$line->InventDim[]=$InventDim这真的必须是数组吗?也许您应该删除“[]”。我假设AIF AX web服务在以前不存在InventDim组合的情况下查找或创建InventDim。例如,“$configId”值为“土豆”。@MaximLazarev感谢您花时间回复。$line->InventDim[]适用于所有其他不使用库存维度类型Serl Conf的报价,因此我认为这不是问题所在。@ian_scho也感谢您花时间回复。实际上,上面显示的之前的代码验证$configId是否有值并且在AX中有效。感谢您验证InventLocationId问题。但是,如果其他销售报价成功转移,那么第二部分的其他报价会不会失败呢?如何检查我是否确实没有正确填充此特定报价的标题?我不是AX box的所有者,但我确实可以远程访问AX服务器。请检查AIF异常日志。而且
InventLocationId
可能并不总是强制的,它可能是一种配置设置,在某些情况下是强制的。它也可能是客户默认的。因此,如果客户的默认仓库是
01
,那么当您的代码在没有仓库的情况下创建报价时,它只是客户的默认仓库。但是另一个客户可能没有将
01
设置作为他们的默认仓库,所以它失败了。寻找没有失败的报价和失败的报价之间的差异,以及客户之间的差异。嗨,Alex,谢谢你的建议。如上所述,错误消息“库存维度仓库是必需的…”来自异常日志。
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/dynamics/2008/01/documents/SalesQuotationService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://tempuri.org">
<SOAP-ENV:Body>
    <ns2:SalesQuotationServiceCreateRequest>
        <ns1:SalesQuotationService>
            <ns1:DocPurpose>Original</ns1:DocPurpose>
            <ns1:SenderId>hws</ns1:SenderId>
            <ns1:SalesQuotationTable class="entity">
                <ns1:_DocumentHash xsi:nil="true"/>
                <ns1:BusRelAccount xsi:nil="true"/>
                <ns1:CallListID xsi:nil="true"/>
                <ns1:CampaignId xsi:nil="true"/>
                <ns1:CaseTagging xsi:nil="true"/>
                <ns1:CashDisc xsi:nil="true"/>
                <ns1:Cntct_Address xsi:nil="true"/>
                <ns1:Cntct_City xsi:nil="true"/>
                <ns1:Cntct_Company xsi:nil="true"/>
                <ns1:Cntct_Email xsi:nil="true"/>
                <ns1:Cntct_FName xsi:nil="true"/>
                <ns1:Cntct_LName xsi:nil="true"/>
                <ns1:Cntct_Phone xsi:nil="true"/>
                <ns1:Cntct_ST xsi:nil="true"/>
                <ns1:Cntct_Title xsi:nil="true"/>
                <ns1:Cntct_Zipcode xsi:nil="true"/>
                <ns1:CommissionGroup xsi:nil="true"/>
                <ns1:ConfirmDate xsi:nil="true"/>
                <ns1:ContactPersonId xsi:nil="true"/>
                <ns1:CovStatus xsi:nil="true"/>
                <ns1:CurrencyCode>USD</ns1:CurrencyCode>
                <ns1:CustAccount>11759</ns1:CustAccount>
                <ns1:CustomerRef xsi:nil="true"/>
                <ns1:CustPurchaseOrder xsi:nil="true"/>
                <ns1:DeliveryAddress xsi:nil="true"/>
                <ns1:DeliveryCity xsi:nil="true"/>
                <ns1:DeliveryCountryRegionId xsi:nil="true"/>
                <ns1:DeliveryCounty xsi:nil="true"/>
                <ns1:DeliveryDateControlType xsi:nil="true"/>
                <ns1:DeliveryName xsi:nil="true"/>
                <ns1:DeliveryState xsi:nil="true"/>
                <ns1:DeliveryStreet xsi:nil="true"/>
                <ns1:DeliveryZipCode xsi:nil="true"/>
                <ns1:Dimension xsi:nil="true"/>
                <ns1:DiscPercent>0</ns1:DiscPercent>
                <ns1:DlvMode xsi:nil="true"/>
                <ns1:DlvReason xsi:nil="true"/>
                <ns1:DlvTerm xsi:nil="true"/>
                <ns1:DocuConclusion xsi:nil="true"/>
                <ns1:DocuIntro xsi:nil="true"/>
                <ns1:DocuTitle xsi:nil="true"/>
                <ns1:Email xsi:nil="true"/>
                <ns1:EndDisc xsi:nil="true"/>
                <ns1:EndUser xsi:nil="true"/>
                <ns1:EPC xsi:nil="true"/>
                <ns1:ESD_SalesEngineer xsi:nil="true"/>
                <ns1:ESDOrder xsi:nil="true"/>
                <ns1:Estimate xsi:nil="true"/>
                <ns1:ExportReason xsi:nil="true"/>
                <ns1:FixedDueDate xsi:nil="true"/>
                <ns1:FixedExchRate xsi:nil="true"/>
                <ns1:FreightSlipType xsi:nil="true"/>
                <ns1:FreightZone xsi:nil="true"/>
                <ns1:InclTax xsi:nil="true"/>
                <ns1:InventLocationId>01</ns1:InventLocationId>
                <ns1:InventSiteId>SITE 1</ns1:InventSiteId>
                <ns1:InvoiceAccount>11759</ns1:InvoiceAccount>
                <ns1:ItemTagging xsi:nil="true"/>
                <ns1:LanguageId>EN-US</ns1:LanguageId>
                <ns1:LineDisc xsi:nil="true"/>
                <ns1:LineOfBusiness xsi:nil="true"/>
                <ns1:Listcode xsi:nil="true"/>
                <ns1:MarkupGroup xsi:nil="true"/>
                <ns1:ModelId xsi:nil="true"/>
                <ns1:MultiLineDisc xsi:nil="true"/>
                <ns1:Notes>1.   No specifications provided.  
                2.  Haws offers the product listed in this quotation.
                3.  Haws Corporation sells through distribution. Any commercial terms apply to contract between the purchaser and distributor and are not applicable to Haws. Contact Haws for distribution information.
                4.  Haws standard terms and conditions apply unless otherwise agreed upon prior to purchase.
                5.  Extended warranty pricing is available upon request.
                6.  Please see "Terms and Conditions" item #4 for list of standard documentation. Should any deviation from the Item 4 in the terms and conditions be required, please specify the necessary requirements. Deviations or additions will be subject to an additional charge to be determined at the time of quotation if and when such requests can be accommodated.
                7.  Haws Corporation reserves the right to adjust or amend pricing should new information or specifications be provided after the initial request for quote. 
                8.  Current estimated lead time is 12 to 14 weeks after receipt of a final signed approval of all drawings and components. All drawings must be Code "A" or Code "1" and must have an authorized signature and date to be released to manufacturing or production. Lead times are based on our current work load and are subject to change. Please verify lead times at the time of order.
                9.  Freight and crating are not included in the pricing of this quotation. 
                10. Commissioning, start up, and technical field services are not included in the price.  Contact Haws for pricing of on-sites services.</ns1:Notes>
                <ns1:NumberSequenceGroup xsi:nil="true"/>
                <ns1:OpportunityId xsi:nil="true"/>
                <ns1:OrigQuotationId xsi:nil="true"/>
                <ns1:PalletTagging xsi:nil="true"/>
                <ns1:Payment xsi:nil="true"/>
                <ns1:PaymMode xsi:nil="true"/>
                <ns1:PaymSpec xsi:nil="true"/>
                <ns1:Port xsi:nil="true"/>
                <ns1:PostingProfile xsi:nil="true"/>
                <ns1:PriceGroupId xsi:nil="true"/>
                <ns1:Probability xsi:nil="true"/>
                <ns1:ProjectName>UniSea Inc.-9400's-Dutch Harbor-AK</ns1:ProjectName>
                <ns1:ProjIdRef xsi:nil="true"/>
                <ns1:ProjInvoiceProjId xsi:nil="true"/>
                <ns1:QuotationCategory xsi:nil="true"/>
                <ns1:QuotationExpiryDate>2015-04-07</ns1:QuotationExpiryDate>
                <ns1:QuotationFollowupActivity xsi:nil="true"/>
                <ns1:QuotationFollowUpDate xsi:nil="true"/>
                <ns1:QuotationId xsi:nil="true"/>
                <ns1:QuotationName>UniSea Inc.-9400's-Dutch Harbor-AK</ns1:QuotationName>
                <ns1:QuotationStatus>Sent</ns1:QuotationStatus>
                <ns1:QuotationType>Sales</ns1:QuotationType>
                <ns1:ReasonId xsi:nil="true"/>
                <ns1:ReceiptDateRequested>2015-04-07</ns1:ReceiptDateRequested>
                <ns1:RecId xsi:nil="true"/>
                <ns1:RecVersion xsi:nil="true"/>
                <ns1:Registered xsi:nil="true"/>
                <ns1:RegisteredRep xsi:nil="true"/>
                <ns1:SalesGroup xsi:nil="true"/>
                <ns1:SalesIdRef xsi:nil="true"/>
                <ns1:SalesOriginId xsi:nil="true"/>
                <ns1:SalesPoolId xsi:nil="true"/>
                <ns1:SalesRep xsi:nil="true"/>
                <ns1:SalesResponsible>6883</ns1:SalesResponsible>
                <ns1:SalesTaker>6883</ns1:SalesTaker>
                <ns1:SalesUnitId xsi:nil="true"/>
                <ns1:SettleVoucher xsi:nil="true"/>
                <ns1:SFQouteNumber>00003041</ns1:SFQouteNumber>
                <ns1:ShippingDateRequested xsi:nil="true"/>
                <ns1:StatProcId xsi:nil="true"/>
                <ns1:TaxGroup xsi:nil="true"/>
                <ns1:TemplateActive xsi:nil="true"/>
                <ns1:TemplateGroupId xsi:nil="true"/>
                <ns1:TemplateName xsi:nil="true"/>
                <ns1:TransactionCode xsi:nil="true"/>
                <ns1:TransferredToForecast xsi:nil="true"/>
                <ns1:TransferredToItemReq xsi:nil="true"/>
                <ns1:Transport xsi:nil="true"/>
                <ns1:URL xsi:nil="true"/>
                <ns1:VATNum xsi:nil="true"/>
                <ns1:SalesQuotationLine class="entity">
                    <ns1:AccountType xsi:nil="true"/>
                    <ns1:BarCode xsi:nil="true"/>
                    <ns1:BarCodeType xsi:nil="true"/>
                    <ns1:CaseTagging xsi:nil="true"/>
                    <ns1:CommissionRate xsi:nil="true"/>
                    <ns1:Company>hws</ns1:Company>
                    <ns1:ConfirmedDlv xsi:nil="true"/>
                    <ns1:CostPrice xsi:nil="true"/>
                    <ns1:CurrencyCode>USD</ns1:CurrencyCode>
                    <ns1:CustAccount>11759</ns1:CustAccount>
                    <ns1:CustomerRef xsi:nil="true"/>
                    <ns1:DeliveryAddress xsi:nil="true"/>
                    <ns1:DeliveryCity xsi:nil="true"/>
                    <ns1:DeliveryCountryRegionId xsi:nil="true"/>
                    <ns1:DeliveryCounty xsi:nil="true"/>
                    <ns1:DeliveryDateControlType xsi:nil="true"/>
                    <ns1:DeliveryName xsi:nil="true"/>
                    <ns1:DeliveryState xsi:nil="true"/>
                    <ns1:DeliveryStreet xsi:nil="true"/>
                    <ns1:DeliveryZipCode xsi:nil="true"/>
                    <ns1:Dimension xsi:nil="true"/>
                    <ns1:DlvMode xsi:nil="true"/>
                    <ns1:EndDate xsi:nil="true"/>
                    <ns1:ExternalItemId xsi:nil="true"/>
                    <ns1:InventDeliverNow xsi:nil="true"/>
                    <ns1:InventDimId xsi:nil="true"/>
                    <ns1:InventRefId xsi:nil="true"/>
                    <ns1:InventRefTransId xsi:nil="true"/>
                    <ns1:InventRefType xsi:nil="true"/>
                    <ns1:InventTransId xsi:nil="true"/>
                    <ns1:ItemBOMId xsi:nil="true"/>
                    <ns1:ItemId>9400</ns1:ItemId>
                    <ns1:ItemRouteId xsi:nil="true"/>
                    <ns1:ItemTagging xsi:nil="true"/>
                    <ns1:LedgerAccount xsi:nil="true"/>
                    <ns1:LineAmount xsi:nil="true"/>
                    <ns1:LineDisc xsi:nil="true"/>
                    <ns1:LineHeader xsi:nil="true"/>
                    <ns1:LineNum>1.0000000000</ns1:LineNum>
                    <ns1:LinePercent>0</ns1:LinePercent>
                    <ns1:LinePropertyId xsi:nil="true"/>
                    <ns1:MultiLnDisc xsi:nil="true"/>
                    <ns1:MultiLnPercent xsi:nil="true"/>
                    <ns1:Name>Steam Heat Exchanger</ns1:Name>
                    <ns1:NewSalesPrice xsi:nil="true"/>
                    <ns1:NewTotalContributionRatio xsi:nil="true"/>
                    <ns1:OffsetAccount xsi:nil="true"/>
                    <ns1:OffsetAccountType xsi:nil="true"/>
                    <ns1:OffsetCompany xsi:nil="true"/>
                    <ns1:OffsetTxt xsi:nil="true"/>
                    <ns1:OrigCostPrice xsi:nil="true"/>
                    <ns1:OverDeliveryPct xsi:nil="true"/>
                    <ns1:OverrideCommission xsi:nil="true"/>
                    <ns1:PackingUnit xsi:nil="true"/>
                    <ns1:PackingUnitQty xsi:nil="true"/>
                    <ns1:PalletTagging xsi:nil="true"/>
                    <ns1:Port xsi:nil="true"/>
                    <ns1:PriceCalcId xsi:nil="true"/>
                    <ns1:PriceUnit>1.00</ns1:PriceUnit>
                    <ns1:ProjCategoryId xsi:nil="true"/>
                    <ns1:ProjDescription xsi:nil="true"/>
                    <ns1:ProjTransCode xsi:nil="true"/>
                    <ns1:ProjTransType xsi:nil="true"/>
                    <ns1:QtyOrdered>12.00</ns1:QtyOrdered>
                    <ns1:QuotationId xsi:nil="true"/>
                    <ns1:QuotationStatus xsi:nil="true"/>
                    <ns1:ReceiptDateRequested xsi:nil="true"/>
                    <ns1:RecId xsi:nil="true"/>
                    <ns1:RecVersion xsi:nil="true"/>
                    <ns1:RemainInventPhysical xsi:nil="true"/>
                    <ns1:RemainSalesFinancial xsi:nil="true"/>
                    <ns1:RemainSalesPhysical xsi:nil="true"/>
                    <ns1:SalesDeliverNow xsi:nil="true"/>
                    <ns1:SalesGroup xsi:nil="true"/>
                    <ns1:SalesMarkup xsi:nil="true"/>
                    <ns1:SalesPrice>9500.00</ns1:SalesPrice>
                    <ns1:SalesPriceNet xsi:nil="true"/>
                    <ns1:SalesQty>12.00</ns1:SalesQty>
                    <ns1:SalesUnit>Ea</ns1:SalesUnit>
                    <ns1:ShippingDateRequested>2015-04-07</ns1:ShippingDateRequested>
                    <ns1:StartDate xsi:nil="true"/>
                    <ns1:StatProcId xsi:nil="true"/>
                    <ns1:StatTriangularDeal xsi:nil="true"/>
                    <ns1:TaxAutoGenerated xsi:nil="true"/>
                    <ns1:TaxGroup xsi:nil="true"/>
                    <ns1:TaxItemGroup xsi:nil="true"/>
                    <ns1:TransactionCode xsi:nil="true"/>
                    <ns1:TransDate xsi:nil="true"/>
                    <ns1:Transferred2Forecast xsi:nil="true"/>
                    <ns1:Transferred2ItemReq xsi:nil="true"/>
                    <ns1:Transferred2Journal xsi:nil="true"/>
                    <ns1:Transport xsi:nil="true"/>
                    <ns1:UnderDeliveryPct xsi:nil="true"/>
                    <ns1:InventDim class="entity">
                        <ns1:configId>STD</ns1:configId>
                        <ns1:InventBatchId xsi:nil="true"/>
                        <ns1:InventColorId xsi:nil="true"/>
                        <ns1:inventDimId xsi:nil="true"/>
                        <ns1:InventLocationId>01</ns1:InventLocationId>
                        <ns1:inventSerialId/>
                        <ns1:InventSiteId>SITE 1</ns1:InventSiteId>
                        <ns1:InventSizeId xsi:nil="true"/>
                        <ns1:RecId xsi:nil="true"/>
                        <ns1:RecVersion xsi:nil="true"/>
                        <ns1:wMSLocationId xsi:nil="true"/>
                    </ns1:InventDim>
                </ns1:SalesQuotationLine>
            </ns1:SalesQuotationTable>
        </ns1:SalesQuotationService>
    </ns2:SalesQuotationServiceCreateRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
   Heap Size: 43 MB
20150323 09:41:49   
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
    <s:Fault>
        <faultcode>s:Client</faultcode>
        <faultstring xml:lang="en-US">Request Failed. See the Exception Log for details.</faultstring>
        <detail>
            <AifFault xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <CustomDetailXml i:nil="true"/>
            <FaultMessageListArray i:nil="true"/>
        </AifFault>
    </detail>
</s:Fault>
</s:Body>
</s:Envelope>