PDA

View Full Version : DAW: Possible wsdl import bug ???



Karl A. Sørensen
16-Sep-2005, 09:05 AM
We are trying to import a wsdl document from one of our customers, to be
able to call their web service. The "Web service client class generator"
imports just fine, but the generated structures are not correct. Some of the
structures the "Web service client class generator" generates should have
arrays in them, but I don't get arrays. When importing the same wsdl
document in Visual studio I can see that VS generates arrays in the right
places. Because of this I think there is a bug in the "Web service client
class generator".

When trying to call this web service with the generated class, I get array
errors in one of the VDF11 .PKG's (where the code translates the call into
xml).

I am attaching the wsdl document, and a link to it. I also attach the
generated .PKG
http://rep.oio.dk/kmd.dk/energi/xml/wsdl/2005/07/05/ReportReadingWS.wsdl


In the attached cWSReportReading.pkg there are these structures:
--------------------------------------------------
// Structs used by web service

Struct tWSCounterNumberReadingType
bigint CounterNumber
bigint CounterReadingType
date CounterReadingExpectedDate
date CounterReadingActualDate
bigint CounterReadingActualQuantity
short StatusCode
End_Struct // tWSCounterNumberReadingType


Struct tWSMeterNumberReadingType
string MeterNumber
tWSCounterNumberReadingType CounterNumberReading
End_Struct // tWSMeterNumberReadingType


Struct tWSConsumptionTypeReadingType
bigint ConsumptionTypeIdentifier
tWSMeterNumberReadingType MeterNumberReading
End_Struct // tWSConsumptionTypeReadingType


Struct tWSReportReadingRequestType
short FASUserIdentifier
short FASUserUnitIdentifier
tWSConsumptionTypeReadingType ConsumptionTypeReading
End_Struct // tWSReportReadingRequestType


Struct tWSReportingStatusType
bigint ReportingStatusCode
string ReportingStatusText
End_Struct // tWSReportingStatusType


Struct tWSReportReadingResponseType
tWSReportingStatusType ReportingStatus
End_Struct // tWSReportReadingResponseType
--------------------------------------------------

In the structure "tWSReportReadingRequestType" the field
"ConsumptionTypeReading" should be an array, but it is not. When comparing 2
different web services, I can see that the line:
Send defineStructParameter oWSConsumptionTypeReadingType 1 5
"ConsumptionTypeReading"

contains the number "5" which I think is the max number of array elements
allowed. If this parameter is "C_unbounded", it seems that the "Web service
client class generator" generates an array in the correct places.


Regards
Karl

Marco
12-Dec-2005, 05:59 PM
Hi,

Has anybody else also had this problem? I have...

I have to link to attached .wsdl and where the 'maxOccurs' have a value
(eg 5) rather than "unbounded", the array is not generated.

I believe this needs to be addressed. I could not find anything in the
bugtracker.

I'm going to report this as a bug at the end of the week, so anybody
that has something else to contribute?

I guess the work around is as Karl suggest, download the wsdl, change
it, then run the class generator, than change things back... and hope it
all works.

Cheers,
Marco




Karl A. Sørensen wrote:
> We are trying to import a wsdl document from one of our customers, to be
> able to call their web service. The "Web service client class generator"
> imports just fine, but the generated structures are not correct. Some of the
> structures the "Web service client class generator" generates should have
> arrays in them, but I don't get arrays. When importing the same wsdl
> document in Visual studio I can see that VS generates arrays in the right
> places. Because of this I think there is a bug in the "Web service client
> class generator".
>
> When trying to call this web service with the generated class, I get array
> errors in one of the VDF11 .PKG's (where the code translates the call into
> xml).
>
> I am attaching the wsdl document, and a link to it. I also attach the
> generated .PKG
> http://rep.oio.dk/kmd.dk/energi/xml/wsdl/2005/07/05/ReportReadingWS.wsdl
>
>
> In the attached cWSReportReading.pkg there are these structures:
> --------------------------------------------------
> // Structs used by web service
>
> Struct tWSCounterNumberReadingType
> bigint CounterNumber
> bigint CounterReadingType
> date CounterReadingExpectedDate
> date CounterReadingActualDate
> bigint CounterReadingActualQuantity
> short StatusCode
> End_Struct // tWSCounterNumberReadingType
>
>
> Struct tWSMeterNumberReadingType
> string MeterNumber
> tWSCounterNumberReadingType CounterNumberReading
> End_Struct // tWSMeterNumberReadingType
>
>
> Struct tWSConsumptionTypeReadingType
> bigint ConsumptionTypeIdentifier
> tWSMeterNumberReadingType MeterNumberReading
> End_Struct // tWSConsumptionTypeReadingType
>
>
> Struct tWSReportReadingRequestType
> short FASUserIdentifier
> short FASUserUnitIdentifier
> tWSConsumptionTypeReadingType ConsumptionTypeReading
> End_Struct // tWSReportReadingRequestType
>
>
> Struct tWSReportingStatusType
> bigint ReportingStatusCode
> string ReportingStatusText
> End_Struct // tWSReportingStatusType
>
>
> Struct tWSReportReadingResponseType
> tWSReportingStatusType ReportingStatus
> End_Struct // tWSReportReadingResponseType
> --------------------------------------------------
>
> In the structure "tWSReportReadingRequestType" the field
> "ConsumptionTypeReading" should be an array, but it is not. When comparing 2
> different web services, I can see that the line:
> Send defineStructParameter oWSConsumptionTypeReadingType 1 5
> "ConsumptionTypeReading"
>
> contains the number "5" which I think is the max number of array elements
> allowed. If this parameter is "C_unbounded", it seems that the "Web service
> client class generator" generates an array in the correct places.
>
>
> Regards
> Karl
>
>

