CA Gen Call External Default matching option for numeric attribute gives "Not a number" in SoapUI test
search cancel

CA Gen Call External Default matching option for numeric attribute gives "Not a number" in SoapUI test

book

Article ID: 205118

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

This behaviour was initially found for a scenario where CA Gen "provider" model has Gen server EJB Web Service whose wsdl is being consumed by a "consumer" model server using a common action block CONSUME_TEST1_WEBS with a Call External statement. However, it should be noted that the root cause of the problem was later found to be a more general problem with the Default matching of an "xs:int" attribute from the parsed wsdl.
In the Call External statement, an import numeric attribute EXITSTATE is matched to the import numeric exitState from the provider model EJB Web Service wsdl.
When testing the consumer model EJB Web Service with SoapUI and using an import EXITSTATE value of 110 an error "Not a number" occurs:

Request message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tes="http://tempuri.org/Test1RetrieveSvrConsume/">
   <soapenv:Header/>
   <soapenv:Body>
      <tes:Test1RetrieveSvrConsumecall>
         <!--Optional:-->
         <Test1RetrieveSvrConsumeImport command="DISPLAY" clientId="USER1" >
            <!--Optional:-->
            <ImportPersonEntry>
               <Id>123456789012</Id>
            </ImportPersonEntry>
            <!--Optional:-->
            <ImportSystemImports>
               <Exitstate>110</Exitstate>
            </ImportSystemImports>
         </Test1RetrieveSvrConsumeImport>
      </tes:Test1RetrieveSvrConsumecall>
   </soapenv:Body>
</soapenv:Envelope>

Response message:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>ERROR CONSUME_TEST1_WEBS@0000000001,0022020104,0 322 [  XC/0] Not a number: 110.0 (faultCode: soap:Server)</faultstring>
         <detail>
            <ns1:Exception xmlns:ns1="http://tempuri.org/Test1RetrieveSvrConsume/">
               <message xmlns:ns2="http://tempuri.org/Test1RetrieveSvrConsume/">ERROR CONSUME_TEST1_WEBS@0000000001,0022020104,0 322 [  XC/0] Not a number: 110.0 (faultCode: soap:Server)</message>
            </ns1:Exception>
         </detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

Environment

Release : 8.6

Component : CA Gen Workstation Toolset

Resolution

When Call External is used for the view match in the consumer model when using the Default option the numeric attribute EXITSTATE that is created for the provider model exitState is a number of length 10. It is noted that the exitState in the provider wsdl is defined as an integer ("xs:int") and after reducing the EXITSTATE attribute to be length 9 the problem does not occur.

When the matched EXITSTATE attribute has length 10 it is a "double" in the Gen Java generated code and the attempt to convert that to the "int" type used for the exitState results in the error. Reducing the EXITSTATE attribute to length 9 means that it also becomes an "int" in the generated code and thus resolves the problem.
The fact that the Default view matching for Call External creates an attribute of length 10 for an "xs:int" attribute in the wsdl is not correct and it should be created with length 9. An internal defect has been created by Gen Engineering for that to be fixed and in the meantime, the workaround of reducing the attribute length can be used.