We are facing an issue when we are sending a SOAP XML string to create a purchase Order From SOAP UI Editor , SOAP XML string is also attached , Please have a look .
Web service is working fine , we have tested this from Dot Net code. Also we have tested different GET methods , like GetCompayList etc , they are also working fine . The issue we are facing is with SOAP XML string that we are passing from SOAP UI.
We are getting following Exception in GP Web service Exception Console.
"Object reference not set to an instance of an object.
at Microsoft.Dynamics.Common.PolicyBusinessServiceImplementation.ConfigurePolicy(Context context, Policy consumerPolicy, Policy servicePolicy)"
If we click on "View Requested XML " we are getting following
"<?xml version="1.0"?>
<RequestObjects>
<Policy xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema">
<Key>
<Id>c3b14f1e-b7b9-49c3-bce4-d1717bb5a4ab</Id>
</Key>
<Behaviors />
<Name>Create Purchase Order Policy</Name>
<RootBusinessObjectName>Purchasing Document</RootBusinessObjectName>
</Policy>
</RequestObjects>
SOAP XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:soap="schemas.xmlsoap.org/.../" xmlns:m="schemas.microsoft.com/.../01" xmlns:ns="schemas.microsoft.com/.../01" xmlns:ns1="schemas.microsoft.com/.../01">
<soap:Header>
</soap:Header>
<soap:Body>
<m:CreatePurchaseOrder>
<m:purchaseOrder>
<m:Key>
<m:CompanyKey>
<ns:Id>-1</ns:Id>
</m:CompanyKey>
<m:Id>PO4077</m:Id>
</m:Key>
<m:Type>Standard</m:Type>
<m:VendorKey>
<m:CompanyKey>
<ns:Id>-1</ns:Id>
</m:CompanyKey>
<m:Id>ACETRAVE0001</m:Id>
</m:VendorKey>
<m:Date>2014-04-17T00:00:00-04:00</m:Date>
<m:DoesAllowSalesOrderCommitments>true</m:DoesAllowSalesOrderCommitments>
<m:CreatedBy>WS_ADMINISTRATO</m:CreatedBy>
<m:CompanyKey>
<ns:Id>-1</ns:Id>
</m:CompanyKey>
<m:Lines>
<m:PurchaseOrderLine>
<m:WarehouseKey>
<m:CompanyKey>
<ns:Id>-1</ns:Id>
</m:CompanyKey>
<m:Id>WAREHOUSE</m:Id>
</m:WarehouseKey>
<m:VendorItemNumber>100XLG</m:VendorItemNumber>
<m:ItemKey>
<m:CompanyKey>
<ns:Id>-1</ns:Id>
</m:CompanyKey>
<m:Id>100XLG</m:Id>
</m:ItemKey>
<m:QuantityOrdered>
<m:Value>10</m:Value>
<m:DecimalDigits>0</m:DecimalDigits>
</m:QuantityOrdered>
</m:PurchaseOrderLine>
</m:Lines>
</m:purchaseOrder>
<m:context>
<ns1:OrganizationKey>
<m:CompanyKey>
<ns:Id>-1</ns:Id>
</m:CompanyKey>
</ns1:OrganizationKey>
<ns:CultureName>en-US</ns:CultureName>
<ns:CurrencyType>Transactional</ns:CurrencyType>
<ns:RoleKey>
<ns1:Id>e18b321a-9548-48fb-b75a-dee0a618ddaa</ns1:Id>
</ns:RoleKey>
</m:context>
<m:policy>
<m:Key>
<m:Id>c3b14f1e-b7b9-49c3-bce4-d1717bb5a4ab</m:Id>
</m:Key>
<m:Name>Create Purchase Order Policy</m:Name>
<m:RootBusinessObjectName>Purchasing Document</m:RootBusinessObjectName>
</m:policy>
</m:CreatePurchaseOrder>
</soap:Body>
</soap:Envelope>
*This post is locked for comments