Hi, I am creating a Web Dynpro Java application (on top of Netweaver AS 7.0) using an adaptive webservice model to invoke a webservice.
The webservice has some request attributes of type string with limited length (for example limited to 1 character). I bound the model to component controller context and created a mapping between the component controller context and view context. In the view, I created a form which is bound to the context attributes.
When user enters string values, which are longer than the maximum length specified in webservice WSDL, and submits the form, an exception is thrown when Web Dynpro runtime is trying to assign entered values into context attributes:
com.sap.dictionary.runtime.DdCheckException: Length of character string "abcdef" must be smaller than or same as MaxLength 1; at com.sap.dictionary.runtime.DdTypeString.checkValid(DdTypeString.java:195) at com.sap.tc.webdynpro.model.webservice.base.model.BaseGenericModelClass.setAttributeValue(BaseGenericModelClass.java:304) at com.sap.tc.webdynpro.model.webservice.gci.WSTypedModelClass.setAttributeValue(WSTypedModelClass.java:62) at at.gov.bmf.demo.comp.employee.model.OrganizationalAssignment.setEmployeeGroup(OrganizationalAssignment.java:52) at at.gov.bmf.demo.comp.employee.wdp.IPublicEmployeeDemo$IOrganizationalAssignmentElement.wdSetObject(IPublicEmployeeDemo.java:1552) ... 32 more
This exception is thrown before my non-validating action is executed, so I am not able to prevent it or handle it.
Is there any way how to catch this exception or prevent it?
Does anyone know where these model restrictions are stored? I searched the XML files generated for the model, but I haven't found anything. Does the Web Dynpro runtime access WSDL everytime it needs to validate request parameters?