Gen EJB Web Service attribute length/permitted value checks
search cancel

Gen EJB Web Service attribute length/permitted value checks

book

Article ID: 267793

calendar_today

Updated On:

Products

Gen Gen - Host Encyclopedia Gen - Run Time Distributed Gen - Workstation Toolset

Issue/Introduction

Using WebSphere Application Server.
In a Gen EJB Web service request, for an import text value that uses a length greater than the specified attribute length the value is changed to spaces. This is causing the Gen application to lose its value and give an undesirable result.
Is there any way to avoid the fields becoming spaces and instead perhaps truncate the Value to the attribute's specified length or return an error message?
 
The same thing is also occurring if an import attribute has permitted values. If the import value is not set to a permitted value, the value is changed to spaces rather than erroring out to the web service consumers with a permitted value violation error.

Environment

Release : 8.6

Cause

Gen Engineering explained that the generated code already contains checks for exceeding attribute length and permitted value violations checks but in each case, the resulting exception is failing to be handled properly under WebSphere and also under WebLogic.
Under JBoss each exception is handled successfully and error messages are returned for attribute length and permitted value violations e.g.
Unmarshalling Error: Property ... cannot be more than ... characters
Unmarshalling Error: Permitted value violation for property ... value: '...'

Resolution

Engineering later advised that the current code design to handle attribute length and permitted value violations cannot easily be made to work for WebSphere (and WebLogic) in its current form. So Engineering is going to have to enhance it to be compatible with all Gen supported Application Servers and their SOAP Web Service stacks. This fix will be published in a future PTF.