Web services using codeunit & XMLPorts problem

mglashouwemglashouwe Member Posts: 10
edited 2012-08-16 in NAV Three Tier
Hi Guys!,

Instead of publishing a Page as a web service, we're trying out using XMLPorts in combination with a Codeunit. We used the step-by-step tutorial from this website: http://www.kauffmann.nl/blog/index.php/ ... ervices-3/

It al works fine and nicely, only we got a problem with datatypes. Hopefully you guys know the answer:

If I use the XMLport property Format/Evaluate = XML Format/Evaluate, I get the correct datatypes in my webservice for the fields set in the XMLPort:

example:

Items (table)
No. (fields) In webservice published as String
Description (fields) In webservice published as String
Amount (fields) In webservice published as Decimal

When I want to add an own variable to the XMLPort it always returns as a string!!:

Items (table)
No. (fields) In webservice published as String
Description (fields) In webservice published as String
Custom Amount (text) In webservice published as String

Is there a sollution for this problem? Thanks! :)

Comments

  • thegunzothegunzo Member Posts: 274
    Hi

    Currently there is no way to change the data type of custom fields in a XML port.
    Just be sure that you have MinOccurs and MaxOccurs property set.
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
Sign In or Register to comment.