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
<[EMAIL PROTECTED]> 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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to