You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Alexander Kampmann <Ca...@gmx.de> on 2010/04/09 14:08:51 UTC

Values vanished using encryption?

hi, 

I'm not quite sure whether this is a xmlBeans issue or a CXF problem, so feel free to tell me, if I'm wrong here. 

I created a web service using CXF and spring. The databinding is xmlbeans. Communication between this service and a client is encrypted using cxf-wss-security interceptors. 
My problem is: getters and setters in xmlBeans retun null. I printed the xml- Fragments to stdout, everything is there. I can see the elements (type: xs:string), I can see there content, but the getter returns null. 
Everything works quite fine if I deactivate the encryption (commented out the interceptor- beans in the spring- config- file), but as far as I use it, it breaks. 
I have had this problem before when xmlBeans couldn't reach the schema associated to a xmlfragment, but the namespaces and so on looks quite fine. 

Are there any ideas what goes wrong? 

best regards, 
Alex
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

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


Re: Values vanished using encryption?

Posted by Alexander Kampmann <Ca...@gmx.de>.
hi, 

Fist of all, thanks for your help. 

I printed XMlObject.toString() to my logs, removed everything which didn't belong to the xml- stuff and used svalidate on it. It says

validtest2.xml NOT valid (16 ms):
error: validtest2.xml:1:156 Schema document type not found for element 'xml-fragment'. 

It doesn't make any difference if I use encryption or not, its the same issue, but without encryption the getter's return values are okay. 

I can't figure out, why the schema document type is not found. My namespace and the schema-instance namespace are present. xsi:type has the correct value, the complex-type exists inside the schema. 

The only problem I could imagine: I declared a type for the output using an element in a type- section of the wsdl. This type never appears in my source, cause the method CXF- codegen produces in the service interface has the elements this type contains as parameters. So the xml-fragment comes from that type and not from one of the elements in my schema. 

To use an element from my schema, I need an element ref to an element from my schema. If I do so, CXF- codegen changes its behaviour to produce a method with the type defined inside the wsdl as parameter, that's not okay, because the class for that type is in the wrong location that way. Is it possible to use an element ref, but not to use that elements from the wsdl? Or maybe this is not a problem? 

Thanks, 
Alex

-------- Original-Nachricht --------
> Datum: Fri, 9 Apr 2010 08:15:35 -0700
> Von: Jacob Danner <ja...@gmail.com>
> An: user@xmlbeans.apache.org
> Betreff: Re: Values vanished using encryption?

> I know this (getters returning null) can happen if the instance is
> invalid.
> Can you try validating the message with and without encryption and see
> if there is some issue there causing it.
> 
> -jacobd
> 
> On Fri, Apr 9, 2010 at 5:08 AM, Alexander Kampmann <Ca...@gmx.de>
> wrote:
> > hi,
> >
> > I'm not quite sure whether this is a xmlBeans issue or a CXF problem, so
> feel free to tell me, if I'm wrong here.
> >
> > I created a web service using CXF and spring. The databinding is
> xmlbeans. Communication between this service and a client is encrypted using
> cxf-wss-security interceptors.
> > My problem is: getters and setters in xmlBeans retun null. I printed the
> xml- Fragments to stdout, everything is there. I can see the elements
> (type: xs:string), I can see there content, but the getter returns null.
> > Everything works quite fine if I deactivate the encryption (commented
> out the interceptor- beans in the spring- config- file), but as far as I use
> it, it breaks.
> > I have had this problem before when xmlBeans couldn't reach the schema
> associated to a xmlfragment, but the namespaces and so on looks quite fine.
> >
> > Are there any ideas what goes wrong?
> >
> > best regards,
> > Alex
> > --
> > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: user-help@xmlbeans.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

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


Re: Values vanished using encryption?

Posted by Jacob Danner <ja...@gmail.com>.
I know this (getters returning null) can happen if the instance is invalid.
Can you try validating the message with and without encryption and see
if there is some issue there causing it.

-jacobd

On Fri, Apr 9, 2010 at 5:08 AM, Alexander Kampmann <Ca...@gmx.de> wrote:
> hi,
>
> I'm not quite sure whether this is a xmlBeans issue or a CXF problem, so feel free to tell me, if I'm wrong here.
>
> I created a web service using CXF and spring. The databinding is xmlbeans. Communication between this service and a client is encrypted using cxf-wss-security interceptors.
> My problem is: getters and setters in xmlBeans retun null. I printed the xml- Fragments to stdout, everything is there. I can see the elements (type: xs:string), I can see there content, but the getter returns null.
> Everything works quite fine if I deactivate the encryption (commented out the interceptor- beans in the spring- config- file), but as far as I use it, it breaks.
> I have had this problem before when xmlBeans couldn't reach the schema associated to a xmlfragment, but the namespaces and so on looks quite fine.
>
> Are there any ideas what goes wrong?
>
> best regards,
> Alex
> --
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

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