Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Generating soap faults for xsd elements validation  RSS feed

Kiran G Kumar
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am developing a web service for which I would like add the soap fault for data validations.

I have following element in the web service input type.

<xsd:element name="receiptdate" type="xsd:date"/>

the client should pass the date in particular format. if in case the request sent any other date format server will throws an error which will be similar to "java.lang.numberformatexception invalid date".
I would like to add customer message to the same.

Could you please help me on implementing this?
I am following the top-down approach for implementing the webservice (i.e., implementing the webservice from wsdl file).

How exactly i need to add the soap fault in wsdl file?

do I need to write any custom code in generated java files? if so, where exactly?

Thanks in advance,

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!