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

Re: WSDL2RPG parsing error?



Sean,

I am happy that you solved the problem on your own. However the problem is 
somewhat strange because WSDL2RPG v1.13.2 as well as v1.15 generated the 
'when' statement with 'WorkOrder' starting with an upper case letter:


  when (depth = 2
         and
         name = 'ExtendedProperties'
         and
         namespace = 'http://wcf.sage-quest.com/v1.0/Services/WorkOrderS+
         ervice');
     XMLSAXParser_delegateElementProcessing(
        %addr(currentItem.ExtendedProperties)
        : %paddr('i0_ExtendedPropertiesStart')
        : %paddr('i0_ExtendedPropertiesEnd')
        );
     return;

  when (depth = 2
         and
         name = 'WorkOrder'
         and
         namespace = 'http://wcf.sage-quest.com/v1.0/Services/WorkOrderS+
         ervice');
     XMLSAXParser_delegateElementProcessing(
        %addr(currentItem.WorkOrder)
        : %paddr('i0_WorkOrderStart')
        : %paddr('i0_WorkOrderEnd')
        );
     return;

  endsl;

Errors like that can drive a programmer crazy. But, last but not least, I 
am happy that it was not a problem of WSDL2RPG.

Thomas.

Am 17.01.2012 16:08, schrieb Porterfield, Sean:
> Thanks for your help.  I was getting the proper data back as verified in the debug log.
>
> I noticed while debugging today that the program never got to the i0_workOrderEnd subprocedure where it was to set the values in the data structure.
>
> I blame those Windows programmers on the other end ;)
>
> Since it got to i0_CreateWorkOrderResponseExtStart and properly assigned the ExtendedProperties, I figured the problem must be there.  It looks like they changed the case from workOrder to WorkOrder, and it no longer matched.  I made the change to match, and now it works.
>
>           when (depth = 2
>                  and
>                  name = 'workOrder'
>                  and
>                  namespace = 'http://wcf.sage-quest.com/v1.0/Services/WorkOrderS+
>                  ervice');
>              XMLSAXParser_delegateElementProcessing(
>                 %addr(currentItem.workOrder)
>                 : %paddr('i0_workOrderStart')
>                 : %paddr('i0_workOrderEnd')
>                 );
>
>           when (depth = 2
>                  and
>                  name = 'WorkOrder'
>                  and
>                  namespace = 'http://wcf.sage-quest.com/v1.0/Services/WorkOrderS+
>                  ervice');
>              XMLSAXParser_delegateElementProcessing(
>                 %addr(currentItem.workOrder)
>                 : %paddr('i0_workOrderStart')
>                 : %paddr('i0_workOrderEnd')
>                 );
> --
> Sean Porterfield
>
>
>
> -----Original Message-----
> From: Thomas Raddatz
> Sent: Monday, January 16, 2012 5:11 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: WSDL2RPG parsing error?
>
> Sean,
>
> Please double check that first call to the web service (you referred to it as "initial call") returns the data that you expect. For that you may turn the debug log on and check the response message.
>
> The next thing I would do is to identify the data structure that contains the sub field that should contain the expected data. If, for expample, the sub field is "street" and the name of the data structure is "address", then there should be a procedure named "addressEnd". That procedure is responsible to pick up the data of the sub fields of "address" as long as the sub fields are not an XML complex type which would be picked up from another specialized procedure.
>
> Procedures "addressEnd" should contains a "when" statement comparing the name of the current element with "street". If the name matches "street" the String UnMarshaller should copy the XML data to field "address.street".
>
> Please try to debug that.
>
> Basically "compleyTypeNameStart" procedures are responsible for delegating work to other specialized procedures. For example if "city" was a data structure with sub fields "zip" and "name" and if "city" is a sub field of "address" then "addressStart" delegates processing to "cityStart" and "cityEnd" when it notices the "city" complex type.
>
> "complexTypeEnd" procedures are responsible for picking up the data of primitive fields. Based on the sample above, "CityEnd" is responsible to pick up the data of sub fields "zip" and "name".
>
> Thomas.
>
>
> Am 16.01.2012 22:04, schrieb Porterfield, Sean:
>> I've been successfully sending data to a couple web services.   One will send back an error like "order already exists" which prompts me to send to the "update" instead of "create" service.  No problem there.
>>
>> Now I have to get data back from the "create" and use it instead of just checking for the particular error message.  I thought there was still a bug on their end until noticed in my log file that I hadn't sent part of the data - data that I would have gotten back from the initial call to the "create" method.  I ran through in debug and found the data structure of my return variable is completely empty.
>>
>> How do I go about troubleshooting something like that?  It hurt my
>> brain enough just to trace through all the "likeds" to even understand
>> how to reference some of the variables.  (I think I got that part
>> right before compiling, but it still hurt!)
>>
>> WSDL: http://wcf.sage-quest.com/WorkOrderService.svc?wsdl
>>
>> My problem comes from CreateWorkOrderRequestExt
>>
>> Using the generated code, I call it with:
>>
>> CreateWorkOrderResponseExt =
>>               BasicHttp_IWorkOrderService_CreateWorkOrderExt(
>>                   parameters:
>>                   errText);
>>
>> I then need to access some of the values that should be in CreateWorkOrderResponseExt but aren't.
>>
>>         *  Response message
>>         *  This structure contains the result values returned by
>>         *  the web service.
>>        D CreateWorkOrderResponseExt...
>>        D                 DS                  likeds(i0_CreateWorkOrderResponseE...
>>        D                                     xt_t)
>>        D                                     inz
>>
>>
>> The interesting part is it seems to be getting part of the data correctly.
>>
>> <ExtendedProperties
>> xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays";
>> xmlns:i="http://www.w3.org/2001/XMLSchema-instance";><a:KeyValueOfstrin
>> gstring><a:Key>AddressResolved</a:Key><a:Value>False</a:Value></a:KeyV
>> alueOfstringstring></ExtendedProperties>
>>
>> I have code that checks for the AddressResolved True/False value, and it branches correctly based on that.
>>
>> HTTPAPI Ver 1.24beta11 released 2010-09-09
>> OS/400 Ver V5R4M0
>> WSDL2RPG Ver 1.13.2 released 2011-07-15
>>
>> I don't see any errors in the debug log.  Just a few warnings:
>>
>> Warning: Received unexpected Soap header:<Security>
>> Warning: Received unexpected Soap header:<Timestamp>
>> Warning: Received unexpected Soap header:<Created>
>> Warning: Received unexpected Soap header: 2012-01-16T20:01:08.865Z
>> Warning: Received unexpected Soap header:</Created>
>> Warning: Received unexpected Soap header:<Expires>
>> Warning: Received unexpected Soap header: 2012-01-16T20:06:08.865Z
>> Warning: Received unexpected Soap header:</Expires>
>> Warning: Received unexpected Soap header:
>> Warning: Received unexpected Soap header:</Timestamp>
>> Warning: Received unexpected Soap header:
>> Warning: Received unexpected Soap header:</Security>
>> --
>> Sean Porterfield
>
> This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged.  If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited.  Thank you.
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------