client failed with wsc-ret-code = 2000

Hi guys,

we are using a client generate by imtkmake  using MICRO FOCUS SERVER EXPRESS 5.1 for pSeries running AIX installed on the customer machine that sometime failed with error code 0200.

After various tests we identified what could be a possible cause, i.e. the size of the buffer containing the request was shorter than the request itself. We therefore extended the initial size that had been generated by imtkmake bringing it from the value 100000 to the value 150000 but the result did not change and we always get the error 02000.

The counterparty receiving the request told us that data recevid it is truncated despite the size of the buffer that contains it.

I couldn't find information on error 02000, what is the cause that generates it or where can I check to determine the cause??
Is it possible to extend the size of the buffers provided for requtest/respons?

These are code use to made the call to the webservice :

           CALL "elaboraRichiesta"
             using elaboraRichiesta-parms
             returning wsc-ret-code

           entry "elaboraRichiesta"
               using elaboraRichiesta-parms.

             move request
               of elaboraRichiesta
               of input-parms
               of elaboraRichiesta-parms
               to request
               of elaboraRichiesta
               of wsc-parameters-part0002-01

             set wsc-proc-ptr to entry "nxwscrun"

             set wsc-ptr-arg (1)
               to address of wsc-parameters-part0002-01
             set wsc-ptr-arg (2)
               to address of wsc-parameters-part0004-01

             move 256 to wsc-srvc-faultcode-len
             move 256 to wsc-srvc-faultstring-len

             call "InvokeService02"
               using value 2 1 0 0
                     16 16 32
               returning wsc-ret-code

             if wsc-ret-code = 0

               move elaboraRichiestaReturn
                 of elaboraRichiestaResponse
                 of wsc-parameters-part0004-01
                 to elaboraRichiestaReturn
                 of elaboraRichiestaResponse
                 of output-parms
                 of elaboraRichiesta-parms


             exit program returning wsc-ret-code.

             entry "get-srvc-faultcode"
                  using srvc-faultcode-parm srvc-faultcode-len-parm.

                  move wsc-srvc-faultcode to srvc-faultcode-parm
                  move wsc-srvc-faultcode-len to srvc-faultcode-len-parm

             exit program.

and the data strucure is :

*******Operation: name="elaboraRichiesta"
       01 elaboraRichiesta-parms.
         03 input-parms.
           05 elaboraRichiesta.
             07 request                pic x(150000).                  -NOTE- original size was 100000

         03 output-parms.
           05 elaboraRichiestaResponse.
             07 elaboraRichiestaReturn pic x(150000).
       01 wsc-parameters-part0002-01.
         03 elaboraRichiesta.
           05 request                pic x(150000).

Any help will be appreciated

