Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Casting problem for User Defined Outgoing Soap Headers #38

Closed
AaronLawUS opened this issue Mar 10, 2014 · 6 comments
Closed

Casting problem for User Defined Outgoing Soap Headers #38

AaronLawUS opened this issue Mar 10, 2014 · 6 comments
Assignees

Comments

@AaronLawUS
Copy link

I found this issue in IPF 2.6.0 release, I found this same issue in my 2.7.x code base synced back in mid Feb.

In HeaderUtiles.java (line 177 of processUserDefinedOutgoingSoapHeaders method),
the cast type should be Map.class instead of List.class.

It is because, the message header is generally defined as a Map not a List. I ran into cast failure when I added user defined outgoing SOAP HEADER as a Map in my CXF/Camel flow.

The corresponding processUserDefinedOutgoingHttpHeaders() method has the correct casting type of Map.class in line 235.

I could fix and deliver this problem if this is confirmed to be a problem.

Thanks

@AaronLawUS
Copy link
Author

I understand that the final soapHeaders is just a List

, but seems like we are missing a step to get OUTGOING_SOAP_HEADERS from its original Map form before getting the collection of values as list.

Map<QName, Header> userHeadersMap = CastUtils.cast( ... , Map.class));
List

userHeaders = CastUtils.cast(userHeadersMap.values(), List.class));

@unixoid unixoid self-assigned this Mar 11, 2014
@unixoid
Copy link
Member

unixoid commented Mar 11, 2014

Ok, supporting Map along with List would really make sense. I'll fix that.

@unixoid
Copy link
Member

unixoid commented Mar 11, 2014

Code committed, documentation updated (http://openehealth.org/display/ipf2/ws-common-protocol-headers)

@unixoid unixoid closed this as completed Mar 11, 2014
@AaronLawUS
Copy link
Author

Thanks for the fix promptly. This will be in 2.6.1 release, right? Thanks.

@unixoid
Copy link
Member

unixoid commented Mar 11, 2014

Question to Boris...

@stanojevic-boris
Copy link
Member

This will be in 2.6.1 release, right?
Right!!

Cheers,
Boris

2014-03-12 0:40 GMT+01:00 Dmytro Rud notifications@github.com:

Question to Boris...

Reply to this email directly or view it on GitHubhttps://github.com//issues/38#issuecomment-37359924
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants