axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sérgio Gomes" <sergiomdgo...@gmail.com>
Subject Re: "element endHour missing", yet it's present
Date Wed, 02 Apr 2008 14:31:32 GMT
Hi Dimuthu,

Yep, that did the trick, thanks :)

--Sérgio

---
On Wed, Apr 2, 2008 at 2:07 PM, Dimuthu Gamage <dimuthuc@gmail.com> wrote:
> Hi
>  I checked your wsdl and your response. The schema part to your response is,
>
>  <element name="intervals" maxOccurs="unbounded" type="impl:SchedulingInterval"/>
>  and
>       <complexType name="SchedulingInterval">
>         <sequence>
>           <element name="day" type="impl:DayOfWeek"/>
>           <element name="endHour" type="xsd:int"/>
>           <element name="endMinute" type="xsd:int"/>
>           <element name="multiplier" type="xsd:double"/>
>           <element name="startHour" type="xsd:int"/>
>           <element name="startMinute" type="xsd:int"/>
>         </sequence>
>       </complexType>
>
>  If you it is a complexType/sequence the xml should be in the same
>  order as the one defined in the schema. The order doesn't matter if
>  it was complexType/all.
>
>  So in order to parse that response you may change the wsdl to
>
>       <complexType name="SchedulingInterval">
>         <all>
>           <element name="day" type="impl:DayOfWeek"/>
>           <element name="endHour" type="xsd:int"/>
>           <element name="endMinute" type="xsd:int"/>
>           <element name="multiplier" type="xsd:double"/>
>           <element name="startHour" type="xsd:int"/>
>           <element name="startMinute" type="xsd:int"/>
>         </all>
>       </complexType>
>
>  and regenerate code.
>
>  Thanks
>  Dimuthu
>
>
>
>
>  On Wed, Apr 2, 2008 at 6:03 PM, Sérgio Gomes <sergiomdgomes@gmail.com> wrote:
>  > Hi Dimuthu,
>  >
>  >  You're right, it's finding element startHour instead of endHour:
>  >
>  >  Wed Apr  2 13:25:55 2008] [error] adb_SchedulingInterval.c(355)
>  >  element_qname = endHour|https://adwords.google.com/api/adwords/v11 &
>  >  qname = startHour|https://adwords.google.com/api/adwords/v11
>  >
>  >  That's consistent with the received XML:
>  >  <intervals>
>  >   <day>Friday</day>
>  >   <startHour>8</startHour>
>  >   <startMinute>0</startMinute>
>  >   <endHour>17</endHour>
>  >   <endMinute>0</endMinute>
>  >   <multiplier>1.0</multiplier>
>  >  </intervals>
>  >
>  >  Shouldn't the order of siblings in a SOAP structure be irrelevant, though?
>  >
>  >  Cheers,
>  >  Sérgio
>  >
>  >  ---
>  >
>  >
>  > On Tue, Apr 1, 2008 at 8:06 PM, Dimuthu Gamage <dimuthuc@gmail.com> wrote:
>  >  > Hi,
>  >  >  The thing is the parsing logic doesn't identify that the interval
>  >  >  element is at the correct position. Just to have an idea can you check
>  >  >  following line to the attached c file (line 361) and see what is the
>  >  >  expected element and what is actually met.
>  >  >
>  >  >  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "element_qname = %s & qname
=
>  >  >  %s", axutil_qname_to_string(element_qname, env),
>  >  >  axutil_qname_to_string(qname, env));
>  >  >
>  >  >  Thanks
>  >  >  Dimuthu
>  >  >
>  >  >
>  >  >
>  >  >  On Wed, Apr 2, 2008 at 12:00 AM, Sérgio Gomes <sergiomdgomes@gmail.com>
wrote:
>  >  >  > Hello again,
>  >  >  >
>  >  >  >  Sorry to bother with yet another issue, but it seems I keep running
>  >  >  >  into them :-/
>  >  >  >
>  >  >  >  I'm getting an error about a missing required element, but it's
>  >  >  >  actually present in the returned XML, as far as I can see. This is
the
>  >  >  >  error:
>  >  >  >
>  >  >  >  [Tue Apr  1 14:57:03 2008] [error] adb_SchedulingInterval.c(360) non
>  >  >  >  nillable or minOuccrs != 0 element endHour missing
>  >  >  >
>  >  >  >
>  >  >  >  Every "interval" structure in the XML has and endHour element. I'm
>  >  >  >  attaching the relevant part of the log and the .c file where the error
>  >  >  >  is taking place.
>  >  >  >
>  >  >  >  Thanks,
>  >  >  >  Sérgio
>  >  >  >
>  >  >  > ---------------------------------------------------------------------
>  >  >  >  To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>  >  >  >  For additional commands, e-mail: axis-c-user-help@ws.apache.org
>  >  >  >
>  >  >
>  >  >  ---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>  >  >  For additional commands, e-mail: axis-c-user-help@ws.apache.org
>  >  >
>  >  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>  >  For additional commands, e-mail: axis-c-user-help@ws.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message