FAQ
I think I've come across a bug in 0.91 regarding minOccurs. I've tried
to simplify down things as much as possible w/o removing the possible
sources of trouble.

The new error message I got is: "error: no match for required block
`DestinationSubPref' at {http://www.opentravel.org/OTA/
2003/05}TTI_ProductSearchRQ/SearchCriteria/DestinationPref". In a
nutshell, it seems to be getting confused about the "minOccurs"
attributes. Both the DestinationPref and DestinationSubPref have
minOccurs=0, so I can't imagine why the SubPref would be required.

My SOAP client looks like:

my $client = XML::Compile::WSDL11->new($xml_file);
# import the various schema files
$client->compileClient(%params);
my ($answer, $trace) = $client->( { body => $params } );

And $params is:
# $VAR1 = {
# 'Version' => 1,
# 'CurrencyCode' => 'EUR',
# 'SearchCriteria' => {
# 'SearchDateRange' => {
# 'Start' => '2009-02-21',
# 'Duration' => 'P7N'
# },
# 'DestinationPref' => [
# {
# 'Code' => 'BBVT'
# }
# ],
# 'CustomerCounts' => {
# 'CustomerCount' => [
# {
# 'Code' => 10,
# 'Quantity' => 3
# }
# ]
# }
# },
# 'POS' => { ... },
# };

A much simplified fragment of the schema is:
<xs:element name="TTI_ProductSearchRQ">
<xs:complexType>
<xs:sequence>
<xs:element name="POS" type="POS_Type" minOccurs="0"/>
<xs:element name="SearchCriteria">
<xs:complexType>
<xs:sequence>
<xs:element name="SearchDateRange" minOccurs="0">
<xs:complexType>
<xs:complexContent>
<xs:extension base="DateTimeSpanType">
<xs:attributeGroup ref="DOW_PatternGroup" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="foo1">......</xs:element>
<xs:element name="DestinationPref" minOccurs="0" maxOccurs="5">
<xs:complexType>
<xs:complexContent>
<xs:extension base="DestinationPrefType">
<xs:sequence>
<xs:element name="DestinationSubPref"
type="DestinationPrefType" minOccurs="0" maxOccurs="5"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="CustomerCounts" minOccurs="0">
<xs:complexType>
<xs:complexContent>
<xs:extension base="CustomerCountsType">
<xs:attribute name="FreeChildQuantity" type="Numeric1to4"
use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="foo2">......</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="OTA_PayloadStdAttributes"/>
<xs:attributeGroup ref="MaxResponsesGroup"/>
<xs:attributeGroup ref="CurrencyCodeGroup"/>
</xs:complexType>
</xs:element>
<xs:complexType name="DestinationPrefType">
<xs:attribute name="Code" type="StringLength1to8" use="required"/>
<xs:attribute name="Name" type="StringLength1to32" use="optional"/>
<xs:attribute name="Level" type="xs:NMTOKEN" use="optional"/>
<xs:attributeGroup ref="SearchRelevanceGroup"/>
</xs:complexType>

On 1 Aug 2008, at 21:36, Mark Overmeer wrote:


At least two weeks worth of fixes/improvements. Certainly worth
to upgrade if you start new projects. Most problems were discovered
when processing schemas with schemas, for XML::Rewrite.

In short:
- Quite some fixes in READER and WRITER around choice with
minOccurs=0

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 5 | next ›
Discussion Overview
groupxml-compile @
postedAug 1, '08 at 9:36p
activeAug 6, '08 at 10:21a
posts5
users2
websiteperl.overmeer.net...

2 users in discussion

Mark Overmeer: 3 posts Drew Taylor: 2 posts

People

Translate

site design / logo © 2022 Grokbase