Solved

datetime format wrong when calling a wcf service

Posted on 2013-11-05
8
888 Views
Last Modified: 2016-02-26
Hi,

I've got a bit of a problem. Since yesterday we are unable to consume a WCF service from our production environment.

We have an Oracle database, which consumes a c# asmx webservice we built ourselves. That webservice itself consumes a .NET wcf service.

One of the input fields to the WCF service is an XS:datetime field. That field now gives us errors.

When we invoke our own webservice from our test oracle environment, everything works fine, but when we invoke the same webservice from our production environment (which worked fine also before yesterday) we get an error from the WCF service stating that the format of the ScheduledDate parameter is wrong "5-Nov-2013 12:39".

I've used wireshark to determine what the call is to our own webservice and both are identical (from test and production). Unfortunately since the WCF is ssl encrypted with a certificate, I cannot read the request to that service.

In the service reference, the field is listed as a DateTime and in the xsd, it's a xs:datetime.

I'm kinda lost right now, does anyone have a clue where I might find the answer.
In a nutshell the soap request from the database appears to be the same, our own webservice is the same in both cases (no distinction between test and production), yet the resulting call to the WCF service seems to be different.

Anyone that could shed some ligth on this will be greatly appreciated.
0
Comment
Question by:vabict
8 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39625648
If you think it is a database issue, check the spfile/init parameter nls_date_format between the test and production database.

Connect as SYSTEM or other privileged account and:
show parameter nls_date_format
or
select value from v$parameter where name='nls_date_format';
0
 

Author Comment

by:vabict
ID: 39625678
both turn up empty. I guess they are set from the session when someone logs on to the db. I've asked our dba about that.

But in any case, it would seem weird, as I've checked the xml coming from the production db and the test db and both are identical soap requests. But from that point on, something seems to change and the call to the wcf service is different.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39625897
Then it's likely not a database issue.

Something did change recently:  United States adjusted the time in most places for daylight savings.  Could that be it?
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 39626554
is it a windows server ?
did it get patched yesterday ?

it's possible with patching that the country setting revert to default american_america
rebooting it again can solve it

or setting the country and date formatting in the control panel/ country settings
0
 

Accepted Solution

by:
vabict earned 0 total points
ID: 39628608
apparently we got a wrong error message from the wcf service (which is an external service). The format was right all along, but since the time in our database was off by a couple of minutes, it rejected it because apparently that datetime cannot be in the past.

sorry to have troubled you with this.
Only took us 4 days to figure this out :-)
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39628620
Feel free to accept your post as the solution in case anyone else ever has this issue.
0
 
LVL 12

Expert Comment

by:deanvanrooyen
ID: 39632174
better business exceptions?
0
 

Author Closing Comment

by:vabict
ID: 39638314
it was a non issue all along, sorry for that. We got a wrong error message back from an external service (and their helpdesk)
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
join a table with user_tab_columns in oracle 3 55
Oracle 12c Default Isolation Level 17 42
Change to file doesn't show up 16 57
TFS 2015 Access denied. 1 16
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to recover a database from a user managed backup

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question