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

Re: [Ftpapi] Can I get a 2nd set of eyes to look at this please

Hi Jeff,

1. The debugger only shows you 1024 characters by default.  If you want more you have to tell it to show you more -- this has nothing to do with what is actually in the variable, it is just the way the debugger works.   For example in the green screen (strdbg) debugger, you can type "eval MYVAR:c 2000" to see 2000 characters.  Or change the 2000 to whatever length you want to view.

 2. You are telling it the path is UnitDetailsListResMessage, but this appears to be inside <s:Envelope><s:Body>. The point of the path= option is to tell it which elements to look inside to find the part of the document that your program needs, so you'll need to specify these as well as UnitDetailsListResMessage.   I would recommend using the ns=remove option to strip the 's:' from the tags (its possible that a different namespace could be used aside from 's', so hard-coding the 's' in the path is not a good idea, imho, you should strip it instead.)

For example:

    options = 'case=convert +
            +  ns=remove +
            +  path=UnitDetailsListResMessage';

I would recommend always using 'case=convert' instead of 'case=any', its much more versatile.

It's not clear why you had 'allowextra' and 'allowmissing' specified.   But, if you do need these for some reason you could add them as well.  (I strongly recommend only adding them if you truly need them, though, they can make problems really hard to understand.)

That's as far as I could see with a quick glance at the code, but maybe it's enough to get you going?  Unfortunately, I don't have time to write a whole program and test it to get all of the bugs out.


On 12/31/2019 10:21 AM, Jeff Bianchi wrote:



Here’s the method’s output parm from the WSDL I’m working with:


<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">


      <UnitDetailsListResMessage xmlns="http://tmwsystems.com/AMS">

         <Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance">










                  <ActivCode i:nil="true"/>


                  <Activity>LINE HAUL</Activity>





                  <CompanyName i:nil="true"/>















                  <Descrip>LINE TRACTOR</Descrip>

                  <Description>LINE TRACTOR</Description>








                  <FluidType i:nil="true"/>


                  <FluidTypeUOM i:nil="true"/>


















































                  <Type i:nil="true"/>















                  <ValidateUnitMtr i:nil="true"/>


                  <VendorName>PINNACLE FLEET SOLUTIONS</VendorName>















