consumption of WEB services in java plateform-Error

rajnetplace
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/" xmlns:q0="urn:microsoft-dynamics-schemas/page/customer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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>
<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...
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/" xmlns:q0="urn:microsoft-dynamics-schemas/page/customer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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>
<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...
0
Comments
-
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?0
-
very sure i have already consume through .net and it is working fine0
-
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!0 -
value false means SPNEGO - it means Kerberos, which is much worse for Java than NTLM. NTLM is not problem for Java...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K 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
- 320 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