Cannot create customer via Page services.
devdrone
Member Posts: 14
I am trying to create a customer using the page service.
This is the xml packet
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins="urn:microsoft-dynamics-schemas/page/customercard">
<soapenv:Header />
<soapenv:Body>
<ins:Create>
<ins:CustomerCard>
<ins:Name>Devdrone</ins:Name>
<ins:Address>CB28</ins:Address>
<ins:Address_2>Salt Lake</ins:Address_2>
<ins:City>Kolkata</ins:City>
<ins:Post_Code>700080</ins:Post_Code>
<ins:Country_Region_Code>IN</ins:Country_Region_Code>
<ins:Phone_No>7278585866</ins:Phone_No>
<ins:E_Mail>devdrone@insync.co.in</ins:E_Mail>
</ins:CustomerCard>
</ins:Create>
</soapenv:Body>
</soapenv:Envelope>
The error is The underlying connection was closed: An unexpected error occurred on a receive.
This is what comes in the Event Viewer


This worked fine when i was using NAV 2013 R2, But this error is coming in NAV 2016.
This is the xml packet
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins="urn:microsoft-dynamics-schemas/page/customercard">
<soapenv:Header />
<soapenv:Body>
<ins:Create>
<ins:CustomerCard>
<ins:Name>Devdrone</ins:Name>
<ins:Address>CB28</ins:Address>
<ins:Address_2>Salt Lake</ins:Address_2>
<ins:City>Kolkata</ins:City>
<ins:Post_Code>700080</ins:Post_Code>
<ins:Country_Region_Code>IN</ins:Country_Region_Code>
<ins:Phone_No>7278585866</ins:Phone_No>
<ins:E_Mail>devdrone@insync.co.in</ins:E_Mail>
</ins:CustomerCard>
</ins:Create>
</soapenv:Body>
</soapenv:Envelope>
The error is The underlying connection was closed: An unexpected error occurred on a receive.
This is what comes in the Event Viewer


This worked fine when i was using NAV 2013 R2, But this error is coming in NAV 2016.
0
Answers
-
How come there are
;
here"; xmlns
? This makes it invalid XML.0 -
Duikmeester wrote: »How come there are
;
here"; xmlns
? This makes it invalid XML.
I removed the ';'
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins="urn:microsoft-dynamics-schemas/page/customercard">
<soapenv:Header />
<soapenv:Body>
<ins:Create>
<ins:CustomerCard>
<ins:Name>Devdrone</ins:Name>
<ins:Address>CB28</ins:Address>
<ins:Address_2>Salt Lake</ins:Address_2>
<ins:City>Kolkata</ins:City>
<ins:Post_Code>700080</ins:Post_Code>
<ins:Country_Region_Code>IN</ins:Country_Region_Code>
<ins:Phone_No>7278585866</ins:Phone_No>
<ins:E_Mail>devdrone@insync.co.in</ins:E_Mail>
</ins:CustomerCard>
</ins:Create>
</soapenv:Body>
</soapenv:Envelope>
Still the same error.0 -
probably whitespaces at the end of a line or at the end of the xml
https://community.dynamics.com/nav/f/34/t/182486\\The truth exists in seven versions.0 -
[Topic moved from 'Navision e-Commerce' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 326 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

