Daniel you seem to be an expert ;)

Do you have any idea about my problems?

I evolve a little about the soap header:

public Object getServiceObject(Exchange arg0) {
        Message mess = arg0.getInMessage();
        ArrayList lst =
(ArrayList)mess.get(org.apache.cxf.headers.Header.HEADER_LIST);
        QName qn = new QName("myNeed");
        for(int i=0;i<lst.size();i++)
        {
                SoapHeader header = (SoapHeader) lst.get(i);
                if(header.getName().equals(qn))
                {
                        System.out.println("Value: " +
header.getObject()); //Always empty :(
                }
        }
...
}
The problem is that the getObject returns empty Object :(


-----Original Message-----
From: Maxime Orain 
Sent: 28 July 2008 15:32
To: [email protected]
Subject: Migration from XFire : Invoker / Soap Header / null parameters

This is my first message on this list so hello to all!

 

I've been working with XFire with my projects for a while and now the IT
permits us to use Java 1.5 so we decide to test CXF! :-)

 

For the migration part I've got some problems:

 

1)       Invoker: 

a.       How declare it in the configuration file? I found those pages
(http://cwiki.apache.org/CXF20DOC/invokers.html ,
http://cwiki.apache.org/CXF20DOC/xfire-migration-guide.html ) it's ok
for the programmatically part but I need to do it in configuration file.
Is someone has an idea?

b.       In XFire the Invoker has a MessageContext object as parameter
type of the invoke method. This object permits to access to the soap
headers but now we get an Exchange object and I don't know how to access
to the Soap Header with this object. Is someone knows how to do this?

2)       How declare method parameters nillable? In XFire we did it via
the Aegis now is it possible to do this with annotation?  I think that a
bug is already open but I need confirmation about this. (Bug
<https://issues.apache.org/jira/browse/CXF-1530> )

 

If someone could help me it will be very appreciated!

 

Thanks in advance,

 

Maxime Orain
Software Engineer


Reply via email to