Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

xml datetime format "2009-12-25T07:00:00"

4 posts in XML Last posting was on 2010-05-06 18:39:52.0Z
Paul Murray Posted on 2009-11-20 14:33:02.0Z
Reply-To: "Paul Murray" <pemurray at interrasys.com>
From: "Paul Murray" <pemurray@interrasys.com>
Newsgroups: sybase.public.powerbuilder.xml
Subject: xml datetime format "2009-12-25T07:00:00"
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b06a89e@forums-1-dub>
Date: 20 Nov 2009 06:33:02 -0800
X-Trace: forums-1-dub 1258727582 10.22.241.152 (20 Nov 2009 06:33:02 -0800)
X-Original-Trace: 20 Nov 2009 06:33:02 -0800, vip152.sybase.com
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1865
Article PK: 814387

Greetings All,

I have a webservice that I am consuming using PB 11.2. The webservice
expects that the datetime (timestamp) field will be formatted with a T
between the date and time.

"the timestamp value representation with the T in between
(2009-12-25T07:00:00) is defined by XML Schema:
http://www.w3.org/TR/xmlschema-2/#dateTime"

I have seen other posts suggesting that I simply send the formatted data as
a string.

Question: The data is formatted in the proxy and the structure as a datetime
field. Can I simply change this to a string and expect it to work?

Also, what is a good technique to view the XML that is generated to access
the web service so that I know the xml is correctly formatted?

Thank you!!

Paul


Paul Murray Posted on 2009-11-21 14:48:13.0Z
Reply-To: "Paul Murray" <pemurray at interrasys.com>
From: "Paul Murray" <pemurray@interrasys.com>
Newsgroups: sybase.public.powerbuilder.xml
References: <4b06a89e@forums-1-dub>
Subject: Re: xml datetime format "2009-12-25T07:00:00"
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b07fdad@forums-1-dub>
Date: 21 Nov 2009 06:48:13 -0800
X-Trace: forums-1-dub 1258814893 10.22.241.152 (21 Nov 2009 06:48:13 -0800)
X-Original-Trace: 21 Nov 2009 06:48:13 -0800, vip152.sybase.com
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1866
Article PK: 767957

Greetings all,

When I try to change the datetime variables to string in the structure and
the proxy, the datatype flips back to datetime in the proxy during the
deploy.

I wouldn't care except that datetime never 'seems' to reach the server.

How can I know if the data is actually being sent?

Thank you!!

Paul

"Paul Murray" <pemurray@interrasys.com> wrote in message
news:4b06a89e@forums-1-dub...
> Greetings All,
>
> I have a webservice that I am consuming using PB 11.2. The webservice
> expects that the datetime (timestamp) field will be formatted with a T
> between the date and time.
>
> "the timestamp value representation with the T in between
> (2009-12-25T07:00:00) is defined by XML Schema:
> http://www.w3.org/TR/xmlschema-2/#dateTime"
>
> I have seen other posts suggesting that I simply send the formatted data
> as a string.
>
> Question: The data is formatted in the proxy and the structure as a
> datetime field. Can I simply change this to a string and expect it to
> work?
>
> Also, what is a good technique to view the XML that is generated to access
> the web service so that I know the xml is correctly formatted?
>
> Thank you!!
>
> Paul
>
>
>
>


Paul Murray Posted on 2009-11-21 23:22:01.0Z
Reply-To: "Paul Murray" <pemurray at interrasys.com>
From: "Paul Murray" <pemurray@interrasys.com>
Newsgroups: sybase.public.powerbuilder.xml
References: <4b06a89e@forums-1-dub> <4b07fdad@forums-1-dub>
Subject: Re: xml datetime format "2009-12-25T07:00:00"
Lines: 111
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b087619$1@forums-1-dub>
Date: 21 Nov 2009 15:22:01 -0800
X-Trace: forums-1-dub 1258845721 10.22.241.152 (21 Nov 2009 15:22:01 -0800)
X-Original-Trace: 21 Nov 2009 15:22:01 -0800, vip152.sybase.com
X-Authenticated-User: pb110beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1867
Article PK: 767959

Okay, I figured it out.

The web service was actually working, but some of the pricing values were
not be calculated correctly based on the date being a holiday.

