You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Andrew Zielinski <an...@gmail.com> on 2008/08/20 07:42:10 UTC

Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

Posted by Anne Thomas Manes <at...@gmail.com>.
Add elementFormDefault="qualified" to the <xsd:schema> declaration in your WSDL.

In your message you specify a default namespace in the
<SummaryRequest> element, so that namespace then applies to all child
elements in the message instance. If you do not specify
elementFormDefault, then your child elements are defined as
unqualified, hence the 'unexpected element' error.

Anne

On Wed, Aug 20, 2008 at 1:42 AM, Andrew Zielinski
<an...@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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

Posted by Andrew Zielinski <an...@gmail.com>.
I thought I had fixed the issue but alas that wasn't the case :(

Hi Jeff, I had it declared in the definitions element. I put the prefix in
the schema element and that didn't seem to work either.


Jeff Greif wrote:
> 
> Note that in this snippet, you haven't declared the ca: prefix used
> below.  It could be declared in the definitions element, though.
> 
> Perhaps it would help to declare the ca: prefix in the schema element.
> 
> Jeff
> 
> On Thu, Aug 21, 2008 at 4:35 PM, Andrew Zielinski
> <an...@gmail.com> 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: axis-user-unsubscribe@ws.apache.org
>>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> 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-tp19063214p19098976.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Identified-AXIS2-Unexpected-Element-issue-but-how-do-I-get-this-to-work-with-stubs-tp19063214p19137347.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Note that in this snippet, you haven't declared the ca: prefix used
below.  It could be declared in the definitions element, though.

Perhaps it would help to declare the ca: prefix in the schema element.

Jeff

On Thu, Aug 21, 2008 at 4:35 PM, Andrew Zielinski
<an...@gmail.com> 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: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>
>>
>> --
>> 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-tp19063214p19098976.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


RE: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

Posted by Martin Gainty <mg...@hotmail.com>.
can you forward the namespace assignments which you will see at the top of the schema definition
e.g.
<xsd:schema
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
...
>

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Thu, 21 Aug 2008 16:35:19 -0700
> From: andrew.zielinski.is@gmail.com
> To: axis-user@ws.apache.org
> Subject: Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs
> 
> 
> 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: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> > 
> > 
> > -- 
> > 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-tp19063214p19098976.html
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 

_________________________________________________________________
Be the filmmaker you always wanted to be—learn how to burn a DVD with Windows®.
http://clk.atdmt.com/MRT/go/108588797/direct/01/

Re: ( Fixed It )Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

Posted by Andrew Zielinski <an...@gmail.com>.
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: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>> 
>> 
>> -- 
>> 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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

Posted by Andrew Zielinski <an...@gmail.com>.
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: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> 
> -- 
> 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-tp19063214p19098976.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs

Posted by Eran Chinthaka <er...@gmail.com>.
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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
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