[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: WSDL2RPG Dynamic Array Patches question



Thanks again for your assistance, Thomas.  I found that the 128 length was coming from a base stub in another library that had been defined at STRLEN 128.  I had specifically (and erroneously) pointed to that in a /COPY.  I fixed that and got a successful execution.
All better now.
-- Michael

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Raddatz
Sent: Monday, July 09, 2012 4:42 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: WSDL2RPG Dynamic Array Patches question

Michael,

In fact the debug log is very helpful (as most of the time). Looking at the debug log I can see that the value of element "deprovisionPortReturn" is exactly 131 bytes long:

"[{TARGET_DEVICE=RG_1340989383239, RESULT_TEXT=Operation Submitted}, {TARGET_DEVICE=192.168.10.42, RESULT_TEXT=Operation Submitted}]"

That matches the value mentioned in the error message:

"Field is too short to hold the specified value. (128 versus 131 bytes)"

 From the call stack dump I can see that the message was send from statement 876.00 of program PROVISION. If you open the WS_SRV (see module
header) module, which should be part of program PROVISION, and if you go to statement 876.00 you should see that procedure
WSDL2R98_UnMarshaller_toStringV6() has been called in order to load the XML value into variable "deprovisionPortReturn".

Hope that helps.

Thomas.

Am 09.07.2012 22:18, schrieb Koester, Michael:
> If it helps, I now have the http_api log:
>
> ~~~~~~~~~~~~~~
> HTTPAPI Ver 1.24 released 2012-01-23
> OS/400 Ver V7R1M0
>
> New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. 
> ProtLoc=0
>
> WSDL2RPG Ver 1.15beta7 released 2012-01-25
>
> ** 2012-07-09-15.24.36.131000: Entering Provision_deprovisionPort() 
> New iconv() objects set, PostRem=1208. PostLoc=0. ProtRem=819. 
> ProtLoc=0
> ** 2012-07-09-15.24.36.724000: Sending request to server
> http_persist_open(): entered
> http_long_ParseURL(): entered
> DNS resolver retrans: 2
> DNS resolver retry  : 2
> DNS resolver options: x'00000136'
> DNS default domain: GSTNETWORKS.NET
> DNS server found: 12.6.236.126
> DNS server found: 12.160.200.5
> http_persist_post(): entered
> http_persist_req(POST) entered.
> http_long_ParseURL(): entered
> http_setauth(): entered
> do_oper(POST): entered
> There are 0 cookies in the cache
> POST /axis/services/Provision HTTP/1.1
> Host: 192.168.41.252:9090
> User-Agent: http-api/1.24
> Content-Length: 1068
> Authorization: Basic cm9vdDpwdWJsaWM=
> Content-Type: text/xml
> SOAPAction:
>
>
> sendraw(): entered
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="urn:Provision" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soapenv:Body><impl:deprovisionPort soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";><in0 xsi:type="apachesoap:Map"><item xsi:type="apachesoap:mapItem"><key>CUSTOMER_ID</key><value>mk testing 2</value></item><item xsi:type="apachesoap:mapItem"><key>DEPROVISION_DATA</key><value>TRUE</value></item><item xsi:type="apachesoap:mapItem"><key>DEPROVISION_RG</key><value>TRUE</value></item><item xsi:type="apachesoap:mapItem"><key>DEVICE</key><value>192.168.10.42</value></item><item xsi:type="apachesoap:mapItem"><key>RG_SET_FACTORY</key><value>TRUE</value></item><item xsi:type="apachesoap:mapItem"><key>SLOT_PORT</key><value>!
 0.!
>   0</value></item></in0></impl:deprovisionPort>
> </soapenv:Body></soapenv:Envelope>
> recvresp(): entered
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Set-Cookie: JSESSIONID=A705A8653D171E7C2150015A9D3B2BF2; Path=/axis
> Content-Type: text/xml;charset=utf-8
> Transfer-Encoding: chunked
> Date: Mon, 09 Jul 2012 19:25:14 GMT
>
>
> SetError() #13: HTTP/1.1 200 OK
> recvresp(): end with 200
> recvdoc parms: chunked 0
> header_load_cookies() entered
> cookie_parse() entered
> cookie =  JSESSIONID=A705A8653D171E7C2150015A9D3B2BF2; Path=/axis 
> cookie attr JSESSIONID=A705A8653D171E7C2150015A9D3B2BF2
> cookie attr Path=/axis
> recvchunk(): entered
> get_chunk_size(): entered
> 2a2
>
> chunk size = 674
> get_chunk_size returned 674
> calling comm_blockread
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soapenv:Body><n
> s1:deprovisionPortResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
> xmlns:ns1="urn:Provision"><deprovisionPortReturn 
> xsi:type="soapenc:string" 
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>[{TARGET_DEV
> ICE=RG_1340989383239, RESULT_TEXT=Operation Submitted}, 
> {TARGET_DEVICE=192.168.10.42, RESULT_TEXT=Operation 
> Submitted}]</deprovisionPortReturn></ns1:deprovisionPortResponse></soa
> penv:Body></soapenv:Envelope>
> comm_blockread returned 674
> ** 2012-07-09-15.24.37.083000: Entering HTTP_receiveResponse()
>
> WSDL2RPG: call stack frames:
> Program      Library      Act.Group    Statement    Procedure
> QUICMD       QSYS         *DFTACTGRP        /056F
> QCMD         QSYS         *DFTACTGRP        /01C8
> WS_DEPRVPT   MKOESTER     *NEW                      _QRNP_PEP_WS_DEPRVPT
> WS_DEPRVPT   MKOESTER     *NEW         122          WS_DEPRVPT
> PROVISION    MKOESTER     *NEW         62500        Provision_deprovisionPort
> HTTPAPIR4    LIBHTTP      *NEW         5907         HTTP_URL_POST_RAW2
> HTTPAPIR4    LIBHTTP      *NEW         6423         HTTP_PERSIST_POST
> HTTPAPIR4    LIBHTTP      *NEW         6620         HTTP_PERSIST_REQ
> HTTPAPIR4    LIBHTTP      *NEW         4111         DO_OPER
> HTTPAPIR4    LIBHTTP      *NEW         4437         RECVCHUNK
> PROVISION    MKOESTER     *NEW         103300       HTTP_receiveResponse
> WSDL2RPGRT   WSDL2RPG     *NEW         100100       WSDL2R97_XMLSAXParser_parse
> EXPAT        LIBHTTP      *NEW         28           XML_Parse
> EXPAT        LIBHTTP      *NEW         14           XML_ParseBuffer
> EXPAT        LIBHTTP      *NEW         5            prologInitProcessor
> EXPAT        LIBHTTP      *NEW         3            prologProcessor
> EXPAT        LIBHTTP      *NEW         130          doProlog
> EXPAT        LIBHTTP      *NEW         1            contentProcessor
> EXPAT        LIBHTTP      *NEW         199          doContent
> WSDL2RPGRT   WSDL2RPG     *NEW         235900       endElement
> PROVISION    MKOESTER     *NEW         87600        impl_deprovisionPortRpcEnd
> WSDL2RPGRT   WSDL2RPG     *NEW         91400        WSDL2R98_UnMarshaller_toStringV6
> WSDL2RPGRT   WSDL2RPG     *NEW         35200        WSDL2R90_AppMsg_sendEscMsgAndDump
> WSDL2RPGRT   WSDL2RPG     *NEW         33000        WSDL2R71_http_DebugLog_dumpCallStack
> WSDL2RPGRT   WSDL2RPG     *NEW         20200        WSDL2R80_CallStack_dump
>
>
> WSDL2RPG: USR5020: Field overflow. Field is too short to hold the specified value. (128 versus 131 bytes)
>            received from procedure: BASICS1R1_f_sndPgmMsg
>                      and statement: 54400 WSDL2RPG (eXpat error): 
> (-1009) Field overflow. Field is too short to hold the specified 
> value. (128 versus 131 bytes)
>
>      received at line: 1
>             at column: 586
>        from procedure: WSDL2R97_XMLSAXParser_parse
>         and statement: 101800
> ** 2012-07-09-15.24.37.288000: Failed parsing XML message
> ** 2012-07-09-15.24.37.288000: Leaving HTTP_receiveResponse()
> SetError() #16: recvchunk: saveproc: Not all data was written!
> http_close(): entered
>
> ~~~~~~~~~~~~~~~~~~
> Thanks for your help, Thomas!
> --Michael
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas 
> Raddatz
> Sent: Monday, July 09, 2012 2:55 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: WSDL2RPG Dynamic Array Patches question
>
> Michael,
>
> The dynamic array patch definitely does not fix your issue because you use WSDL2RPG v1.15 whereas the patch is for 1.14.
>
> For me the error message clearly states that a field of the response data structure is too short to hold a value of 131 bytes. Without a debugger it is hard work to figure out the field that is too short. Actually you need to start the debugger for service program WSDL2RPGRT and add a breakpoint to procedure isTooShortV6() of module WSDL2R98 at statement:
>
>      clear USR5020;
>
> When the debugger stops it is easy to look at the call stack to figure out the failing field.
>
> But without the debugger the only option you have is to check the field sizes of your response data structure. Maybe the "Parameter Structure Visualizer" might help you with this task. For the following sample:
>
> WSDL2RPG
>
> URL('http://tools400.dyndns.org:88/axis2/services/DownloadAttachmentSe
> rvice?wsdl')
>
>     SRCFILE(QWSDL2RPG) SRCMBR(*NONE)
>     PARMSTRUCT(*STMF) STRUCTSTMF('DownloadAttachmentService.txt')
>
>
> You get the following output:
>
>
> WSDL2RPG Service Request and Response Parameter Structures 
> ==========================================================
>
> Generated at:  09.07.2012 / 20:46:51
> WSDL URL    :
> http://tools400.dyndns.org:88/axis2/services/DownloadAttachmentService?wsdl
> Operation   :  tns:getAttachment
>
> Service Request Parameters
> --------------------------
> i_tns_getAttachmentRequest(tns_getAttachmentRequest_t)
>     fileType(128A  varying)
>
> Service Response Parameters
> ---------------------------
> o_tns_getAttachmentResponse(tns_getAttachmentResponse_t)
>     fileName(128A  varying)
>     fileID(128A  varying)
>
> You can easily search for "128A" to get a list of fields in question. If the list is short it is easy to match the HTTPAPI debugger output with the list of fields. But if the list is loon, it is a pain.
>
> Last but not least I have noticed that you set STRLEN to 256. Hence 
> actually there should not be any fields of 128A. But you never know. 
> ;-)
>
> Good luck,
>
> Thomas.
>
> Am 09.07.2012 19:16, schrieb Koester, Michael:
>> My error seems similar to what I found in the ftpapi archives  -- [Subject: Re: Help needed on WSDL2RPG Date: Fri, 20 Apr 2012 18:29:01 +0200].  Last April Thomas replied to Babacar Diouf's question that the Dynamic Array Patches should solve his problems.
>>
>> When testing the web service method stub, the runtime error shows:
>> 16: recvchunk: saveproc: Not all data was written!
>> -1009: Field overflow. Field is too short to hold the specified value (128 versus 131 bytes).
>>
>> I cannot tell exactly what is throwing the error, because our SEP debugger is currently out of service (subsystem configuration issues our SysAdmin is trying to resolve).
>>
>> I can tell you that the Base Stub was created without Dynamic Arrays (I specified DIM 256 and STRLEN 256), and that I'm using WSDL2RPG 1.15beta7 / 25.01.2012 on an i/OS v7.1.
>>
>> My question:  Is the "Dynamic Arrays Patches" fix likely to be appropriate for my issue?
>>
>> I'll be happy to provide additional info as needed.
>>
>> Thanks!
>>
>> Michael Koester
>> DataEast
>> Weare, NH  USA
> ----------------------------------------------------------------------
> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -
>

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------