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

WSTrustResponseWriter output context as empty string #161

Open
matejsp opened this issue Apr 12, 2013 · 1 comment
Open

WSTrustResponseWriter output context as empty string #161

matejsp opened this issue Apr 12, 2013 · 1 comment

Comments

@matejsp
Copy link

matejsp commented Apr 12, 2013

request is:

 <trust:RequestSecurityToken xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512">

response is:

  <wst:RequestSecurityTokenResponseCollection xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
     <wst:RequestSecurityTokenResponse Context="">

but should be:

  <wst:RequestSecurityTokenResponseCollection xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
    <wst:RequestSecurityTokenResponse>

FIX inside WSTrustResponseWriter.java (added if (context != null) { ... }):

private void write(RequestSecurityTokenResponse response) throws ProcessingException {
    // write the response element and the context attribute.
    StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.RSTR, WSTrustConstants.BASE_NAMESPACE);
    String context = response.getContext();
    if (context != null) {
        StaxUtil.writeAttribute(this.writer, WSTrustConstants.RST_CONTEXT, context);
    }
@anilsaldhana
Copy link
Contributor

Please send a pull request.

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

2 participants