• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GregorianCalendar object passed as null in request - JAX-WS on Websphere.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created the WSDL first in RSA and then created the java bean skelaton from the WSDL. There are a couple of dateTime fields in the WSDL that are created as GregorianCalendar objects.

When I test with SOAPui and the date fields are passed correctly, everything works great. But when there is an invalid date format or anything else in the SOAP request, instead of returning a Conversion exception or some other validation exception, the field is passed as a null to the request object in the SOAP IMPL. Should't this return an exception?

Sample requests inputs:
<endTimeStamp>2014-01-28T01:30:14.474Z</endTimeStamp> - Date
<endTimeStamp>06-FEB-14 01.51.00.000000000 AM</endTimeStamp> - Null
<endTimeStamp>Any other string be it a date or not.</endTimeStamp> - Null


Request Object - endTimeStamp definition and getter:

@XmlElement(required = true)
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar endTimeStamp;

/**
* Gets the value of the endTimeStamp property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getEndTimeStamp() {
return endTimeStamp;
}
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Any news about your problem ? Did you find a solution for websphere to reject an invalid date ?
Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic