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
reference
wsc-idt
wsc-ptr-args
wsc-srvc-address
n"elaboraRichiesta"
n"elaboraRichiesta"
n"">services.auto.generali.it"
wsc-srvc-username
wsc-srvc-password
value
wsc-srvc-address-len
16 16 32
wsc-srvc-username-len
wsc-srvc-password-len
reference
wsc-special-registers
wsc-spec-reg-lens
wsc-srvc-faultcode
wsc-srvc-faultcode-len
wsc-srvc-faultstring
wsc-srvc-faultstring-len
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
end-if
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.
Paolo
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 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
community.microfocus.com/.../PassProdotti.txt
Any other suggestions will be greatly appreciated.
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
community.microfocus.com/.../PassProdotti.txt
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.
Paolo
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.
Paolo
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 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 5.1.4.0
PRN=RXCAO/AAK:9r.B1.51.09
PTI=WrapPack 8
PTI=ES
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
<MQMCA010><TIPO_ERRORE>2</TIPO_ERRORE><OCCURS_ERRORI><ERRORE><CODICE_RITORNO>PP00101</CODICE_RITORNO><DESC_DETTAGLIO>Premature end of file.</DESC_DETTAGLIO><TIPO_ERRORE_DETTAGLIO>9</TIPO_ERRORE_DETTAGLIO></ERRORE></OCCURS_ERRORI></MQMCA010>];<?xml version="1.0" encoding="UTF-8" standalone="yes"?><MQMCA010><TIPO_ERRORE>2</TIPO_ERRORE><OCCURS_ERRORI><ERRORE><CODICE_RITORNO>PP00101</CODICE_RITORNO><DESC_DETTAGLIO>Premature end of file.</DESC_DETTAGLIO><TIPO_ERRORE_DETTAGLIO>9</TIPO_ERRORE_DETTAGLIO></ERRORE></OCCURS_ERRORI></MQMCA010>
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 Blair,
thank for replay.
The follwing are the information you requested :
cob -V
version @(#)cob.c 5.1.4.0
PRN=RXCAO/AAK:9r.B1.51.09
PTI=WrapPack 8
PTI=ES
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
<MQMCA010><TIPO_ERRORE>2</TIPO_ERRORE><OCCURS_ERRORI><ERRORE><CODICE_RITORNO>PP00101</CODICE_RITORNO><DESC_DETTAGLIO>Premature end of file.</DESC_DETTAGLIO><TIPO_ERRORE_DETTAGLIO>9</TIPO_ERRORE_DETTAGLIO></ERRORE></OCCURS_ERRORI></MQMCA010>];<?xml version="1.0" encoding="UTF-8" standalone="yes"?><MQMCA010><TIPO_ERRORE>2</TIPO_ERRORE><OCCURS_ERRORI><ERRORE><CODICE_RITORNO>PP00101</CODICE_RITORNO><DESC_DETTAGLIO>Premature end of file.</DESC_DETTAGLIO><TIPO_ERRORE_DETTAGLIO>9</TIPO_ERRORE_DETTAGLIO></ERRORE></OCCURS_ERRORI></MQMCA010>
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 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.
Paolo
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.
Paolo
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 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 )?
community.microfocus.com/.../wsc_2D00_idt.txt
I've also attached the client generated by imtkmake currently in used on my aix system.
community.microfocus.com/.../PassProdotti_5F00_clienty.zip
Thanks in advance.
Paolo
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 )?
community.microfocus.com/.../wsc_2D00_idt.txt
I've also attached the client generated by imtkmake currently in used on my aix system.
community.microfocus.com/.../PassProdotti_5F00_clienty.zip
Thanks in advance.
Paolo
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.
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.
Hi Chris,
thanks for the reply and sorry for delayed answer.
We tested the functionality of the webservice using Postaman and we do not have any problems when sending more the 100000 byte, all the bytes sent are correctly received and processed generating a response.
I've another strange situation on the production system not related to request/response length ( in this case I've about 50000 bytes). and never seen before.
When the InvokeService02 call returns I received wsc-ret-code 00010, looking at the error handling of the client generated by imktmake I have associated this error description :'MISCELLANEOUS BAD DATA PROBLEM'.
We received the response from the web service and checking checking the data I don't notice anything strange, but received a wsc-ret-code <> 0 we do not processe the respose.
So what does really mean the err code 0010 ?
Could be considered as warning and the program could continue to process the response?
Let me known.
Thanks in advance.
Paolo
Hi Chris,
thanks for the reply and sorry for delayed answer.
We tested the functionality of the webservice using Postaman and we do not have any problems when sending more the 100000 byte, all the bytes sent are correctly received and processed generating a response.
I've another strange situation on the production system not related to request/response length ( in this case I've about 50000 bytes). and never seen before.
When the InvokeService02 call returns I received wsc-ret-code 00010, looking at the error handling of the client generated by imktmake I have associated this error description :'MISCELLANEOUS BAD DATA PROBLEM'.
We received the response from the web service and checking checking the data I don't notice anything strange, but received a wsc-ret-code <> 0 we do not processe the respose.
So what does really mean the err code 0010 ?
Could be considered as warning and the program could continue to process the response?
Let me known.
Thanks in advance.
Paolo
When we’ve encountered the 0010 error in the past, it usually has to do with some invalid character or such in the HTTP response,
The error 2000 means that the SOAP response was a SOAP Fault, which is the formal way that the web service indicates that something went wrong and usually includes further details in the response. We can see from the WSDL that this web service doesn’t return any such Fault details.
When you call this web service with a COBOL client generated with a smaller request/response does it work?
Is it the size of the request/response fields that make it fail or is it actually the request itself that is causing it?
i.e. If you define the fields as PIC X(400000) but you send a request that is smaller than that does it work?