Cannot access to a function in a webService
                
                    AitorEG                
                
                    Member Posts: 342                
            
                        
            
                    Hi all,
i am trying to consume a function in a web service published in BC. In postman, I get this error:

In the WSDL, I can see tthat the function is published:

This is how the function looks like:

Must add that in this codeunit, I already have fucntions that are consumed without any problem. I'm afraid that the problem might be the comples type sent by parameter....
                i am trying to consume a function in a web service published in BC. In postman, I get this error:

In the WSDL, I can see tthat the function is published:

This is how the function looks like:

Must add that in this codeunit, I already have fucntions that are consumed without any problem. I'm afraid that the problem might be the comples type sent by parameter....
0                
            Answers
- 
            Hello @AitorEG,
Something doesn't add up because looks like you are calling a OData v4 WS and this function is returning an XML, and in the other hand I don't think is possible to publish a codeunit like a OData WS.
How do you call the others functions in this codeunit that you consumed whitout any problem ?
Regards.0 - 
            Hello @ftornero,
This is a call to a function in the same codeunit in BC:

The codeunit is published as SOAP, but as far as I know, this is the way to call to webService in BC no?
Anyway, i'm afraid that the main problem is the XMLPort parameter. If I quit it, I don't get the "resource not found" error.
Must say that the aim of this function, and that XMLPort, is to be the datasource of a datagrid in a C# webApp.0 - 
            I've changed the function to return a text instead of an XML parameter, and I get this:

But now I have to use this text as datasource for the grid, so i assume I must convert it into XML
When I', trying the conversion, I get this classic error
Of course, seems that I must delete "@odata....." information0 
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
 - 323 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
 
