Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you pass a datetime param. calling a .net ws?
Message
De
10/09/2019 12:29:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01670728
Message ID:
01670737
Vues:
39
>>>Hi
>>>I am trying to consume a .net web service, where one of the parameters is a datetime. Tried all sorts of formats, but they all fail in this field. Any ideas how should i format it?
>>>
>>>TIA
>>>Jaime
>>
>>ttoc(datetime, 3) is the correct XML format for a date time as Antonio already said.
>>
>>FWIW I would write a C# wrapper for the service (with SOAP, it was always problematic for me to consume a service from within VFP).
>>
>>Maybe you can share the wsdl address of the service.
>
>Thanks Cetin
>I can't share the wsdl, it's in an intranet, but the function itself is extremely easy:
>
>GetFlightDetails ( airline as string, flightNo as string, flightDate as datetime, SecKey as string ) as FlightData
>*** the guy that wrote it tests it through fiddler, and sent me the following:
>URL
>http://server/WS/ASMXServices/AsmxWrapperService.asmx/GetFlightDetails
>
>Header
>Content-Type: application/x-www-form-urlencoded
>
>Body
>airline=ly&flightNo=315&flightDate=05/16/2018&SecKey=some_secret_key
>
It is an asmx (aka web service info specific to .Net). .Net guys like doing .net compatible things.
However, from body it was a simple:
Set date MDY
myDate = dtoc(theDate) && or dtoc(theDateTime)
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform