Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Bug in PB-WebService regarding the decimal separator?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tomtomuse...@gmx.de  
View profile  
 More options Jun 26 2008, 12:46 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: tomtomuse...@gmx.de
Date: Thu, 26 Jun 2008 09:46:34 -0700 (PDT)
Local: Thurs, Jun 26 2008 12:46 pm
Subject: Bug in PB-WebService regarding the decimal separator?
Hi folks,
we have a problem in PB regarding the decimal separator.

We use PB Version 11.2 Build 8542 (English) on Windows XP (GERMAN).
The Webservice is a Java-WebService.

The PB-Application retrieves Data from the Java-WebService via the DOT-
NET-Service-Engine.

XML-Message (from TCPMonitor)
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/">
     <soap:Body>
        <ns1:findFondsKurseResponse xmlns:ns1="http://
webservice.dummy.easi.de/">
           <return>
              <ns2:FondsKursValue xmlns:ns2="http://
values.dummy.easi.de">
                 <ns2:fondsPrice>58.57</ns2:fondsPrice>
                 <ns2:fondsDate>2008-04-04T00:00:00+02:00</
ns2:fondsDate>
              </ns2:FondsKursValue>
           </return>
        </ns1:findFondsKurseResponse>
     </soap:Body>
  </soap:Envelope>

PB-Code:
  ...
  p_fondskursvalue la_p_fondskursvalue[]

  la_p_fondskursvalue = ip_AssetService.findFondsKurse(11)

  FOR ll_Cnt = 1 TO upperBound(la_p_fondskursvalue)

    Messagebox(String(ll_Cnt),
String(la_p_fondskursvalue[ll_Cnt].fondsPrice))

  NEXT
  ...

In the IDE everything is fine, only the EXE has a big problem:

If the Decimal-Separator is set to "." (dot) the value of fondsPrice
is "58.57" => OK
If the Decimal-Separator is set to "," (comma=> GERMAN decimal
separator) the value of fondsPrice is "5857" => BIG problem

The Decimal-Separator comes from here:
"HKEY_CURRENT_USER\Control Panel\International\sDecimal"

We did:
- Set the Decimal-Separator via RegistrySet() to "." (dot) just before
invoking the WebService ip_AssetService.findFondsKurse()

We dont' want:
- Convert decimal-Values to String and back
- Divide decimal-Values by 100 or something like that

Any ideas to configure DOT.NET? Or PB? Or what ever?

Thanks,
Tom


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Moon  
View profile  
 More options Jul 5 2008, 5:56 am
Newsgroups: sybase.public.powerbuilder.webservices
From: John Moon <desertf...@marsmail.com>
Date: 5 Jul 2008 02:56:30 -0700
Local: Sat, Jul 5 2008 5:56 am
Subject: Re: Bug in PB-WebService regarding the decimal separator?
I had the same problem. I fixed it by using double.

means:
- replace all "decimal" types in wsdl by "double"
- redeploy

tomtomuse...@gmx.de schrieb:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Moon  
View profile  
 More options Jul 5 2008, 6:08 am
Newsgroups: sybase.public.powerbuilder.webservices
From: John Moon <desertf...@marsmail.com>
Date: 5 Jul 2008 03:08:39 -0700
Local: Sat, Jul 5 2008 6:08 am
Subject: Re: Bug in PB-WebService regarding the decimal separator?
and .... DONT't try to divide by 100 ... it doesn't work

44,55
4455
4555 / 100
44,55 ... OK

BUT

44,6
446
446 / 100
4,46
4,46 .... FAILED !!!!

John Moon schrieb:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnd Schmidt  
View profile  
 More options Jul 5 2008, 4:02 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: Arnd Schmidt <arnd.schm...@gmx.de>
Date: 5 Jul 2008 13:02:58 -0700
Local: Sat, Jul 5 2008 4:02 pm
Subject: Re: Bug in PB-WebService regarding the decimal separator?
Sorry. but I can not understand  your mathematics.

Can you explain?

Arnd

On 5 Jul 2008 03:08:39 -0700, John Moon <desertf...@marsmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnd Schmidt  
View profile  
 More options Jul 5 2008, 6:11 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: Arnd Schmidt <arnd.schm...@gmx.de>
Date: 5 Jul 2008 15:11:34 -0700
Local: Sat, Jul 5 2008 6:11 pm
Subject: Re: Bug in PB-WebService regarding the decimal separator?
Is there any chance to change the culture info like explained in

http://msdn.microsoft.com/en-us/library/syy068tk.aspx

Arnd


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Kemner  
View profile  
 More options Jul 8 2008, 5:08 am
