Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs
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/; accountId55/accountId dateRange type=to_end_date start2008-11-01T00:00:00.000+10:00/start end2008-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 accountId55/accountId dateRange type=to_end_date start2008-11-01T00:00:00.000+10:00/start end2008-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]
Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs
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 [EMAIL PROTECTED] 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:
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
RE: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs
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: [EMAIL PROTECTED] 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
Re: ( Fixed It )Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs
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
Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs
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 [EMAIL PROTECTED] 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'
Re: Identified AXIS2 Unexpected Element issue but how do I get this to work with stubs
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/; accountId55/accountId dateRange type=to_end_date start2008-11-01T00:00:00.000+10:00/start end2008-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 accountId55/accountId dateRange type=to_end_date start2008-11-01T00:00:00.000+10:00/start end2008-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