When I do the following everything works out fine. I prefer to have all the
elements at the top of the types section but the stubs working is more
important to me.
<element name="SummaryRequest" />
<complexType>
<sequence>
<element name="accountId"
type="unsignedLong" nillable="false" />
<element name="dateRange"
type="ca:DateRange" nillable="false" />
<element name="mode"
type="string" minOccurs="0" maxOccurs="1" />
<element name="pagination"
type="ca:Pagination" minOccurs="0" maxOccurs="1" />
<element name="sort"
type="ca:Sort" minOccurs="0" maxOccurs="1" />
<element name="metricType"
type="string" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
</element>
Andrew Zielinski wrote:
>
> Here you go. Any help is much appreciated.
>
> <types>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://online.nielsen.com/ca/api/">
>
> <element name="Summary" type="ca:Report" />
>
> <element name="SummaryRequest"
> type="ca:SummaryRequest"/>
>
>
> <complexType name="SummaryRequest">
> <sequence>
> <element name="accountId"
> type="unsignedLong" nillable="false" />
> <element name="dateRange"
> type="ca:DateRange" nillable="false" />
> <element name="mode"
> type="string" minOccurs="0" maxOccurs="1" />
> <element name="pagination"
> type="ca:Pagination" minOccurs="0"
> maxOccurs="1" />
> <element name="sort"
> type="ca:Sort" minOccurs="0" maxOccurs="1" />
> <element name="metricType"
> type="string" minOccurs="0"
> maxOccurs="unbounded" />
> </sequence>
> </complexType>
>
>
> <complexType name="Criteria">
> <sequence>
> <element name="key" type="ca:Key"
> minOccurs="1" maxOccurs="unbounded"
> />
> </sequence>
> </complexType>
>
> <complexType name="Sort">
> <sequence>
> <element name="metricType"
> type="string"/>
> <element name="direction"
> type="string"/>
> </sequence>
> </complexType>
>
> <complexType name="Pagination">
> <sequence>
> <element name="start" type="int"/>
> <element name="end" type="int"/>
> </sequence>
> </complexType>
>
> <complexType name="DateRange">
> <sequence>
> <element name="start" type="dateTime"/>
> <element name="end" type="dateTime"/>
> </sequence>
> <attribute name="type" type="string"/>
>
> </complexType>
>
> <complexType name="Report">
> <sequence>
> <element name="processed"
> type="dateTime"/>
> <element name="livedataProcessed"
> type="dateTime" minOccurs="0"
> maxOccurs="1"/>
> <element name="rowCount" type="long"/>
> <element name="row" type="ca:Row"
> maxOccurs="unbounded"/>
> </sequence>
> </complexType>
>
> <complexType name="Row">
> <sequence>
> <element name="name" type="string"
> minOccurs="0" maxOccurs="1"/>
> <element name="key" type="ca:Key"
> maxOccurs="unbounded"/>
> <element name="metric" type="ca:Metric"
> maxOccurs="unbounded"/>
> </sequence>
> <attribute name="position" type="long"/>
> </complexType>
>
> <complexType name="Key">
> <simpleContent>
> <extension base="string">
> <attribute name="type" type="string"/>
> </extension>
> </simpleContent>
> </complexType>
>
> <complexType name="Metric">
> <simpleContent>
> <extension base="string">
> <attribute name="type" type="string" />
> <attribute name="date" type="dateTime"
> use="optional" />
> </extension>
> </simpleContent>
> </complexType>
>
>
> </schema>
> </types>
>
>
>
>
> Eran Chinthaka-3 wrote:
>>
>> Can you share the types section of your WSDL file?
>>
>> On Wed, Aug 20, 2008 at 1:42 AM, Andrew Zielinski <andrew.zielinski.is@
>> gmail.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> Like many users I was having issues with 'unexpected element'. With the
>>> help
>>> of TCPMon I was able to resolve the issue. Instead of the soap request
>>> being
>>> formed like this:
>>>
>>> <?xml version='1.0' encoding='UTF-8'?>
>>> <soapenv:Envelope
>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>>> ">
>>> <soapenv:Body>
>>> <SummaryRequest xmlns="http://online.nielsen.com/ca/api/">
>>> <accountId>55</accountId>
>>> <dateRange type="to_end_date">
>>> <start>2008-11-01T00:00:00.000+10:00</start>
>>> <end>2008-11-01T00:00:00.000+10:00</end>
>>> </dateRange>
>>> </SummaryRequest>
>>> </soapenv:Body>
>>> </soapenv:Envelope>
>>>
>>> I would need to specify the namespace and prefix in soapenv:Envelope
>>> like
>>> this:
>>>
>>> <?xml version='1.0' encoding='UTF-8'?>
>>> <soapenv:Envelope
>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>>> "
>>> xmlns:q0="http://online.nielsen.com/ca/api/">
>>> <soapenv:Body>
>>> <q0:SummaryRequest>
>>> <accountId>55</accountId>
>>> <dateRange type="to_end_date">
>>> <start>2008-11-01T00:00:00.000+10:00</start>
>>> <end>2008-11-01T00:00:00.000+10:00</end>
>>> </dateRange>
>>> </q0:SummaryRequest>
>>> </soapenv:Body>
>>> </soapenv:Envelope>
>>>
>>> My question is, is there anyway to modify the stub request so it is like
>>> the
>>> second example or is there anything that I would I have to do to my WSDL
>>> for
>>> the first request to be valid.
>>>
>>> Cheers,
>>>
>>> Andrew
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Identified-AXIS2-Unexpected-Element-issue-but-how-do-I-get-this-to-work-with-stubs-tp19063214p19063214.html
>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> With Mettha,
>> Eran Chinthaka
>>
>> --------------------------------------------------------------------
>> Health is the greatest gift; contentment is the greatest wealth; trusting
>> is
>> the best relationship; nirvana is the highest joy. - Dhammapada
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Identified-AXIS2-Unexpected-Element-issue-but-how-do-I-get-this-to-work-with-stubs-tp19063214p19100907.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]