Here’s the way I have the data structures set up in my RPGLE:


  // Unit result variables                    

  dcl-ds Result         qualified inz;        

    Error               likeDS(Error_T);      

    ItemCount           int(10);              

    UnitList            likeDS(UnitList_T);   



  dcl-ds Error_T        Template;             

    Code                int(10);              

    InnerErrorMessage   varchar(500);         

    Message             varchar(500);          

    Severity            varchar(500);         



  dcl-ds UnitList_T     Template qualified;   

    UnitDetails         likeDS(UnitDetails_T);



  dcl-ds UnitDetails_T  Template;      

    ActivCode           varchar(100);  

    ActiveCode          char(1);       

    Activity            varchar(100);  

    AssetNum            varchar(100);  

    Capacity            varchar(100);  

    Color               varchar(100);  

    CompanyId           varchar(100);  

    CompanyName         varchar(100);  

    CompanyUnit         varchar(100);  

    CostCTCode          int(10);        

    CostCenter          int(10);       

    CreatedBy           varchar(100);  

    CreatedDate         timestamp;     

    CustId              int(10);       

    CustomerName        varchar(100); 

    CustomerPhone       varchar(100); 

    CustomerStopService varchar(100); 

    DedUnitNumber       varchar(100); 

    DepPeriod           int(10);      

    Department          varchar(100); 

    DeprBase            timestamp;    

    DeptCode            varchar(100); 

    Descrip             varchar(100); 

    Description         varchar(100); 

    Division            varchar(100); 

    DivisionCD          varchar(100); 

    Domicile            int(10);      

    DwTimeStamp         timestamp;    

    EmpDrvId            int(10);      

    Engine              varchar(100); 

    FleetId             int(10);       

    FluidType           ind;           

    FluidTypePrimary    varchar(100);  

    FluidTypeUOM        ind;           

    GroupsId            varchar(100);  

    InService           timestamp;     

    IsSlidingPM         ind;           

    IsTire              varchar(100);  

    LastDone            timestamp;     

    LastInterval        int(10);       

    License             varchar(100);   

    LoanerStatus        varchar(100);  

    LoanerUnit          varchar(100);  

    MFGPartId           varchar(100);  

    Make                varchar(100);  

    MeterDef1           int(10);       

    MeterDef2           int(10);      

    MeterDef3           int(10);      

    MeterDefID          int(10);      

    MeterDefPrimary     varchar(100); 

    Model               varchar(100); 

    ModelYear           varchar(100); 

    ModifiedBy          varchar(100); 

    ModifiedDate        timestamp;    

    MonDepr             int(10);      

    NameCustomer        varchar(100); 

    ObjId               int(10);      

    ObjImageId          int(10);      

    ObjType             int(10);      

    OutofService        int(10);      

    ParentMeter         varchar(100); 

    ParkFacility        varchar(100); 

    ParkFacilityName    varchar(100);  

    ParksLot            varchar(100);  

    PartId              int(10);       

    PhyLocation         varchar(100);  

    PhyShopLocation     varchar(100);  

    Pressure            varchar(100);  

    PriceTBLID          int(10);       

    PurchFrom           varchar(100);  

    PurchPrice          int(10);       

    PurchUOM            varchar(100);   

    RepairLimit         int(10);       

    RowNum              int(10);       

    SalvageValue        int(10);       

    SerialNo            varchar(100);  

    State               varchar(100);  

    Status              varchar(100);  

    Terminated          timestamp;   

    TireConfigCode      varchar(100);

    Title               varchar(100);

    TmtCodeID           int(10);     

    TotalDepr           int(10);     

    Type                varchar(100);

    UnitID              int(10);     

    UnitManager         varchar(100);

    UnitNumber          varchar(100);

    UnitPrefix          varchar(100);

    UnitType            varchar(100);

    UnitUserFld1        varchar(100);

    UnitUserFld2        varchar(100);

    UnitUserFld3        varchar(100);

    UnitUserFld4        varchar(100);

    UnitUserFld5        varchar(100);

    UnitUserFld6        varchar(100); 

    UnitUserFld7        varchar(100); 

    UnitUserFld8        varchar(100); 

    UnitWeight          int(10);      

    ValidateUnitMtr     varchar(100); 

    Vendor              int(10);      

    VendorName          varchar(100); 

    WARRLife1           int(10);      

    WARRLife2           int(10);      

    WARRLife3           int(10);      

    WarInService        timestamp;    

    WheelBase           varchar(100); 

    Year                int(10);      

    YearDepr            int(10);      



After setting my SOAP action parm I call:



And then run this code:


    soapResponse =                                               

                  http_string('POST': soapEndPointURL: soapRequest:



soapResonse is getting populated with valid data – up to a point. In other words, the http_String call seems to be giving me the data that I’m expecting. However, keep reading.          


    options = 'case=any allowextra=yes allowmissing=yes ' +



    XML-INTO Result %XML(soapResponse: options); 


So I am having two problems and #1 might be causing #2, but I don’t know enough about this to know:

1.       My soapResponse field (dcl-s soapResponse         varchar(100000);) is only being populated to a size/length of 1024. When I put the program into debug, and display the field with F11, it only shows me 1024 chars. Any idea why? We’re on V7R3 (but our PTFs are not up to date).

2.       The XML-INTO op code returns error message RNQ0353 - XML document does not match RPG variable. Based on the program code above, this might simply be the result of the bad length being returned to soapResponse, but it could also be something I’ve screwed up in defining my DSs.


Any comments would be greatly appreciated.


Thanks – and Happy New Year!




Jeff Bianchi


Jeff.Bianchi@xxxxxxxx| P 253.804.1034

Oak Harbor Freight Lines, Inc.

"Bringing Peace of Mind Since 1916."


Ftpapi mailing list