Marco
19-Dec-2005, 10:05 PM
Have logged by DAW under # 3694

Cheers,
Marco

Marco Kuipers wrote:
> Hi,
>
> Has anybody else also had this problem? I have...
>
> I have to link to attached .wsdl and where the 'maxOccurs' have a value
> (eg 5) rather than "unbounded", the array is not generated.
>
> I believe this needs to be addressed. I could not find anything in the
> bugtracker.
>
> I'm going to report this as a bug at the end of the week, so anybody
> that has something else to contribute?
>
> I guess the work around is as Karl suggest, download the wsdl, change
> it, then run the class generator, than change things back... and hope it
> all works.
>
> Cheers,
> Marco
>
>
>
>
> Karl A. Sørensen wrote:
>
>> We are trying to import a wsdl document from one of our customers, to
>> be able to call their web service. The "Web service client class
>> generator" imports just fine, but the generated structures are not
>> correct. Some of the structures the "Web service client class
>> generator" generates should have arrays in them, but I don't get
>> arrays. When importing the same wsdl document in Visual studio I can
>> see that VS generates arrays in the right places. Because of this I
>> think there is a bug in the "Web service client class generator".
>>
>> When trying to call this web service with the generated class, I get
>> array errors in one of the VDF11 .PKG's (where the code translates the
>> call into xml).
>>
>> I am attaching the wsdl document, and a link to it. I also attach the
>> generated .PKG
>> http://rep.oio.dk/kmd.dk/energi/xml/wsdl/2005/07/05/ReportReadingWS.wsdl
>>
>>
>> In the attached cWSReportReading.pkg there are these structures:
>> --------------------------------------------------
>> // Structs used by web service
>>
>> Struct tWSCounterNumberReadingType
>> bigint CounterNumber
>> bigint CounterReadingType
>> date CounterReadingExpectedDate
>> date CounterReadingActualDate
>> bigint CounterReadingActualQuantity
>> short StatusCode
>> End_Struct // tWSCounterNumberReadingType
>>
>>
>> Struct tWSMeterNumberReadingType
>> string MeterNumber
>> tWSCounterNumberReadingType CounterNumberReading
>> End_Struct // tWSMeterNumberReadingType
>>
>>
>> Struct tWSConsumptionTypeReadingType
>> bigint ConsumptionTypeIdentifier
>> tWSMeterNumberReadingType MeterNumberReading
>> End_Struct // tWSConsumptionTypeReadingType
>>
>>
>> Struct tWSReportReadingRequestType
>> short FASUserIdentifier
>> short FASUserUnitIdentifier
>> tWSConsumptionTypeReadingType ConsumptionTypeReading
>> End_Struct // tWSReportReadingRequestType
>>
>>
>> Struct tWSReportingStatusType
>> bigint ReportingStatusCode
>> string ReportingStatusText
>> End_Struct // tWSReportingStatusType
>>
>>
>> Struct tWSReportReadingResponseType
>> tWSReportingStatusType ReportingStatus
>> End_Struct // tWSReportReadingResponseType
>> --------------------------------------------------
>>
>> In the structure "tWSReportReadingRequestType" the field
>> "ConsumptionTypeReading" should be an array, but it is not. When
>> comparing 2 different web services, I can see that the line:
>> Send defineStructParameter oWSConsumptionTypeReadingType 1 5
>> "ConsumptionTypeReading"
>>
>> contains the number "5" which I think is the max number of array
>> elements allowed. If this parameter is "C_unbounded", it seems that
>> the "Web service client class generator" generates an array in the
>> correct places.
>>
>>
>> Regards
>> Karl
>>