Thank in advance.


  • Hello Paolo,


    Can you let us know how you generated this client before - which options you used during client generation?


    Changing the field size within the client isn't sufficient, because the generated client program includes other passed data that is affected by the field sizes, and is not easily modified. Instead, you should use imtkmake to regenerate the client with the correct sizes specified. This might be done by ensuring the WSDL reflects the correct size. Or, if the WSDL only defines the field without specifying a length, you may want to try using the defaultstringsize option in the imtkmake command. For example, with something like:


    $ imtkmake -genclientwsdl clientwsdl=myservice.wsdl defaultstringsize=150000


    And of course, you'll need to ensure that the actual Web Service can accept the size you're hoping to send.

  • Hello Blair, thanks for the reply.

    initially I just changed the buffer size but the error persisted. I noticed that the structure 01 wsc-idt. generated by imtkamke contains the size of the request/response buffer  and I then generated the client again with:

    $ imtkmake -genclientwsdl clientwsdl=PassProdotti.txt defaultstringsize=400000

    but even in this case I have the same error.

    Regarding actual Web Service it should be set up to receive those lengths but to be safe I will ask you to verify it.

    if it could be useful I've attached the wsdl file PassProdotti.txt 

    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions targetNamespace=""
    	xmlns:impl="" xmlns:intf=""
    	xmlns:wsaw="" xmlns:wsdl=""
    	xmlns:wsdlsoap="" xmlns:wsi=""
    		<schema targetNamespace=""
    			xmlns="" xmlns:wsdl=""
    			<element name="elaboraRichiestaResponse">
    						<element name="elaboraRichiestaReturn" nillable="true"
    							type="xsd:string" />
    			<element name="hello">
    					<sequence />
    			<element name="helloResponse">
    						<element name="helloReturn" nillable="true" type="xsd:string" />
    			<element name="elaboraRichiesta">
    						<element name="request" nillable="true" type="xsd:string" />
    	<wsdl:message name="helloRequest">
    		<wsdl:part element="intf:hello" name="parameters" />
    	<wsdl:message name="elaboraRichiestaRequest">
    		<wsdl:part element="intf:elaboraRichiesta" name="parameters" />
    	<wsdl:message name="helloResponse">
    		<wsdl:part element="intf:helloResponse" name="parameters" />
    	<wsdl:message name="elaboraRichiestaResponse">
    		<wsdl:part element="intf:elaboraRichiestaResponse" name="parameters" />
    	<wsdl:portType name="WsBackEnd">
    		<wsdl:operation name="elaboraRichiesta">
    			<wsdl:input message="intf:elaboraRichiestaRequest" name="elaboraRichiestaRequest" />
    			<wsdl:output message="intf:elaboraRichiestaResponse"
    				name="elaboraRichiestaResponse" />
    		<wsdl:operation name="hello">
    			<wsdl:input message="intf:helloRequest" name="helloRequest" />
    			<wsdl:output message="intf:helloResponse" name="helloResponse" />
    	<wsdl:binding name="WsBackEndSoapBinding" type="intf:WsBackEnd">
    		<wsaw:UsingAddressing wsdl:required="false" />
    		<wsdlsoap:binding style="document"
    			transport="" />
    		<wsdl:operation name="elaboraRichiesta">
    			<wsdlsoap:operation soapAction="elaboraRichiesta" />
    			<wsdl:input name="elaboraRichiestaRequest">
    				<wsdlsoap:body use="literal" />
    			<wsdl:output name="elaboraRichiestaResponse">
    				<wsdlsoap:body use="literal" />
    		<wsdl:operation name="hello">
    			<wsdlsoap:operation soapAction="hello" />
    			<wsdl:input name="helloRequest">
    				<wsdlsoap:body use="literal" />
    			<wsdl:output name="helloResponse">
    				<wsdlsoap:body use="literal" />
    	<wsdl:service name="WsBackEndService">
    		<wsdl:port binding="intf:WsBackEndSoapBinding" name="WsBackEnd">
    				location="" />

    Any other suggestions will be greatly appreciated.

  • I checked and on the web service side we don't have the problem of receiving a request with lengths of 400,000 bytes.

    Could it be that on the client side there are environment parameters that can limit large sending/receiving on both request/response?

    The 02000 error is quite generic and does not have a real cause for which it occurs. In the "InvokeService02" call there is some parameter that can enable a trace of what is happening or alternatively there is some environment variable that can enable a sort of log or trace during the call?

    Any help or suggestions will be greatly appreciated.

    Thank you.


  • Hi Paolo,

    Can you let me know exactly what Version and Wrap Pack of Server Express is being used? Please share the output of running the following command, with your environment configured for COBOL (the V flag is upper case):

      $ cob -V

    Also, what version of AIX is this client running on? Perhaps share the output of:

      $ uname -a

    I'm not sure an environmental limit would have this effect, but you might check the user limits in effect on the machine running the client. Can you check the output of running the following, and try increasing limits that might be related:

      $ ulimit -a

    Finally, it looks like your WSDL also defines a second simple Web Service, which is simply a "Hello World". From this same AIX client machine, are you able to successfully that second service. And, does your real client work if you send a smaller request with a smaller param size,  or is this not possible to test?

  • Hi Blair,

    thank for replay.

    The follwing are the information you requested :

    cob -V
    version @(#)cob.c
    PTI=WrapPack 8

    uname -a
    AIX amlif700txs001 2 7 00FBECB14C00

    ulimit -a
    time(seconds)        unlimited
    file(blocks)         unlimited
    data(kbytes)         131072
    stack(kbytes)        32768
    memory(kbytes)       32768
    coredump(blocks)     2097151
    nofiles(descriptors) 2000
    threads(per process) unlimited
    processes(per user)  2048

    Keep in mind that I do not have any "root" privilege on that system and therefore I cannot do any change on system.

    The hello service it has never been used, the call to the web service it is inside a process that performs many operations and I am using it in the development system to carry out tests.

    During last test  carried out a short time ago I made sure to have the display in the Aix system console of the data that returns
                      call "get-srvc-faultstring"
                      using srvc-faultstring-parm srvc-faultstring-len-parm

    and got the following response


    and asking to web service people got the folling line:

    2023-12-04 15:17:37,215 INFO  [com.generaligroup.apiauto.controller.ElaboraRichiestaMiniQuietController] (default task-4) START - Richiesta webservice
    2023-12-04 15:17:37,215 INFO  [com.generaligroup.apiauto.controller.ElaboraRichiestaMiniQuietController] (default task-4) Request incoming: 
    2023-12-04 15:17:37,219 ERROR [com.generaligroup.apiauto.controller.ElaboraRichiestaMiniQuietController] (default task-4) : javax.xml.bind.UnmarshalException

    without any presence of the request.

    this happens to me after regenerating the client to have the length of 400000.

  • Hi Paolo,


    Thanks for your update. The information you've provided indicates that you are using Server Express 5.1 Wrap Pack 8 on AIX 7.2. Please note that Server Express 5.1 was not supported on AIX 7.2 until Wrap Pack 13. In light of this, I'd recommend that you upgrade your Server Express installation to the latest Wrap Pack, rebuild your client application with the latest Wrap Pack, and then try invoking the client again. The latest Wrap Pack available is 5.1 Wrap Pack 20. To be clear, we don't know that this will resolve the issue, but it will at least get you onto a supported version for your O/S.


    If that does not resolve it, I would recommend opening a Support Case. This would allow a Support Agent to continue the investigation, and possibly collect trace files not suited for a public forum. I'd suggest including the details from our Community discussion if you open a Case.

  • Hi Blair,

    Thanks for the update, I will report the information to the Aix system administrators.

    I hope an update will resolve the issue.

    I will keep you informed.


  • Hi again Paolo,

    I also wanted to let you know that we've tested and confirmed that there is no problem with sending a 400,000 byte message to a SOAP Service, or with receiving a response the same size.  This was on AIX 7.2, with a client generated and and compiled using the (supported) latest version 5.1 Wrap Pack 20.

    So if you find that upgrading to the latest Wrap Pack does not resolve the issue, it seems possible that the size of the area being passed might not be the problem - there might be some other problem with your Client program.

     Have you tried invoking the Web Service with a tool like SOAPUI, to confirm that it works properly with something other than your client?

  • Hi Blair,

    thank you for the last update. 

    I've reported the need to update our system and I hope that il will be done ( but I'm not the person who decides ) .

    Could be possible that the imtkmake actually we use is the reason o failure ? I mean the critical part generated is the wsc-idt structure and may for some reason is not well generated.

    Can you make a test using the attached wsc-idt data structure ( the idea is that you replace the same structure on your client used for test )?

           01 wsc-idt.
              03 filler pic x(2020) value x"4D6963726F20466F63757320436F626F
          -                                "6C20496E746572666163652044656669
          -                                "6E6974696F6E20426C6F636B20202020
          -                                "01050000547565204465632020352031
          -                                "383A35373A353820323032330A000000
          -                                "00800000024A0000047E000007E40000
          -                                "00000000000000000000000000000000
          -                                "000000000000000000000000000007E4
          -                                "0000047E000000AA0000000000000000
          -                                "00000000000000000000000000200000
          -                                "000000000000000000000000019A0000
          -                                "048B000000C2000C3500000000020000
          -                                "00000000012E00010100000000CE0000
          -                                "00000000000000000725000000000006
          -                                "1A8000020000000000EE000000010000
          -                                "0000000000CE0000073C000000000006
          -                                "1A80000200000000010E000000010000
          -                                "0000000000EE0000074D000000000006
          -                                "1A800013080000000000000000000000
          -                                "0000000201000000013A000000000000
          -                                "0000000007550000000000061A800002
          -                                "00000000015A00000001000000000000
          -                                "013A0000076C0000000000061A800002
          -                                "00000000017A00000001000000000000
          -                                "015A000007850000000000061A800013
          -                                "08000000000000000000000000000000
          -                                "049C000001B200061A81000000020000
          -                                "0000000001DE00010100000001BE0000
          -                                "0000000000000000079C000000000000
          -                                "00010002000000000000000000000000
          -                                "000000020100000001EA000000000000
          -                                "0000000007B30000000000061A800002
          -                                "00000000020A00000001000000000000
          -                                "01EA000007CA0000000000061A800002
          -                                "00000000022A00000001000000000000
          -                                "020A000007D80000000000061A800013
          -                                "08000000000000000000000002520000
          -                                "00000000038A000004A2000000AA0000
          -                                "00000000000000000000000002920000
          -                                "000000249F0000010001000004020024
          -                                "9F000000000000000000000000000000
          -                                "00000000030E00000000000002A20000
          -                                "04B30000000000000000000000000000
          -                                "04D400020F00000002CA000000010000
          -                                "050600000000000004E5000000000000
          -                                "02A2000002F200000520008000000000
          -                                "00000000000000000000000000000000
          -                                "0000000000000000010E000005280000
          -                                "00000000000000010000010000000000
          -                                "0000010000000000031E000005580000
          -                                "00000000000000000000000005790002
          -                                "0F000000034600000001000005B30000
          -                                "000000000592000000000000031E0000
          -                                "036E000005D500800000000000000000
          -                                "00000000000000000000000000000000
          -                                "00000000017A000005EC000000000000
          -                                "00000002000001000000000000000000
          -                                "06330000019A00000000000000000000
          -                                "0000000003CA0000000000249F000001
          -                                "00010000040200000000000000000000
          -                                "00000000000000000000000004020000
          -                                "0000000003DA00000639000000000000
          -                                "0000000000000000065A00020F000000
          -                                "00000000000000000000000000000000
          -                                "06600000000001000000000004120000
          -                                "06810000000000000000000000000000
          -                                "06A200020F000000043A000000010000
          -                                "06D100000000000006B0000000000000
          -                                "041200000462000006E8008000000000
          -                                "00000000000000000000000000000000
          -                                "0000000000000000022A000006F40000
          -                                "00000000000000020000010000005061
          -                                "737350726F646F74746900656C61626F
          -                                "72615269636869657374610068656C6C
          -                                "6F00656C61626F726152696368696573
          -                                "746100687474703A2F2F736572766963
          -                                "65732E6175746F2E67656E6572616C69
          -                                "2E697400656C61626F72615269636869
          -                                "6573746100687474703A2F2F73657276
          -                                "696365732E6175746F2E67656E657261
          -                                "6C692E697400656C61626F7261526963
          -                                "6869657374612D747970653030303300
          -                                "7265717565737400706172616D657465
          -                                "72732D70617274303030322D30312E65
          -                                "6C61626F72615269636869657374612E
          -                                "7265717565737400687474703A2F2F73
          -                                "657276696365732E6175746F2E67656E
          -                                "6572616C692E697400656C61626F7261
          -                                "526963686965737461526573706F6E73
          -                                "6500687474703A2F2F73657276696365
          -                                "732E6175746F2E67656E6572616C692E
          -                                "697400656C61626F7261526963686965
          -                                "737461526573706F6E73652D74797065
          -                                "3030303800656C61626F726152696368
          -                                "696573746152657475726E0070617261
          -                                "6D65746572732D70617274303030342D
          -                                "30312E656C61626F7261526963686965
          -                                "737461526573706F6E73652E656C6162
          -                                "6F726152696368696573746152657475
          -                                "726E0068656C6C6F00687474703A2F2F
          -                                "73657276696365732E6175746F2E6765
          -                                "6E6572616C692E69740068656C6C6F00
          -                                "687474703A2F2F73657276696365732E
          -                                "6175746F2E67656E6572616C692E6974
          -                                "00687474703A2F2F7365727669636573
          -                                "2E6175746F2E67656E6572616C692E69
          -                                "740068656C6C6F526573706F6E736500
          -                                "687474703A2F2F73657276696365732E
          -                                "6175746F2E67656E6572616C692E6974
          -                                "0068656C6C6F526573706F6E73652D74
          -                                "797065303031370068656C6C6F526574
          -                                "75726E00706172616D65746572732D70
          -                                "617274303030332D30312E68656C6C6F
          -                                "526573706F6E73652E68656C6C6F5265
          -                                "7475726E00706172616D65746572732D
          -                                "70617274303030322D303100656C6162
          -                                "6F726152696368696573746100726571
          -                                "7565737400706172616D65746572732D
          -                                "70617274303030342D303100656C6162
          -                                "6F726152696368696573746152657370
          -                                "6F6E736500656C61626F726152696368
          -                                "696573746152657475726E0070617261
          -                                "6D65746572732D70617274303030312D
          -                                "303100706172616D65746572732D7061
          -                                "7274303030332D30310068656C6C6F52
          -                                "6573706F6E73650068656C6C6F526574
          -                                "75726E00".

    I've also attached the client generated by imtkmake currently in used on my aix system.

    Thanks in advance.


  • Hi Paolo,

    We will take a look but without being able to actually test with your web service this will be difficult to determine.

    Have you been able to successfully call this web service using a non-COBOL client such as the SoapUI tool?
    This would tell us whether or not the problem is with the web service in general or with the client program generated by IMTK.

    Chris Glazier
    Rocket Software - Principal Technical Support Specialist
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button