title: passing SOAP req: Passing ItemNo String but it cannot locate the Codeunit which is exposed as a web service in NAV 2018
body: <p>Im calling an exposed codeunit (func GetItemPic) in NAV 2018 but i am getting the response that it can not be found but it is exposed.
  Can anybody help me, why is this happening, i also checked verified if the service exists or not in the 'services' list by making up the url. http://DESKTOP-xxxx:1234/DynamicsNAV110/WS/CRONUS%20Danmark%20A%2FS/services</p>
  <p><a href="https://i.stack.imgur.com/IWZQr.png" rel="nofollow noreferrer">This is my request</a></p>
  <p><a href="https://i.stack.imgur.com/Gn59X.png" rel="nofollow noreferrer">Error</a></p>
  <p><a href="https://i.stack.imgur.com/jRzDz.png" rel="nofollow noreferrer">and this is the response</a></p>
  <p>The CU XML is provided below:</p>
  <pre><code>    &lt;definitions xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:tns=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations&quot; targetNamespace=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations&quot;&gt;
  &lt;types&gt;
  &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot; elementFormDefault=&quot;qualified&quot; targetNamespace=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations&quot;&gt;
  &lt;element name=&quot;PostItemJournal&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence/&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;PostItemJournal_Result&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence/&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;PostItemRecJournal&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence/&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;PostItemRecJournal_Result&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence/&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;PostPurchOrderMS&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;documentNo&quot; type=&quot;string&quot;/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;PostPurchOrderMS_Result&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence/&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;PostSalesOrderMS&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;documentNo&quot; type=&quot;string&quot;/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;PostSalesOrderMS_Result&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence/&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;GetItemPic&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;itemNo&quot; type=&quot;string&quot;/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;GetItemPic_Result&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;return_value&quot; type=&quot;string&quot;/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;SetItemPic&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;itemNo&quot; type=&quot;string&quot;/&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;fileName&quot; type=&quot;string&quot;/&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;base64Image&quot; type=&quot;string&quot;/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;element name=&quot;SetItemPic_Result&quot;&gt;
  &lt;complexType&gt;
  &lt;sequence&gt;
  &lt;element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;return_value&quot; type=&quot;string&quot;/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;/schema&gt;
  &lt;/types&gt;
  &lt;message name=&quot;PostItemJournal&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostItemJournal&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;PostItemJournal_Result&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostItemJournal_Result&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;PostItemRecJournal&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostItemRecJournal&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;PostItemRecJournal_Result&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostItemRecJournal_Result&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;PostPurchOrderMS&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostPurchOrderMS&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;PostPurchOrderMS_Result&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostPurchOrderMS_Result&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;PostSalesOrderMS&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostSalesOrderMS&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;PostSalesOrderMS_Result&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:PostSalesOrderMS_Result&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;GetItemPic&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:GetItemPic&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;GetItemPic_Result&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:GetItemPic_Result&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;SetItemPic&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:SetItemPic&quot;/&gt;
  &lt;/message&gt;
  &lt;message name=&quot;SetItemPic_Result&quot;&gt;
  &lt;part name=&quot;parameters&quot; element=&quot;tns:SetItemPic_Result&quot;/&gt;
  &lt;/message&gt;
  &lt;portType name=&quot;MSOperations_Port&quot;&gt;
  &lt;operation name=&quot;PostItemJournal&quot;&gt;
  &lt;input name=&quot;PostItemJournal&quot; message=&quot;tns:PostItemJournal&quot;/&gt;
  &lt;output name=&quot;PostItemJournal_Result&quot; message=&quot;tns:PostItemJournal_Result&quot;/&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;PostItemRecJournal&quot;&gt;
  &lt;input name=&quot;PostItemRecJournal&quot; message=&quot;tns:PostItemRecJournal&quot;/&gt;
  &lt;output name=&quot;PostItemRecJournal_Result&quot; message=&quot;tns:PostItemRecJournal_Result&quot;/&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;PostPurchOrderMS&quot;&gt;
  &lt;input name=&quot;PostPurchOrderMS&quot; message=&quot;tns:PostPurchOrderMS&quot;/&gt;
  &lt;output name=&quot;PostPurchOrderMS_Result&quot; message=&quot;tns:PostPurchOrderMS_Result&quot;/&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;PostSalesOrderMS&quot;&gt;
  &lt;input name=&quot;PostSalesOrderMS&quot; message=&quot;tns:PostSalesOrderMS&quot;/&gt;
  &lt;output name=&quot;PostSalesOrderMS_Result&quot; message=&quot;tns:PostSalesOrderMS_Result&quot;/&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;GetItemPic&quot;&gt;
  &lt;input name=&quot;GetItemPic&quot; message=&quot;tns:GetItemPic&quot;/&gt;
  &lt;output name=&quot;GetItemPic_Result&quot; message=&quot;tns:GetItemPic_Result&quot;/&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;SetItemPic&quot;&gt;
  &lt;input name=&quot;SetItemPic&quot; message=&quot;tns:SetItemPic&quot;/&gt;
  &lt;output name=&quot;SetItemPic_Result&quot; message=&quot;tns:SetItemPic_Result&quot;/&gt;
  &lt;/operation&gt;
  &lt;/portType&gt;
  &lt;binding name=&quot;MSOperations_Binding&quot; type=&quot;tns:MSOperations_Port&quot;&gt;
  &lt;binding xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; transport=&quot;http://schemas.xmlsoap.org/soap/http&quot;/&gt;
  &lt;operation name=&quot;PostItemJournal&quot;&gt;
  &lt;operation xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; soapAction=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations:PostItemJournal&quot; style=&quot;document&quot;/&gt;
  &lt;input name=&quot;PostItemJournal&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/input&gt;
  &lt;output name=&quot;PostItemJournal_Result&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/output&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;PostItemRecJournal&quot;&gt;
  &lt;operation xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; soapAction=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations:PostItemRecJournal&quot; style=&quot;document&quot;/&gt;
  &lt;input name=&quot;PostItemRecJournal&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/input&gt;
  &lt;output name=&quot;PostItemRecJournal_Result&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/output&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;PostPurchOrderMS&quot;&gt;
  &lt;operation xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; soapAction=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations:PostPurchOrderMS&quot; style=&quot;document&quot;/&gt;
  &lt;input name=&quot;PostPurchOrderMS&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/input&gt;
  &lt;output name=&quot;PostPurchOrderMS_Result&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/output&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;PostSalesOrderMS&quot;&gt;
  &lt;operation xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; soapAction=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations:PostSalesOrderMS&quot; style=&quot;document&quot;/&gt;
  &lt;input name=&quot;PostSalesOrderMS&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/input&gt;
  &lt;output name=&quot;PostSalesOrderMS_Result&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/output&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;GetItemPic&quot;&gt;
  &lt;operation xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; soapAction=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations:GetItemPic&quot; style=&quot;document&quot;/&gt;
  &lt;input name=&quot;GetItemPic&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/input&gt;
  &lt;output name=&quot;GetItemPic_Result&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/output&gt;
  &lt;/operation&gt;
  &lt;operation name=&quot;SetItemPic&quot;&gt;
  &lt;operation xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; soapAction=&quot;urn:microsoft-dynamics-schemas/codeunit/MSOperations:SetItemPic&quot; style=&quot;document&quot;/&gt;
  &lt;input name=&quot;SetItemPic&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/input&gt;
  &lt;output name=&quot;SetItemPic_Result&quot;&gt;
  &lt;body xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; use=&quot;literal&quot;/&gt;
  &lt;/output&gt;
  &lt;/operation&gt;
  &lt;/binding&gt;
  &lt;service name=&quot;MSOperations&quot;&gt;
  &lt;port name=&quot;MSOperations_Port&quot; binding=&quot;tns:MSOperations_Binding&quot;&gt;
  &lt;address xmlns=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; location=&quot;http://desktop-pll1kkl:11047/DynamicsNAV110/WS/CRONUS%20Danmark%20A%252FS/Codeunit/MSOperations&quot;/&gt;
  &lt;/port&gt;
  &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>