Karl A. Sørensen
20-Dec-2005, 02:30 AM
Thanks!

Karl


"Marco Kuipers" <marco.kuipers@nci.com.au> wrote in message
news:gJjezIRBGHA.5164@dacmail.dataaccess.com...
> Have logged by DAW under # 3694
>
> Cheers,
> Marco
>
> Marco Kuipers wrote:
>> Hi,
>>
>> Has anybody else also had this problem? I have...
>>
>> I have to link to attached .wsdl and where the 'maxOccurs' have a value
>> (eg 5) rather than "unbounded", the array is not generated.
>>
>> I believe this needs to be addressed. I could not find anything in the
>> bugtracker.
>>
>> I'm going to report this as a bug at the end of the week, so anybody that
>> has something else to contribute?
>>
>> I guess the work around is as Karl suggest, download the wsdl, change it,
>> then run the class generator, than change things back... and hope it all
>> works.
>>
>> Cheers,
>> Marco
>>
>>
>>
>>
>> Karl A. Sørensen wrote:
>>
>>> We are trying to import a wsdl document from one of our customers, to be
>>> able to call their web service. The "Web service client class generator"
>>> imports just fine, but the generated structures are not correct. Some of
>>> the structures the "Web service client class generator" generates should
>>> have arrays in them, but I don't get arrays. When importing the same
>>> wsdl document in Visual studio I can see that VS generates arrays in the
>>> right places. Because of this I think there is a bug in the "Web service
>>> client class generator".
>>>
>>> When trying to call this web service with the generated class, I get
>>> array errors in one of the VDF11 .PKG's (where the code translates the
>>> call into xml).
>>>
>>> I am attaching the wsdl document, and a link to it. I also attach the
>>> generated .PKG
>>> http://rep.oio.dk/kmd.dk/energi/xml/wsdl/2005/07/05/ReportReadingWS.wsdl
>>>
>>>
>>> In the attached cWSReportReading.pkg there are these structures:
>>> --------------------------------------------------
>>> // Structs used by web service
>>>
>>> Struct tWSCounterNumberReadingType
>>> bigint CounterNumber
>>> bigint CounterReadingType
>>> date CounterReadingExpectedDate
>>> date CounterReadingActualDate
>>> bigint CounterReadingActualQuantity
>>> short StatusCode
>>> End_Struct // tWSCounterNumberReadingType
>>>
>>>
>>> Struct tWSMeterNumberReadingType
>>> string MeterNumber
>>> tWSCounterNumberReadingType CounterNumberReading
>>> End_Struct // tWSMeterNumberReadingType
>>>
>>>
>>> Struct tWSConsumptionTypeReadingType
>>> bigint ConsumptionTypeIdentifier
>>> tWSMeterNumberReadingType MeterNumberReading
>>> End_Struct // tWSConsumptionTypeReadingType
>>>
>>>
>>> Struct tWSReportReadingRequestType
>>> short FASUserIdentifier
>>> short FASUserUnitIdentifier
>>> tWSConsumptionTypeReadingType ConsumptionTypeReading
>>> End_Struct // tWSReportReadingRequestType
>>>
>>>
>>> Struct tWSReportingStatusType
>>> bigint ReportingStatusCode
>>> string ReportingStatusText
>>> End_Struct // tWSReportingStatusType
>>>
>>>
>>> Struct tWSReportReadingResponseType
>>> tWSReportingStatusType ReportingStatus
>>> End_Struct // tWSReportReadingResponseType
>>> --------------------------------------------------
>>>
>>> In the structure "tWSReportReadingRequestType" the field
>>> "ConsumptionTypeReading" should be an array, but it is not. When
>>> comparing 2 different web services, I can see that the line:
>>> Send defineStructParameter oWSConsumptionTypeReadingType 1 5
>>> "ConsumptionTypeReading"
>>>
>>> contains the number "5" which I think is the max number of array
>>> elements allowed. If this parameter is "C_unbounded", it seems that the
>>> "Web service client class generator" generates an array in the correct
>>> places.
>>>
>>>
>>> Regards
>>> Karl
>>>