This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

How do I extract information from a soap header and pass it to the endpointPage Title Module

Injecting various objects as method parameters (such as MessageContext, and maybe others), is a major feature, and therefore not something I can do in the 1.5 timeline though. It will be something for the next major release.

Comment

I can't understand why open a JIRA issue for something that can be already done as required by Rahul Mishra.
I explain how:

1)I define a request scoped bean both in the interceptor and in the endpoint that can be also an AbstractMarshallingPayloadEndpoint with automatic marshalling/unmarshalling of SOAP body
2)In the interceptor I read the SOAP Header and can Unmarshal it to a object using Jibx , JAXB or what I want es:

Comment

I am not sure how to unmarshall soap header elements can you explain it a bit. I a, trying to get a particular soap header element named session. after that i want to unmarshall it using jaxb. but not exaxtly sure how to do it. Here what my interceptor code looks like

Comment

Just to add to my last post i thought of creating object manually for now and setting it in the request scope bean. I defined a request scoped bean which is being referred by interceptor and endpoint both. Then i created the Java object manually in interceptor and i set it into the request scoped bean. But i am still not able to access this object in the endpoint. I think there is some issue in my configurations.

Comment

Thanks for the reply. I have been able to unmarshall Soap header into Java object. But i am still not able to access the Soapheader in endpoint. I have looked at your configurations and i am still not sure what am i missing .

Can you please also share the code of your it.almaviva.model.springws.integrazione.Integrazio neImpl class.

Comment

Alright, it is working now. Actually it was working earlier as well the problem was that i wasn't using the scoped bean within my end point. i was just looking at the bean using debugger which is showing a null value.

Once i got this bean within my endpoint it started showing header values.

Thanks for you help.
Muein

Comment

I'm currently implenting Spring web services and I kind of stuck in this same situation as well. It is good thing to know I can use a request scope bean for this scenario but I noticed that this has been a year ago. I wonder if the new release of Spring web service already implemented a different approach to handle this?