consumption of WEB services in java plateform-Error

rajnetplacerajnetplace Member Posts: 5
Dear All,
I have created the web service through pages and provide the NTLM Auth. I am able to consume this through .net but when try to consume through Java it through the exception...
POST /DynamicsNAV/WS/Navision/Page/Customer HTTP/1.1

Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAADQANAHAAAAAaABoAfQAAAAAAAAAAAAAABoKKAuQQzBANWruSAAAAAAAAAAAAAAAAAAAAAE/oZDG2TqeHc7wT/707bQ0VtllCXqwBC0FkbWluaXN0cmF0b3JQYWRhbS1KLVNpbmdocy1NYWNCb29rLVBybw==

User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5

Host: 203.122.18.86:7047

Accept: */*

SOAPAction: "urn:microsoft-dynamics-schemas/page/customer:Create"

Content-type: text/xml; charset=utf-8

Content-Length: 1212



<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:q0="urn:microsoft-dynamics-schemas/page/customer" xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;

<soapenv:Body>

<q0:Create>

<q0:Customer>

<q0:No>1234567</q0:No>

<q0:Name>Padam Jeet Singh</q0:Name>

<q0:Address>C-70</q0:Address>

<q0:Address_2>Phase 2</q0:Address_2>

<q0:Post_Code>201301</q0:Post_Code>

<q0:Country_Region_Code>IN</q0:Country_Region_Code>

<q0:State_Code>UP</q0:State_Code>

<q0:Phone_No>9810146640</q0:Phone_No>

<q0:Fax_No>123456789</q0:Fax_No>

<q0:E_Mail>padam.singh@inventum.net</q0:E_Mail>

<q0:Home_Page>http://www.padamj.com</q0:Home_Page&gt;

<q0:Gen_Bus_Posting_Group>DOM</q0:Gen_Bus_Posting_Group>

<q0:Customer_Posting_Group>Enterprise</q0:Customer_Posting_Group>

<q0:L_S_T_No>11111111111111111111</q0:L_S_T_No>

<q0:C_S_T_No>11111111111111111111</q0:C_S_T_No>

<q0:P_A_N_No>E798A123123</q0:P_A_N_No>

<q0:T_I_N_No>12345678901</q0:T_I_N_No>

</q0:Customer>

</q0:Create>

</soapenv:Body>

</soapenv:Envelope>

HTTP/1.1 500 Internal Server Error

Content-Length: 394

Content-Type: text/xml; charset=utf-8

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 12 Mar 2012 04:13:21 GMT

Any Idea...

Comments

  • kinekine Member Posts: 12,562
    In most cases the error 500 is problem with authentication. Are you sure that you are passing correct login info? Is the NAV Server set to NTLM?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • rajnetplacerajnetplace Member Posts: 5
    very sure i have already consume through .net and it is working fine
  • james_csjames_cs Member Posts: 39
    I don't think java can handle NTLM. You may find that viewing the WDSL with IE works fine but doesn't work with Firefox.

    Turn off NTLM authentication in the CustomSettings.config file.
    <!--
      Turns on or off NTLM authentication protocol for Web Services
          false: Use SPNEGO (recommended)
          true: Use NTLM only
      -->
    	<add key="WebServicesUseNTLMAuthentication" value="false"></add>
    

    Good luck!
  • kinekine Member Posts: 12,562
    value false means SPNEGO - it means Kerberos, which is much worse for Java than NTLM. NTLM is not problem for Java...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.