1. Pepe Cuenca
  2. PowerBuilder
  3. Tuesday, 17 March 2020 15:57 PM UTC

Good afternoon everybody, 

I'm calling an external SOAP Webservice, and I'm having problems with the Datetime format. 

I'm declaring my variables as Datetime and when I debug the code, the value of the variable is "17/03/2020 00:00:00".

The call crashes because of an invalida datetime format, which is, according to the provider, "2020-03-17T00:00:00+01:00"

I have to send the value without "+01:00", which I understand is the timezone. 

How can I do this?

Thank you very much, as always.

Pepe. 

 

Pepe Cuenca Accepted Answer Pending Moderation
  1. Wednesday, 18 March 2020 12:18 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chris, Thanks for the reply. 

The problem is that my provider tells me that I am sending him a bad format in my request. 

I'm just declaring a variable as datetime and passing it as a part of an object in the call. 

I'm using proxy object. 

If I do it with http client it just works fine. 

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 18 March 2020 14:35 PM UTC
Is your PB App using the EasySOAP or DotNetSOAP web service feature currently?
  1. Helpful
  1. Pepe Cuenca
  2. Wednesday, 18 March 2020 14:45 PM UTC
Hi Chris, DotNetSOAP
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 18 March 2020 15:12 PM UTC
Thanks ... I was just curious. Either way, I think that just downloading the WSDL and editing the XML schema on the D/T column format should do the trick. Yes, the HTTPClient should always work as you are in full control of the XML data stream & formatting.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 17 March 2020 19:14 PM UTC
  2. PowerBuilder
  3. # 2

Hi Pepe;

  It sounds like the SOAP Web Service author is returning you a date + time zone and not DateTime.

For example: DT + TZ = "<start>2002-09-24+06:00</start>"

    Where your PB App is expecting standard SOAP D+T... "<start>2002-09-24T06:00:00</start>"

I would suggest that you either:

a) Contact the WS provider to change their D/T format     //OR

b) Download the WSDL and change the XML Schema D/T to the format PB requires.

    Then build your WS DW and/or proxies from that amended WSDL/XML Schema column format.

HTH

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.