Skip to content

WSTrustResponseWriter output context as empty string #161

@matejsp

Description

@matejsp

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);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions