Cannot create customer via Page services.

devdronedevdrone 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&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; 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

ypc0ba7izut9.png

1qv2sdrm7fy2.png

This worked fine when i was using NAV 2013 R2, But this error is coming in NAV 2016.

Answers

  • DuikmeesterDuikmeester Member Posts: 304
    edited 2016-04-18
    How come there are
    ;
    
    here
    "; xmlns
    
    ? This makes it invalid XML.
  • devdronedevdrone Member Posts: 14
    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&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; 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.
  • Peter+is1Peter+is1 Member Posts: 174
    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.
  • krikikriki Member, Moderator Posts: 9,094
    [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!


Sign In or Register to comment.