After converting from version 10 to version 11 I began to have errors of data types

I have a problem that is shocking and I can not go forward in development. This problem occurred after the conversion of my environment from version 10 to version 11.

The problem occurs in data structures where the DECIMAL and CURRENCY types are transformed into TEXT.

The structure is created as DECIMAL, the WSDL is DECIMAL, but in APP the structure comes as TEXT.

I have all the details that I review in the attachment file.

Please, Help me to solve this problem.
Att,

Dshi.

Hi Dshi,

Regardless of whether this is happening, did you try changing the Text types to the right ones on the consuming side?

Olá Kilian,

Eu não tenho uma chance de mudar o tipo de dados para uma estrutura que já vem junto com o serviço. Tentei criar uma estrutura diferenciada e recebi uma crítica que aquele componente precisaria da mesma estrutura do outro Senão ELE Não Poderia Fazer o Movimento dos Dados. 
Eu tenho um arquivo que descreve esse problema que utilizei para passar para o suporte Outsystems, você poderia lê-lo onde tem detalhes de cada transformação? Estou impactado com o erro porque não consigo sair dele.

Antecipadamente agradeço sua ajuda.

Dshi

Hi Dshi,

Please write in English, if you want me to understand you ;).

Kilian Hekhuis wrote:

Hi Dshi,

Please write in English, if you want me to understand you ;).

Hello Kilian,

Sorry to have written in Portuguese.

I do not have the chance to change the data type to a structure that already comes along with the service. I tried to create a differentiated structure and received a message that that component would need the same structure of the other, otherwise it could not make the movement of the data.
I have a file that describes this problem I used to pass to the Outsystems support, could you read it where it has details of each transformation? I can send you an attachment if you let me.
I am struck by the error because I can not get out of it.

Thank you in advance for your help.

Dshi

Hi Dshi,

At the very least, I can confirm your problem: it works as expected in P10, but not in P11, where Decimal gets converted to Text (in contradiction with the documentation).

This seems a severe bug in the way SS consumes the SOAP service. The only workaround I can think of currently is to use Service Studio version 10 to consume the SOAP service (in a blank Module), save the Module, open the Module in P11, and copy/paste the SOAP service to the right module.

You already have contacted OutSystems Support, so I don't need to advise you to do so :).

Kilian Hekhuis wrote:

Hi Dshi,

At the very least, I can confirm your problem: it works as expected in P10, but not in P11, where Decimal gets converted to Text (in contradiction with the documentation).

This seems a severe bug in the way SS consumes the SOAP service. The only workaround I can think of currently is to use Service Studio version 10 to consume the SOAP service (in a blank Module), save the Module, open the Module in P11, and copy/paste the SOAP service to the right module.

You already have contacted OutSystems Support, so I don't need to advise you to do so :).

Hello Kilian,

I'm grateful for your help.
Glad to be doing the procedure correctly and sad to find that it is a more severe error.

I have already contacted Outsystems support and I have gone through the case in detail. I'll wait for the answer a bit.

I was trying to do what you said, but I can not open SS10 in the P11 environment. I went back to the beginning.

If you have any other ideas, please reply to me as I am anxious for news to resolve this case. I have centrenas of methods using the services and all present this error.

Thank you very much and if I can not get back to you, I wish you a happy new year.

Att
Dshi


Hi Dshi,

You don't need to connect the P10 Service Studio to any environment, just cancel any request for connecting to an environment. You do need some P10 Module/eSpace however since you can't create a new Module without connecting to an environment, I forgot about that. So see a blank Module attached. Just start P10 SS, don't connect to an environment, open the Module and consume the SOAP WSDL.

Next, safe the Module and reopen it in P11. The decimals should be Decimals now.

Kilian Hekhuis wrote:

Hi Dshi,

You don't need to connect the P10 Service Studio to any environment, just cancel any request for connecting to an environment. You do need some P10 Module/eSpace however since you can't create a new Module without connecting to an environment, I forgot about that. So see a blank Module attached. Just start P10 SS, don't connect to an environment, open the Module and consume the SOAP WSDL.

Next, safe the Module and reopen it in P11. The decimals should be Decimals now.


Hello Kilian,
I was able to open a module on the SS10 that had not been recorded on P11 yet. I consumed the WebService and it was with the correct decimals.
But when the module has already been written by P11, the SS10 gives the message: "The module was saved by SS (11.0.203.0) Upgrade your SS.".
Thanks for your help, but the problem is even in Outsystems. I'll wait for the support.
Att
Dshi

Hi Dshi,

See my instructions above: once you saved the module with the consumed SOAP service, you open it in SS 11 (it will auto-convert), then you need to copy/paste the SOAP service to the right destination if it isn't already.

No-one is disputing this is a bug: I'm just trying to show you how you could work around the bug. But if you'd rather wait for support (and a bugfix that'll take a while), be my guest.

Kilian Hekhuis wrote:

Hi Dshi,

See my instructions above: once you saved the module with the consumed SOAP service, you open it in SS 11 (it will auto-convert), then you need to copy/paste the SOAP service to the right destination if it isn't already.

No-one is disputing this is a bug: I'm just trying to show you how you could work around the bug. But if you'd rather wait for support (and a bugfix that'll take a while), be my guest.


Hello Kilian,

Outsystems support has responded to the problem, and to your knowledge, I ship below:


"I've been analyzing this, and in fact I've been able to replicate the behavior of changing the data type of the attributes in the web service (SOAP) response.

In fact, this situation seems to be caused by a defect in the Platform and as such, we will open a defect in the R & D backlog so that this situation is analyzed and corrected.

One of the problems this situation is causing is that you can not assign the output of SOAP to other variables or to create records in entities because the data type is different.

The workaround I suggest you use until this situation is fixed is as follows:

Before assigning or creating records in entities, you must do the data type conversion of the SOAP output;

For example, in the tests I performed, the data type is being changed from 'Decimal' and 'Currency' to 'Text'. So, you should do the conversion back to 'Decimal' using the built-in function of Service Studio (TextToDecimal).

However, there is no function that converts from Text to Currency, so I suggest you change this data type to something like 'Integer' or 'Long Integer' "


I did not find a good solution because it requires a lot of conversion work, but that's what we have for today.

Thanks for your help.

Att,

Dshi


Hi Dshi,

I wouldn't consider that a good workaround either :). However, I stand by what I've said before, it is possible to consume the SOAP service in Service Studio 10, save the eSpace, open the eSpace in Service Studio 11 (it'll auto-convert) and copy/paste the SOAP from there into the right P11 eSpace. That would fully alleviate your problem, even if it's a bit more work than consuming the SOAP service in P11.

It's ok. I will try this solution. I believe it is a minor job that is the suggestion of Outsystems.

Thank you very much.

Att,

Dshi