How to import NAV web service in Java
zimworxcode
Member Posts: 53
I need to connect to Web services while in Java. I followed instructions on this blog:
http://blogs.msdn.com/b/freddyk/archive ... -java.aspx
but I when i run the the command: C:\java>wsimport -d generated -s source http://localhost:7047/DynamicsNAV/WS/SystemService i get an error that requires me to provide a user name and password, it says:
[ERROR] Server returned HTTP response code: 401 for URL: http://localhost:7047/DynamicsNAV/WS/SystemService, "http://localhost:7047/DynamicsNAV/WS/SystemService" needs authorization, please provide authorization file with read access at C:\Users\developer\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http
/user:password@host:port//<url-path>
I may be missing out something but the blog did not specify details on how we provide authentication when this command is run so please assist me, I need to import a web reference of a Dynamics web service to my java project
http://blogs.msdn.com/b/freddyk/archive ... -java.aspx
but I when i run the the command: C:\java>wsimport -d generated -s source http://localhost:7047/DynamicsNAV/WS/SystemService i get an error that requires me to provide a user name and password, it says:
[ERROR] Server returned HTTP response code: 401 for URL: http://localhost:7047/DynamicsNAV/WS/SystemService, "http://localhost:7047/DynamicsNAV/WS/SystemService" needs authorization, please provide authorization file with read access at C:\Users\developer\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http
I may be missing out something but the blog did not specify details on how we provide authentication when this command is run so please assist me, I need to import a web reference of a Dynamics web service to my java project
0
Comments
-
Yes, because in the example, the command is running under standard windows user. I assume you are running it on machine which is not part of the domain and under user which is not domain user... ;-)0
-
Thank you for the response, i get what u say. The account i am using is an Admin Account, how do i make it a domain account. I am using windows 7 home basic.0
-
Windows 7 Home cannot be part of the domain. You need to use another way...
Try to use Credential Manage in Windows 7 to save login and password for your server. Than it should use the correct login when opening the site...0 -
I have set up Windows Credentials for the login thanks to you Kine, but now i get this error when java parses the wsdl:
[ERROR] Failed to read the WSDL document: http://localhost:7047/DynamicsNAV/WS/SystemService, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>. unknown location0 -
-
may you clarify how i should be running the wsimport command. or is it the server name which is wrong here?i have tried to google the net on this0
-
I need clarify one thing: how looks your infrastructure? You are running all on one machine which is Windows 7 Home?0
-
I have windows 7 home (i know it's not the best for developers but that is what i have currently). The application when complete will be deployed on a server with Windows 2008 but for now i need it to work on my machine jut so i see how it runs. On my machine i have installed JDK 7 early access, netbeans, microsoft dynamics 2009 R2.
There are files that will be placed on my Windows 2008 server machine in a specified folder at random. There is a program that will be listening and logging file names of all files received in this folder. The names are passed to an nav code unit which i have exposed as a service and processing occurs.0 -
Than you do not need to set the login information into credential manager. You only need to be sure that your local account is SUPER user in your local NAV database, over which the webservices are running.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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