I had my datatypes displayed on the Visual Rules Execution Server Console in
Tomcat and saw that each one defaulted to '1969-12-31 19:00:00.0' (certainly
not the values that I was using).

So (based on information gleaned from previous posts) I downloaded WireShark
which is a free IP Sniffer. I put in a filter to only log TCP traffic and
Voila, there it was. I could see complete XML SOAP envelope that was sent
and immediately realized that NONE of the datetime related data was being
sent, but the rest of the data was. There was not even empty tags for my
datetime fields.

Then I remembered seeing some data in the structures that had been created
that I had ignored because I did not understand what it was. For each
datetime field that existed in the proxy (and the structures) there was an
associated field with a Boolean data type. So for my two datetime fields
as:

- pickup_date_time_specified
- flight_departure_date_time

there was an additional field as:

- pickup_date_time_specifiedSpecified
- flight_departure_date_timeSpecified

Where did it come from? Who knows? I certainly cannot find it in the WSDL
that I am consuming.

So I had code to populate the two datetime fields as:

request.input.flight_departure_date_time = flight_departure_date_time
request.input.pickup_date_time_specified = pickup_date_time_specified

Which did not work.

So I changed the code as follows:

request.input.flight_departure_date_time = flight_departure_date_time
request.input.flight_departure_date_timespecified = true
request.input.pickup_date_time_specified = pickup_date_time_specified
request.input.pickup_date_time_specifiedspecified = true

And then it worked!! Why? I don't know. Can anyone comment?

