NetTalk Central

Author Topic: Override type declaration in generated WSDL  (Read 4060 times)

Neil Porter

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Override type declaration in generated WSDL
« on: February 13, 2017, 02:33:34 AM »
I have a return value that is declared in Clarion as a REAL. In the WSDL file that is generated by Nettalk this is declared as type="xs:int"

Is there a way that I can override the type declaration, as I would like it to be type"xs:long"

The reason being that I'm consuming this wsdl file into another development environment, and when I read the value that is declared as int, it is being truncated, whereas when it is declared as long, it works fine.

Regards,

Neil.
Clarion 11.0.13244
NetTalk 11.04

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Override type declaration in generated WSDL
« Reply #1 on: February 13, 2017, 05:54:50 AM »
seems like REAL should mat to xs:decimal.
I'll review all the types for the next build though.

cheers
Bruce

Neil Porter

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Re: Override type declaration in generated WSDL
« Reply #2 on: February 13, 2017, 07:42:02 AM »
Thanks Bruce.

I was't suggesting that there was anything wrong with what Nettalk was generating as such, it just seems to be how my other development environment interprets the WSDL file. If anything, I might have suggested that a Real maps to a Float??

I experimented by manually changing the WSDL file without doing anything to the nettalk server, and xs:float, xs:string or xs:int seemed to cause problems, in my client application, but xs:long worked fine.

I just wondered if there was a way that I could put something into the code that would override these fields so that I don't have to remember to manually change them each time.

Regards,

Neil.
Clarion 11.0.13244
NetTalk 11.04

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Override type declaration in generated WSDL
« Reply #3 on: February 16, 2017, 02:30:03 AM »
>> and xs:float, xs:string or xs:int

how about xs:decimal?

>> I just wondered if there was a way that I could put something into the code that would override these fields so that I don't have to remember to manually change them each time.

no, because they're reflected from the Clarion structure. Overriding them away from their "matching value" would get pretty difficult I think. Obviously real can map to xs:long if that's the best option, but that would not work for reals with decimal parts.

test with xs:decimal though and let me know please.

cheers
Bruce