Newsgroups: sybase.public.powerbuilder.webservices
From: Benjamin Kemner <l...@my-signature.de>
Date: 8 Jul 2008 02:08:28 -0700
Local: Tues, Jul 8 2008 5:08 am
Subject: Re: Bug in PB-WebService regarding the decimal separator?
I do

44,55 <--    It,s a german decimal value ... for us 44.55
4455  <--    That's the bug in PB.
                The seperator is killed.
                That's no prob for us but for german decimals.
4555 / 100 <--       I tried this workaround to get my seperator back
44,55 ... OK <- Ah, that works! .......... for this ;)

BUT!!!!

44,6    <--  see above      
446     <--  The seperator is killed ... doesn't matter where it is
446 / 100  <--       Ah, my workaround      
4,46    <--  damn, that's not the value of step 1
4,46 .... FAILED !!!!  <-- owned

Arnd Schmidt schrieb:

--
kemnerAT_NOSPAMsf-datentechnikDOTde

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Kemner  
View profile  
 More options Jul 8 2008, 5:14 am
Newsgroups: sybase.public.powerbuilder.webservices
From: Benjamin Kemner <l...@my-signature.de>
Date: 8 Jul 2008 02:14:55 -0700
Local: Tues, Jul 8 2008 5:14 am
Subject: Re: Bug in PB-WebService regarding the decimal separator?
I don't think so. It's definitly a BUG in Powerbuilder.
Like John sad.

Try to replace the decimal datatypes in wsdl by double.

regards

Benjamin

Arnd Schmidt schrieb:

--
kemnerAT_NOSPAMsf-datentechnikDOTde

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Horan[TeamSybase]  
View profile  
 More options Jul 8 2008, 9:14 am
Newsgroups: sybase.public.powerbuilder.webservices
From: "Paul Horan[TeamSybase]" <phoran_nos...@sybase.com>
Date: 8 Jul 2008 06:14:26 -0700
Local: Tues, Jul 8 2008 9:14 am
Subject: Re: Bug in PB-WebService regarding the decimal separator?
I think your arithmetic is still wrong...

> 44,6 <-- see above 446 <-- The seperator is killed ... doesn't matter
> where it is
> 446 / 100  <-- Ah, my workaround 4,46 <-- damn, that's not the value of
> step 1
> 4,46 .... FAILED !!!!  <-- owned

44,6 (or 44.6) is not 446 / 100, it's 446 / 10.

Paul Horan[TeamSybase]

"Benjamin Kemner" <l...@my-signature.de> wrote in message

news:48732e8c@forums-1-dub...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Terry Dykstra  
View profile  
 More options Jul 8 2008, 4:17 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: "Terry Dykstra" <tddyks...@forestoil.ca>
Date: 8 Jul 2008 13:17:39 -0700
Local: Tues, Jul 8 2008 4:17 pm
Subject: Re: Bug in PB-WebService regarding the decimal separator?
If you are not in the PB 11.5 beta, I suggest you get in.
Either way, please open a case.  You can submit bugs through CaseExpress.

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

<tomtomuse...@gmx.de> wrote in message

news:c72d7852-4c40-44b0-bad1-a89cdd32520f@m73g2000hsh.googlegroups.com...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Moon  
View profile  
 More options Jul 8 2008, 6:17 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: John Moon <desertf...@marsmail.com>
Date: 8 Jul 2008 15:17:26 -0700
Local: Tues, Jul 8 2008 6:17 pm
Subject: Re: Bug in PB-WebService regarding the decimal separator?
Paul Horan[TeamSybase] wrote:
> I think your arithmetic is still wrong...

sure, but I can't get the RIGHT way

if I get the service 446, there is no way to determine what's the right
source.

Paul Horan[TeamSybase] wrote:
>> 44,6 <-- see above 446 <-- The seperator is killed ... doesn't matter
>> where it is
>> 446 / 100  <-- Ah, my workaround 4,46 <-- damn, that's not the value of
>> step 1
>> 4,46 .... FAILED !!!!  <-- owned

> 44,6 (or 44.6) is not 446 / 100, it's 446 / 10.

Yes, you are right. But how can I know that the source is 44.6 and NOT
4.46.

That's no workaround. I doesn't work.

regards

John


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tomtomuse...@gmx.de  
View profile  
 More options Jul 9 2008, 4:17 am
Newsgroups: sybase.public.powerbuilder.webservices
From: tomtomuse...@gmx.de
Date: Wed, 9 Jul 2008 01:17:38 -0700 (PDT)
Local: Wed, Jul 9 2008 4:17 am
Subject: Re: Bug in PB-WebService regarding the decimal separator?

