Biztalk-to-Navision integration problems

sl2mansl2man Member Posts: 5
edited 2009-06-23 in Navision e-Commerce
Hi, All

I'm new in Navision\Biztalk.

I’m learning integration process and I need to send sales order to NAV. For example, I have xml file with some test data and want to put this data to NAV via the Commerce Gateway adapter.
Xml was generated from NavisionSO.xsd schema from the navision installation cd.
The same scheme is used in my simple orchestration in biztalk application.

I have installed biztalk (2006R2) and Commerce Gateway Request Server on one machine (Windows 2003R2 with all the latest updates).
Navision 5.0, Navision App server, CRONUS application on another machine (Windows 2003R2 with all the latest updates). And NAV Db is on the third one (Windows 2008, SQL Server 2008).

All services and app's work from one account (domain\user) which has all permissions.

In CRONUS application I’ve configured a customer (partner setup), and biztalk communication (management setup).

"System check..." shows that everything is OK and there are no errors in event log on both machines.

When I try to send my test document (receive port configured like file adapter), it has disappeared from folder and no event messages are displayed on biztalk machine (looks like everything is fine). Send port configured like commerce gateway adapter.
but on NAV machine new message has appeared in event log:

The description for Event ID ( 20010 ) in Source ( ... ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: The document has not been transferred..

I've spend a lot of time to find the problem, but with no luck.

Maybe someone knows what is the problem or where I can find a solution?

Thank you in advance,

Answers

  • sl2mansl2man Member Posts: 5
    Hi again

    Today I tried to install everything on one machine. I configured all settings, users, etc.
    I created two simple biztalk applications, one to send SO orders from xml file to navision, another one to recieve PO orders from navision to xml file.

    At first, I ran my test to send PO order from navision to xml, configured "Vendor" at partner setup and clicked "send to biztalk" button on the purchase orders form.
    I was happy to see the xml file that came from navision in my folder.

    So, it seemed that my biztalk and navision can see each other and work fine.

    Then I tried to send SO xml to navision. I configured "Customer" at partner setup, added "Agreement Type" SO and set it to active.
    But when I tried to send xml, the same error occured "The document has not been transferred..."

    I don't know where is the problem. Maybe I do something wrong in "Customer" at partner setup?

    Any help will be very much appreciated.

    Thanks
  • genericgeneric Member Posts: 511
    I am wondering why Microsoft has not changed the integration to be done through webservice?
  • bluesky29bluesky29 Member Posts: 29
    Hi sl2man,

    have you tried to debug the NAS ?
    Sounds like the XMLPort-Import could be the problem.

    to debug the NAS stop the service, open a command prompt, move to the installation folder of the NAS,
    try to start the NAS depending of what you use
    NAS for native database
    NASSQL for SQL-Server

    NASSQL debug,servername=<YOURDATABASESERVERNAME>,database=<YOURDATABASENAME>,company=<YOURCOMPANYNAME>,nettype=tcp,startupparameter=CG

    then try to receive a document.

    if the XMLport.Import fails then the message is not correct.

    the next step is to set all properties of XMLport-Tags to:

    MinOccurs=zero
    FieldValidate=No

    to determine the error.

    If the document then succeeds the content of a field is expected or ( if there is a link to another record ) the
    value is not available in the linked record.
  • sl2mansl2man Member Posts: 5
    Thanks a lot, bluesky29!

    I used NASSQL and tried to debug it as you'd described.
    So, the debug showed me a message that was in the event log: The document has not been transferred.

    Unfortunately now i'm using msdn version of nav5.0 with cronus license. So, i think, that's why I can't design xmlports. (no permissions)

    Tomorrow I will try to download license file from msdn and I hope I'll be able to design xmlport.
    Do i need to design "inbound sales order" xmlport? (for my test SO import)

    I looked at the standart Navision.SO.xsd file and i saw that all elements had attributes minOccurs="0" maxOccurs="1".

    I attached my sample xml file, maybe someone can tell what's wrong in it?
    <?xml version="1.0" encoding="utf-8"?>
    <ns0:Navision_SO_1 xmlns:ns0="Navision_SO_1" CompanyID="100">
    <General>
    		<Sell_to_Customer>
    		      <Name>CoolWood Technologies</Name>
    		      <Additional_Name_Info />
    		      <Address>33 Hitech Drive</Address>
    		      <Additional_Address_Info />
    		      <City>Miami</City>
    		      <Contact_Person>Mr. Richard Bready</Contact_Person>
    		      <Post_Code>37125</Post_Code>
    		      <County>ON</County>
    		      <Country_Code>US</Country_Code>
    		</Sell_to_Customer>
    		<Your_Reference />
    		<Order_Date>2009-11-16</Order_Date>
    		<Job_Number />
    		<VAT_Registration_Number>697528465</VAT_Registration_Number>
    		<INTRASTAT_Transaction_Type />
    		<INTRASTAT_Transport_Method />
    		<Document_Creation_Date>2009-11-16</Document_Creation_Date>
    		<External_Document_Number />
    		<Customer_Order_Number />
    		<Quote_Reference_Number />
    	</General>
    	<Invoicing>
    		<Bill_to_Customer Number="30000">
    		      <Name>CoolWood Technologies</Name>
    		      <Additional_Name_Info />
    		      <Address>33 Hitech Drive</Address>
    		      <Additional_Address_Info />
    		      <City>Miami</City>
    		      <Contact_Person>Mr. Richard Bready</Contact_Person>
    		      <Post_Code>37125</Post_Code>
    		      <County>ON</County>
    		      <Country_Code>US</Country_Code>
    		</Bill_to_Customer>
    		<Shortcut_Dimension_1_Code />
    		<Shortcut_Dimension_2_Code />
    		<Payment_Terms>CM</Payment_Terms>
    		<Due_Date>2009-11-29</Due_Date>
    		<Payment_Discount_Percent>0</Payment_Discount_Percent>
    		<Payment_Discount_Date>2009-11-16</Payment_Discount_Date>
    		<Payment_Method />
    	</Invoicing>
    	<Shipping>
    		<Ship_to_Customer>
    		      <Code />
    		      <Name>CRONUS USA, Inc.</Name>
    		      <Additional_Name_Info />
    		      <Address>7122 South Ashford Street</Address>
    		      <Additional_Address_Info>North</Additional_Address_Info>
    		      <City>Atlanta</City>
    		      <Contact_Person />
    		      <Post_Code>31772</Post_Code>
    		      <County />
    		      <Country_Code>US</Country_Code>
    		</Ship_to_Customer>
    		<Shipment_Date>2009-11-18</Shipment_Date>
    		<Shipment_Method>CIF</Shipment_Method>
    		<Location_in_Inventory />
    		<Currency>CAD</Currency>
    		<Shipping_Agent />
    	</Shipping>
    	<Line Line_Type="item">
    		<Number>LS-MAN-10</Number>
    		<Location_in_Inventory>WHITE</Location_in_Inventory>
    		<Description>Manual for Loudspeakers</Description>
    		<Additional_Description />
    		<Unit_of_Measure>Piece</Unit_of_Measure>
    		<Quantity>20</Quantity>
    		<Unit_Price>10</Unit_Price>
    		<VAT_Percent>0</VAT_Percent>
    		<Line_Discount_Percent>0</Line_Discount_Percent>
    		<Line_Discount_Amount>0</Line_Discount_Amount>
    		<Amount>200</Amount>
    		<Amount_Including_VAT>200</Amount_Including_VAT>
    		<Item_Gross_Weight>0</Item_Gross_Weight>
    		<Item_Net_Weight>0</Item_Net_Weight>
    		<Units_per_Parcel>0</Units_per_Parcel>
    		<Unit_Volume>0</Unit_Volume>
    		<Shortcut_Dimension_1_Code />
    		<Shortcut_Dimension_2_Code />
    		<Job_Number />
    		<Item_Serial_Number />
    		<Invoice_Discount_Amount>0</Invoice_Discount_Amount>
    		<Amount_Excluding_VAT>200</Amount_Excluding_VAT>
    		<Item_Variant />
    		<Bin_Code />
    		<Unit_of_Measure_Code>PCS</Unit_of_Measure_Code>
    		<Planned_Delivery_Date>2009-11-18</Planned_Delivery_Date>
    		<Common_Item_Number />
    		<Reservation_Entry />	
    	</Line>
    <Any /> 
    </ns0:Navision_SO_1>
    

    Thanks
  • sl2mansl2man Member Posts: 5
    Hi again!

    License doesn't give me permissions to design xmlports, but I resolve my problem by editing xml file.

    So, my xml was successfully sent when I removed all elements with no data from it. For example, I removed all lines like <Your_Reference /> and I left lines with data such as <Post_Code>37125</Post_Code>.

    It's strange that empty elements come from navision when export occurs, but navision can't accept empty elements during the import process.

    Thanks to all!
  • bluesky29bluesky29 Member Posts: 29
    Hi,

    some kind of haziness in XML-Ports :roll:

    if FieldValidate=default ( <undefined> ) is set in the Tag in an XML-Port Navision VALIDATES the Field

    so if you have some fields which are connected to other records like

    <Job_Number />
    <INTRASTAT_Transaction_Type />
    <INTRASTAT_Transport_Method />

    and these tags are empty the XML-Port fails.

    The first thing if you work with an XML-Port is ( as i described ) set the Tag Properties correct.

    FieldValidate= NO
    MinOccurs=ZERO

    otherwise the XML-Port can fail .Import - Method

    Regards,
    Markus
Sign In or Register to comment.