Hi
Very sorry about the delay in replying.
I guess you are using org.apache.ws.sandbox.security.trust.* since I
see that the namespaces generated is according to the new WS-Trust
spec (2005/02).
If the class that u are using is
org.apache.ws.sandbox.security.trust.message.token.RequestSecurityToken
then, its a part of an object model that I am working on, and
unfortunately its NOT complete and not tested as well :-(. Hopefully
I'll be able to spend some time on it and get it finished. Or else you
are welcome to fix anything and send a patch :-).
Therefore my advice is not to use the
org.apache.ws.sandbox.security.trust.message.token.* stuff yet.
Thanks,
Ruchith
On 10/21/05, Alex K. <[EMAIL PROTECTED]> wrote:
> I would be really appreciated for any help. I got stuck here and no idea how
> to solve it. I'm wondering why after adding the body element (see the below
> code) to SOAP message "wst:RequestSecurityToken" changes to "/ns1" ???
>
> Thanks
>
> Alex.
>
>
> On 10/20/05, Alex K. <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > 1) I'm running the below code to generate an IssueRequestSeurityToken and
> embed
> > it to a SOAPMessage .. By creating the securityToken I get the tag "wst:"
> > for the TokenType and RequestType which is fine. Thought after generating
> > the SOAPMessage I get "NS1:" tag for these elements which makes me unable
> to
> > get their value later by calling getTokenType() and getRequestType() (they
> > always return null).
> >
> > I have enclosed the related output as well .
> >
> > What am I doing wrong here ??
> >
> > 2) What is the constant value for X509 certificates ???
> >
> > Thanks for any help
> >
> > Alex.
> >
> >
> > /*'''''''''''''''''''''''''''''''''''''''''''' CODE
> ''''*/
> >
> >
> > SOAPEnvelope reqSOAPMessage =new SOAPEnvelope();
> > SOAPBodyElement sbe =null;
> > Document requestDoc =null;
> > WSSConfig wssconfig =WSSConfig.getDefaultWSConfig();
> > IssueRequestSecurityToken requestToken =null;
> > try {
> > requestDoc =stsReqSOAPMessage.getAsDocumen
> >
> > t();
> > requestToken =new IssueRequestSecurityToken(requestDoc);
> >
> > // just for test
> >
> requestToken.setRequestType(TrustConstants.ISSUE_SECURITY_TOKEN);
> > requestToken.setTokenType(WSConstants.X509TOKEN_NS);
> >
> > logger.debug(requestToken.toString());
> >
> >
> > sbe =new SOAPBodyElement( requestToken.getElement());
> >
> > sbe.setName(SRVConstants.SRV_REQ.toString());
> > reqSOAPMessage.addBodyElement(sbe);
> >
> > logger.debug(reqSOAPMessage.toString());
> > ...... OUT PUT
> >
>
>
> >
> > // SecurityTokenElement
> >
> > <wst:RequestSecurityToken xmlns:wst="
> > http://schemas.xmlsoap.org/ws/2005/02/trust">
> >
> <wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue
> > </wst:RequestType>
> > <wst:TokenType>
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-=
> > 1.0
> > </wst:TokenType>
> > </wst:RequestSecurityToken>
> >
> > //SOAPEnvelope after embbeding requestSecurityToken
> > <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope=
> > /"
> > xmlns:xsd=D"http://www.w3.org/2001/XMLSchema "
> xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance" >
> > <soapenv:Body><ns1:RequestSecurityToken xmlns:ns1="
> > http://schemas.xmlsoap.org/ws/2005/02/trust">
> >
> <ns1:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue
> > </ns1:RequestType>
> > <ns1:TokenType>
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-=
> > 1.0
> > </ns1:TokenType>
> > </ns1:RequestSecurityToken> </soapenv:Body>
> > </soapenv:Envelope>
>
>
--
Ruchith
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]