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
means:
- replace all "decimal" types in wsdl by "double"
- redeploy
tomtom...@gmx.de schrieb:
44,55
4455
4555 / 100
44,55 ... OK
BUT
44,6
446
446 / 100
4,46
4,46 .... FAILED !!!!
John Moon schrieb:
Can you explain?
Arnd
http://msdn.microsoft.com/en-us/library/syy068tk.aspx
Arnd
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
Try to replace the decimal datatypes in wsdl by double.
regards
Benjamin
Arnd Schmidt schrieb:
--
kemnerAT_NOSPAMsf-datentechnikDOTde
> 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" <lo...@my-signature.de> wrote in message
news:48732e8c@forums-1-dub...
--
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
<tomtom...@gmx.de> wrote in message
news:c72d7852-4c40-44b0...@m73g2000hsh.googlegroups.com...
> 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 ;-)
>
> 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
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
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.
I am glad you found a solution follwing my attempt.
http://msdn.microsoft.com/en-us/library/syy068tk.aspx
Arnd
Anyway, thanks.
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