Is the content type header correct for secured MPI adaptor?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Is the content type header correct for secured MPI adaptor?

duncan
We are trying to switch from using the unsecured MPI adaptor to using the secured adaptor, but are running into problems when processing the headers.

Looking at the content type header produced from the non secured adaptor, it looks like this

application/soap+xml; action="FindCandidates"; charset=UTF-8

When we use the secured adaptor, it looks like the following (note how there is no semicolon after the soap+xml)

application/soap+xml charset=UTF-8

And we get this error when trying to process it (this is not Connect code base)

Error message was: Unable to internalize message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
        at com.sun.xml.messaging.saaj.soap.MessageImpl.parseContentType(MessageImpl.java:337)
       
Adding a break point and modifying the content type to include a semicolon gets us past the error. Can you confirm whether the content type header is how you would expect?

Any help appreciated - Duncan
Reply | Threaded
Open this post in threaded view
|

Re: Is the content type header correct for secured MPI adaptor?

matthew weaver
Hi Duncan, it seems like there should be semicolon between those values, Im not really sure why it's absent. We'll have to investigate...
Matthew Weaver
Lead Developer - CONNECT Product Team
Reply | Threaded
Open this post in threaded view
|

Re: Is the content type header correct for secured MPI adaptor?

Chad Freeman
Duncan/Matthew,

I too encountered this issue.  I believe the issue lies with the WsAddressingServiceEndpointDecorator class.  The removeActionFromContentType() method is called, is splitting the content-type by semicolon, but is never placing the semicolon(s) back in place when reconstructing the content-type after the action has been removed.  I have a hacky fix in place in my test configuration, but a proper fix probably should be put in place.


- Chad
Reply | Threaded
Open this post in threaded view
|

Re: Is the content type header correct for secured MPI adaptor?

matthew weaver
Thanks Chad. I have made an update, you can see the pull request here: https://github.com/CONNECT-Solution/CONNECT/pull/615

How does this look as a solution?
Matthew Weaver
Lead Developer - CONNECT Product Team
Reply | Threaded
Open this post in threaded view
|

Re: Is the content type header correct for secured MPI adaptor?

duncan
Very impressed with the turn around on that fix.

Are you aware of any work around for the issue (apart from using unsecured)?
Reply | Threaded
Open this post in threaded view
|

Re: Is the content type header correct for secured MPI adaptor?

Chad Freeman
In reply to this post by matthew weaver
Looks good Matthew.  Pretty slick with the regex. ;)
Reply | Threaded
Open this post in threaded view
|

RE: Is the content type header correct for secured MPI adaptor?

matt w

Google is my friendJ

 

@Duncan, the only work around would be to use unsecured or cherry pick the fix commit into your installation.

 

From: Chad Freeman [via CONNECT Forums] [mailto:ml-node+[hidden email]]
Sent: Wednesday, November 13, 2013 3:29 PM
To: Weaver, Matthew (CGI Federal)
Subject: Re: Is the content type header correct for secured MPI adaptor?

 

Looks good Matthew.  Pretty slick with the regex. ;)


If you reply to this email, your message will be added to the discussion below:

http://forums.connectopensource.org/Is-the-content-type-header-correct-for-secured-MPI-adaptor-tp7579200p7579216.html

To start a new topic under CONNECT Users, email [hidden email]
To unsubscribe from CONNECT Forums, click here.
NAML