#24 RequestCtx.encode method with nsURI needed

open
nobody
None
5
2007-06-30
2007-06-30
Anil Saldhana
No

There is a need for methods with the following signatures:

public void encode(OutputStream output, Indenter indenter, String nsURI) ;

public void encode(OutputStream output,String nsURI) ;

in the RequestCtx class. The reason is if you are trying to import the Request node into a document that created a soap message, then it will need a namespace on the Request.

The code will be:
// Prepare the indentation string
String topIndent = indenter.makeString();
out.println(topIndent + "<Request xmlns='"+nsURI+"'>");

Example usage:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
req.encode(baos, "urn:oasis:names:tc:xacml:2.0:context:schema:os");

Discussion

  • Roland Illig
    Roland Illig
    2008-08-03

    Logged In: YES
    user_id=608379
    Originator: NO

    Do you need this feature only on requests? What about the other top-level elements, like Policy, PolicySet and Response?