No data on webservice from converted database
birre
Member Posts: 22
Hi
Im trying to fetch data from a webservice throught vb.net. The items seem to connect with the published web service page, but wont get any data. The problem is that the page has been created on a converted database where no other pages are inside the companies somehow.
When I try to run the page I receive this error
The Object Metadata does not exist. Identification fields and values: Object Type = 'Page', Object ID= '0'
Its a page created with the wizard, sourccetable Prod. Part Routing Line, all fields included. So the page has been published and I can succesfully connect it via IE and VS2010; but I don't get any data.
Here is the code
The Integer i always gives me value 0. While there should be some rows according to the data in Navision. Also with empty Criteria i don't get any rows.
Is there a problem with the code, with database conversion or with the published webservice?
I already tried to compile everything multiple times, its weird there are no other pages; so i can't start the RTC, but the page should transport data to the WS?
Thanks
Im trying to fetch data from a webservice throught vb.net. The items seem to connect with the published web service page, but wont get any data. The problem is that the page has been created on a converted database where no other pages are inside the companies somehow.
When I try to run the page I receive this error
The Object Metadata does not exist. Identification fields and values: Object Type = 'Page', Object ID= '0'
Its a page created with the wizard, sourccetable Prod. Part Routing Line, all fields included. So the page has been published and I can succesfully connect it via IE and VS2010; but I don't get any data.
Here is the code
Dim baseURL As String = "http://db:7047/DynamicsNAV/WS/"
Dim systemService As New SystemServiceRef.SystemService()
systemService.Url = baseURL + "SystemService"
systemService.UseDefaultCredentials = True
Dim companies() As String = systemService.Companies()
Dim cur As String = companies(0)
Dim ProdPartPageURL As String = baseURL + Uri.EscapeDataString(cur) + "/Page/ProdPart"
Console.WriteLine(vbCrLf + "URL of Customer Page: " + ProdPartPageURL)
Dim prodpartService As New ProdPartPage.ProdPart_Service()
prodpartService.Url = ProdPartPageURL
prodpartService.UseDefaultCredentials = True
Dim fRoutingStatus As New ProdPartPage.ProdPart_Filter()
fRoutingStatus.Field = ProdPartPage.ProdPart_Fields.Routing_Status
fRoutingStatus.Criteria = "In Progress"
Dim fWorkCenterNo As New ProdPartPage.ProdPart_Filter()
fWorkCenterNo.Field = ProdPartPage.ProdPart_Fields.Work_Center_No
fWorkCenterNo.Criteria = "04"
Try
Dim filters() As ProdPartPage.ProdPart_Filter = New ProdPartPage.ProdPart_Filter(1) {fRoutingStatus, fWorkCenterNo}
Dim prodparts() As ProdPartPage.ProdPart = prodpartService.ReadMultiple(filters, Nothing, 0)
Dim i As Integer = prodparts.Count
For Each prodpart As ProdPartPage.ProdPart In prodparts
System.Diagnostics.Debug.WriteLine(prodpart.Order_No)
Next
Catch ex As Exception
Dim err As String = ex.ToString
End Try
The Integer i always gives me value 0. While there should be some rows according to the data in Navision. Also with empty Criteria i don't get any rows.
Is there a problem with the code, with database conversion or with the published webservice?
I already tried to compile everything multiple times, its weird there are no other pages; so i can't start the RTC, but the page should transport data to the WS?
Thanks
0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions