You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Cole Ferrier <co...@coleferrier.com> on 2010/11/30 17:36:00 UTC

Problem interfacing with a system using Axis2 - Element Inheritance

Here is the scenario.

In the WSDL there are a couple namespaces:

Namespace "base" with an element called ServiceResultsBase (this has a
couple common properties such as rowCount)

Then there is the primarily namespace for the WSDL

Namespace "service" has an element that extends ServiceResultsBase that
includes other data that the needs to be returned.

The Axis2 side is the server, and when it returns the data, it is appearing
that it returns all of the attributes in the service namespace, (even the
properties coming from base that it inherited).

Other people that have used this service that I am interfacing with haven't
had a problem.

But with CXF 2.2 as a client, it is telling me that it can't match what its
getting back to the right data elements

DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"
http://service.services/xsd", local:"rowsReturned"). Expected elements are
<{http://service.services/xsd}serviceRecords>,<{
http://base.services/xsd}rowsReturned>
     Location: line 1

i was manually able to change the WSDL so move the elements from
ServiceResultsBase to the elements that extend it, and then it works... but
I am trying to figure out which implementation is correct.

When one element extends the other, which namespace should the attributes
from the parent come from?

Or do i need to turn off schema validation? (How do i?)

Cole Ferrier

Re: Problem interfacing with a system using Axis2 - Element Inheritance

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 30 November 2010 12:17:50 pm Cole Ferrier wrote:
> I did a little more research and found
> 
> http://www.mail-archive.com/axis-dev@ws.apache.org/msg43856.html
> 
> which I think is the cause.

That definitely looks like the cause.

> So i will talk to the interfacing system about it.
> 
> Is schema validation on by default? or? The interfacing system said they
> routinely add additional data that will come back in the web services, so
> they suggest turning it off, so that our end will just disregard the data.

It's "semi-on".    See:

http://cxf.547215.n5.nabble.com/Unmarshal-Exception-and-weird-URIMappingInterceptor-Message-td568937.html#a568945

for a description of the various validations that are in place here.   You can turn off all the checks, but you'll likely get "null" for all the stuff that is wrong.   

Dan


> 
> Cole Ferrier
> 
> On Tue, Nov 30, 2010 at 8:36 AM, Cole Ferrier <co...@coleferrier.com> wrote:
> > Here is the scenario.
> > 
> > In the WSDL there are a couple namespaces:
> > 
> > Namespace "base" with an element called ServiceResultsBase (this has a
> > couple common properties such as rowCount)
> > 
> > Then there is the primarily namespace for the WSDL
> > 
> > Namespace "service" has an element that extends ServiceResultsBase that
> > includes other data that the needs to be returned.
> > 
> > The Axis2 side is the server, and when it returns the data, it is
> > appearing that it returns all of the attributes in the service
> > namespace, (even the properties coming from base that it inherited).
> > 
> > Other people that have used this service that I am interfacing with
> > haven't had a problem.
> > 
> > But with CXF 2.2 as a client, it is telling me that it can't match what
> > its getting back to the right data elements
> > 
> > DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"
> > http://service.services/xsd", local:"rowsReturned"). Expected elements
> > are
> > <{http://service.services/xsd}serviceRecords<http://service.services/xsd
> > %7DserviceRecords>
> > 
> > >,<{http://base.services/xsd}rowsReturned<http://base.services/xsd%7Drows
> > >Returned>
> > >
> >      Location: line 1
> > 
> > i was manually able to change the WSDL so move the elements from
> > ServiceResultsBase to the elements that extend it, and then it works...
> > but I am trying to figure out which implementation is correct.
> > 
> > When one element extends the other, which namespace should the attributes
> > from the parent come from?
> > 
> > Or do i need to turn off schema validation? (How do i?)
> > 
> > Cole Ferrier

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: Problem interfacing with a system using Axis2 - Element Inheritance

Posted by Cole Ferrier <co...@coleferrier.com>.
I did a little more research and found

http://www.mail-archive.com/axis-dev@ws.apache.org/msg43856.html

which I think is the cause.

So i will talk to the interfacing system about it.

Is schema validation on by default? or? The interfacing system said they
routinely add additional data that will come back in the web services, so
they suggest turning it off, so that our end will just disregard the data.

Cole Ferrier

On Tue, Nov 30, 2010 at 8:36 AM, Cole Ferrier <co...@coleferrier.com> wrote:

> Here is the scenario.
>
> In the WSDL there are a couple namespaces:
>
> Namespace "base" with an element called ServiceResultsBase (this has a
> couple common properties such as rowCount)
>
> Then there is the primarily namespace for the WSDL
>
> Namespace "service" has an element that extends ServiceResultsBase that
> includes other data that the needs to be returned.
>
> The Axis2 side is the server, and when it returns the data, it is appearing
> that it returns all of the attributes in the service namespace, (even the
> properties coming from base that it inherited).
>
> Other people that have used this service that I am interfacing with haven't
> had a problem.
>
> But with CXF 2.2 as a client, it is telling me that it can't match what its
> getting back to the right data elements
>
> DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"
> http://service.services/xsd", local:"rowsReturned"). Expected elements are
> <{http://service.services/xsd}serviceRecords<http://service.services/xsd%7DserviceRecords>
> >,<{http://base.services/xsd}rowsReturned<http://base.services/xsd%7DrowsReturned>
> >
>      Location: line 1
>
> i was manually able to change the WSDL so move the elements from
> ServiceResultsBase to the elements that extend it, and then it works... but
> I am trying to figure out which implementation is correct.
>
> When one element extends the other, which namespace should the attributes
> from the parent come from?
>
> Or do i need to turn off schema validation? (How do i?)
>
> Cole Ferrier
>
>