Hi,
a (genius) colleague found a solution.

It's a NOT simple, but it WORKS.
(of course ONLY for DOT.NET-WS)

To-Know:
- You need access to "Visual C# 2008 Express Edition"
- Somewhere under the directory of <PB-Workspace> is a directory
"TmpWebService"
  Here you find a temporary C#-File (<WebServiceName>.cs).
  PB respectively DOT.NET use this file to generate the WS-DLL.
  Each time a new WebService is generated, the old <WebServiceName>.cs-
File is deleted
- You have to edit the temporary C#-File
  1. Add in the header:
  namespace WebService
  {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;

    //ADD START_HEADER
    using System.Reflection;
    using System.Threading;
    using System.IO;
    using System.Globalization;
    using System.Reflection.Emit;
    //ADD ENDE_HEADER
    ...

  2. Add in the Constructor:
    ....
    public ClientService ()
        {
            string urlSetting =
System.Configuration.ConfigurationManager.AppSettings["EndpointURL"];
            if ((urlSetting != null))
            {
                this.Url = urlSetting;
            }
            else
            {
                this.Url = "http://localhost:8080/easi-ws/services/
ClientService ";
            }
            //ADD START_Constructor
            System.Globalization.CultureInfo culture =
System.Globalization.CultureInfo.CreateSpecificCulture("de-DE");
            System.Threading.Thread.CurrentThread.CurrentCulture =
culture;
            culture.NumberFormat.NumberDecimalSeparator = ".";
            culture.NumberFormat.NumberGroupSeparator = ",";
            //ADD ENDE_Constructor
        }
        ...
- Build a "Visual C# 2008 Express Edition"-Project for each C#-File
respectively WebService

Important note:
We did not have success to edit the <WebServiceName>.cs-File in the
directory "TmpWebService" .
We need to use "Visual C# 2008 Express Edition" and build the DLL via
a Visual-C#-Project.

Procedure:
1. Delete all WebService-DLL in the Project
2. Generate ONE PB-WebService-Proxy from PB
   Copy the generated (temporary) C#-File to a save place
Goto 1 until all WebService-DLLs are generated
3. Edit each C#-File => Add entrys in the the header/Constructor
4. Open a Visual-C#-Project for each WebService-DLL
   => Build Solution
6. Copy the genenerated WebService-DLL to the PB-WebService-DLL
directory.

That's all you have to do ;-)

There is also an issue regarding DateTime-Fields.
The original PB-WS changed VALUES from YYYY-MM-DD to YYYY-DD-MM.
The DLL generated by Visual C# works also in this case.

Maybe someone from Sybase can check this and may be
in PB 11.5 it will be somehow easier to run a german WS-Client.

Thanks,
Tom


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnd Schmidt  
View profile  
 More options Jul 9 2008, 3:17 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: Arnd Schmidt <arnd.schm...@gmx.de>
Date: 9 Jul 2008 12:17:56 -0700
Local: Wed, Jul 9 2008 3:17 pm
Subject: Re: Bug in PB-WebService regarding the decimal separator?
It think Sybase has noticed since half a year or more about this general "culture info" problem.
It was also discussed in other threads include sybase folks.

I am glad you found a solution follwing my attempt.

http://msdn.microsoft.com/en-us/library/syy068tk.aspx

Arnd


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tomtomuse...@gmx.de  
View profile  
 More options Jul 9 2008, 4:18 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: tomtomuse...@gmx.de
Date: Wed, 9 Jul 2008 13:18:33 -0700 (PDT)
Local: Wed, Jul 9 2008 4:18 pm
Subject: Re: Bug in PB-WebService regarding the decimal separator?
To be honest: My colleague found the solution by himself.
But we are VERY BUSY at the moment.
So I took some time to find some time to post our way of handle a
german PV-WS-Client ;-)

Anyway, thanks.

Tom


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arnd Schmidt  
View profile  
 More options Jul 9 2008, 6:17 pm
Newsgroups: sybase.public.powerbuilder.webservices
From: Arnd Schmidt <arnd.schm...@gmx.de>
Date: 9 Jul 2008 15:17:49 -0700
Local: Wed, Jul 9 2008 6:17 pm
Subject: Re: Bug in PB-WebService regarding the decimal separator?
Tom,

100 % agreed.

It is a nice workaorund and real good desciption that you posted,

Indeed your collage did  a great job to hock into the constructur -
no offend, I really like this.

You posted the solution 5 times without any quotes -
also to the response I gave to your initial posting.
so I implied something wrong.

I am sorry.

Arnd


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google