I will mention that I changed the data type in the structure for the two
original datetime fields to string (as the data is supposed to go across
like '2009-12-25T07:00:00'. Maybe it has an effect, maybe not. I will have
to test.

Thanks for listening and thanks for any comments.

Paul

"Paul Murray" <pemurray@interrasys.com> wrote in message
news:4b07fdad@forums-1-dub...
> Greetings all,
>
> When I try to change the datetime variables to string in the structure and
> the proxy, the datatype flips back to datetime in the proxy during the
> deploy.
>
> I wouldn't care except that datetime never 'seems' to reach the server.
>
> How can I know if the data is actually being sent?
>
> Thank you!!
>
> Paul
>
> "Paul Murray" <pemurray@interrasys.com> wrote in message
> news:4b06a89e@forums-1-dub...
>> Greetings All,
>>
>> I have a webservice that I am consuming using PB 11.2. The webservice
>> expects that the datetime (timestamp) field will be formatted with a T
>> between the date and time.
>>
>> "the timestamp value representation with the T in between
>> (2009-12-25T07:00:00) is defined by XML Schema:
>> http://www.w3.org/TR/xmlschema-2/#dateTime"
>>
>> I have seen other posts suggesting that I simply send the formatted data
>> as a string.
>>
>> Question: The data is formatted in the proxy and the structure as a
>> datetime field. Can I simply change this to a string and expect it to
>> work?
>>
>> Also, what is a good technique to view the XML that is generated to
>> access the web service so that I know the xml is correctly formatted?
>>
>> Thank you!!
>>
>> Paul
>>
>>
>>
>>
>
>


Michael Kramer Posted on 2010-05-06 18:39:52.0Z
From: "Michael Kramer" <mkr@geokon.dk>
Newsgroups: sybase.public.powerbuilder.xml
References: <4b06a89e@forums-1-dub> <4b07fdad@forums-1-dub> <4b087619$1@forums-1-dub>
Subject: Re: xml datetime format "2009-12-25T07:00:00"
Lines: 146
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.4548
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4be30cf8$1@forums-1-dub>
Date: 6 May 2010 11:39:52 -0700
X-Trace: forums-1-dub 1273171192 10.22.241.152 (6 May 2010 11:39:52 -0700)
X-Original-Trace: 6 May 2010 11:39:52 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.xml:1899
Article PK: 814412

Better late comments than no comments?

The ".specified" fields are "NOT NULL" indicators.
PB will set the indicators correctly based on whether you send NULL or not
since the actual SOAP over HTTP call is actually an XML formatted text
document posted to the web-server.

Example using pseudo-code for the XML text:
// - - - - Local declarations
any la_OrderList
datetime ldt_Now

// - - - - Call using a value
ldt_Now = DateTime( "2009-12-23 12:34:56.789" )
la_OrderList = lws_webservice_proxy.GetOrders( ldt_Now )
// PB assigns as follows:
// OrderDateTime = "2009-12-23T12:34:56.789"
// OrderDateTime_Specified = TRUE

// - - - - Call using NULL
SetNull( ldt_Now )
la_OrderList = lws_webservice_proxy.GetOrders( ldt_Now )
// PB assigns as follows:
// OrderDateTime = ""
// OrderDateTime_Specified = FALSE


HTH
/MicKr-

"Paul Murray" <pemurray@interrasys.com> wrote in message
news:4b087619$1@forums-1-dub...
> Okay, I figured it out.
>
> The web service was actually working, but some of the pricing values were
> not be calculated correctly based on the date being a holiday.
>
> I had my datatypes displayed on the Visual Rules Execution Server Console
> in Tomcat and saw that each one defaulted to '1969-12-31 19:00:00.0'
> (certainly not the values that I was using).
>
> So (based on information gleaned from previous posts) I downloaded
> WireShark which is a free IP Sniffer. I put in a filter to only log TCP
> traffic and Voila, there it was. I could see complete XML SOAP envelope
> that was sent and immediately realized that NONE of the datetime related
> data was being sent, but the rest of the data was. There was not even
> empty tags for my datetime fields.
>
> Then I remembered seeing some data in the structures that had been created
> that I had ignored because I did not understand what it was. For each
> datetime field that existed in the proxy (and the structures) there was an
> associated field with a Boolean data type. So for my two datetime fields
> as:
>
> - pickup_date_time_specified
> - flight_departure_date_time
>
> there was an additional field as:
>
> - pickup_date_time_specifiedSpecified
> - flight_departure_date_timeSpecified
>
> Where did it come from? Who knows? I certainly cannot find it in the
> WSDL that I am consuming.
>
> So I had code to populate the two datetime fields as:
>
> request.input.flight_departure_date_time = flight_departure_date_time
> request.input.pickup_date_time_specified = pickup_date_time_specified
>
> Which did not work.
>
> So I changed the code as follows:
>
> request.input.flight_departure_date_time = flight_departure_date_time
> request.input.flight_departure_date_timespecified = true
> request.input.pickup_date_time_specified = pickup_date_time_specified
> request.input.pickup_date_time_specifiedspecified = true
>
> And then it worked!! Why? I don't know. Can anyone comment?
>
> I will mention that I changed the data type in the structure for the two
> original datetime fields to string (as the data is supposed to go across
> like '2009-12-25T07:00:00'. Maybe it has an effect, maybe not. I will
> have to test.
>
> Thanks for listening and thanks for any comments.
>
> Paul
>
>
>
>
>
> "Paul Murray" <pemurray@interrasys.com> wrote in message
> news:4b07fdad@forums-1-dub...
>> Greetings all,
>>
>> When I try to change the datetime variables to string in the structure
>> and the proxy, the datatype flips back to datetime in the proxy during
>> the deploy.
>>
>> I wouldn't care except that datetime never 'seems' to reach the server.
>>
>> How can I know if the data is actually being sent?
>>
>> Thank you!!
>>
>> Paul
>>
>> "Paul Murray" <pemurray@interrasys.com> wrote in message
>> news:4b06a89e@forums-1-dub...
>>> Greetings All,
>>>
>>> I have a webservice that I am consuming using PB 11.2. The webservice
>>> expects that the datetime (timestamp) field will be formatted with a T
>>> between the date and time.
>>>
>>> "the timestamp value representation with the T in between
>>> (2009-12-25T07:00:00) is defined by XML Schema:
>>> http://www.w3.org/TR/xmlschema-2/#dateTime"
>>>
>>> I have seen other posts suggesting that I simply send the formatted data
>>> as a string.
>>>
>>> Question: The data is formatted in the proxy and the structure as a
>>> datetime field. Can I simply change this to a string and expect it to
>>> work?
>>>
>>> Also, what is a good technique to view the XML that is generated to
>>> access the web service so that I know the xml is correctly formatted?
>>>
>>> Thank you!!
>>>
>>> Paul
>>>
>>>
>>>
>>>
>>
>>
>
>