Return-Path: Delivered-To: apmail-ws-fx-dev-archive@www.apache.org Received: (qmail 44409 invoked from network); 1 Nov 2005 08:24:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Nov 2005 08:24:07 -0000 Received: (qmail 25432 invoked by uid 500); 1 Nov 2005 08:24:06 -0000 Delivered-To: apmail-ws-fx-dev-archive@ws.apache.org Received: (qmail 25393 invoked by uid 500); 1 Nov 2005 08:24:05 -0000 Mailing-List: contact wss4j-dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list wss4j-dev@ws.apache.org Received: (qmail 25382 invoked by uid 99); 1 Nov 2005 08:24:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 00:24:05 -0800 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=HTML_MESSAGE,MAILTO_TO_SPAM_ADDR,PLING_QUERY,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of alex1353@gmail.com designates 66.249.82.201 as permitted sender) Received: from [66.249.82.201] (HELO xproxy.gmail.com) (66.249.82.201) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 00:24:00 -0800 Received: by xproxy.gmail.com with SMTP id t7so995673wxc for ; Tue, 01 Nov 2005 00:23:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:mime-version:content-type; b=aK8kOySnFWrNj8fiuyd35I8RJYESZ3KbgvITNI8S+mdyMiKMX8H+n6W9p98yHVSCBCUjwivyOxaHWQuU61u7NMVOxshS89tSAmN92+u65ig2n3DAFf7MFqxGYhO2oP2pj5wNY6XtFsGAaxnMLm4u3J65cPOnHgyG13T3TtNwhHk= Received: by 10.64.251.4 with SMTP id y4mr911082qbh; Tue, 01 Nov 2005 00:23:43 -0800 (PST) Received: by 10.65.163.14 with HTTP; Tue, 1 Nov 2005 00:23:43 -0800 (PST) Message-ID: <5a7217cf0511010023w16089860i979d255f7e387ed9@mail.gmail.com> Date: Tue, 1 Nov 2005 09:23:43 +0100 From: "Alex K." To: Ruchith Fernando Subject: Re: Problem !! embbeding an IssueSecurityToken to SOAPMessage ?? SOLVED Cc: wss4j-dev@ws.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13362_1457442.1130833423538" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_13362_1457442.1130833423538 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Ruchith It now works as it was supposed :0) - Alex On 10/30/05, Ruchith Fernando wrote: > > Hi Alex, > > I updated the serialization/deserialization of the message elements of > the WS-Trust requests. Now when you try to get the values they should > work properly. > > I noticed that u did : > sbe.setName(SRVConstants.SRV_REQ.toString()) > to set 'RequestSecurityToken' as the element local name. This is not > really necessary since it is added by IssueRequestSecurityToken. > > I'm not sure about the token type URI to be used for X509 Certs, (A > quick glance at the WS-Trust and WS-SecurityPolicy specs wasn't much > help :-( ) but will try to have a look at the constant value used in > WSE 3.0 impl [1] .. have to get hold of a Windows box and get the .NET > 2.0 and WSE 3.0 installed :-). > > Thanks > Ruchith > > > [1]http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/wse= ref/html/T_Microsoft_Web_Services2_Security_WSTrust_TokenTypes.asp > > > On 10/26/05, Alex K. wrote: > > Hi Ruchith, > > > > Unfortunately still I couldn't make any progress on this error. Have yo= u > > done something on it ?? > > > > Would you please take a look at it ? I really need to get it fixed !! > any > > estimation on when your work may get finished ? > > > > Thanks for any help ! > > > > Alex > > > > > > > > > > On 10/21/05, Ruchith Fernando wrote: > > > Hi Alex, > > > > > > Have a look this: > > > > > > http://mail-archives.apache.org/mod_mbox/ws-wss4j-dev/200508.mbox/%3C559c= 463d050831142314dacd7e@mail.gmail.com%3E > > > > > > It explains the current state of the > > > org.apache.ws.sandbox.security.trust.* stuff. > > > > > > maybe it'll help you get a better understanding of it :-) > > > > > > Thanks, > > > Ruchith > > > > > > On 10/21/05, Alex K. < alex1353@gmail.com> wrote: > > > > Thanks for ur reply. > > > > > > > > Yes I'm using the sanbox stuff. I try to dig dipper into this to se= e > if > > I > > > > can fix it. I just do my best but for sure you can always do it in > > better > > > > way :0) > > > > > > > > Cheers > > > > > > > > Alex. > > > > > > > > > > > > > > > > > > > > On 10/21/05, Ruchith Fernando wrote: > > > > > 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-Trus= t > > > > > 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 els= e > 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. wrote: > > > > > > I would be really appreciated for any help. I got stuck here an= d > 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. 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 th= e > tag > > > > "wst:" > > > > > > > for the TokenType and RequestType which is fine. Thought afte= r > > > > 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 =3Dnew SOAPEnvelope(); > > > > > > > SOAPBodyElement sbe =3Dnull; > > > > > > > Document requestDoc =3Dnull; > > > > > > > WSSConfig wssconfig =3D WSSConfig.getDefaultWSConfig(); > > > > > > > IssueRequestSecurityToken requestToken =3Dnull; > > > > > > > try { > > > > > > > requestDoc =3DstsReqSOAPMessage.getAsDocumen > > > > > > > > > > > > > > t(); > > > > > > > requestToken =3Dnew > > > > IssueRequestSecurityToken(requestDoc); > > > > > > > > > > > > > > // just for test > > > > > > > > > > > > > > > > > > > requestToken.setRequestType(TrustConstants.ISSUE_SECURITY_TOKEN); > > > > > > > requestToken.setTokenType (WSConstants.X509TOKEN_NS); > > > > > > > > > > > > > > logger.debug(requestToken.toString ()); > > > > > > > > > > > > > > > > > > > > > sbe =3Dnew SOAPBodyElement( requestToken.getElement()); > > > > > > > > > > > > > > sbe.setName (SRVConstants.SRV_REQ.toString()); > > > > > > > reqSOAPMessage.addBodyElement(sbe); > > > > > > > > > > > > > > logger.debug(reqSOAPMessage.toString()); > > > > > > > ...... OUT PUT > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > // SecurityTokenElement > > > > > > > > > > > > > > > > > > > > http://schemas.xmlsoap.org/ws/2005/02/trust" > > > > > > > > > > > > > > > > > > > > http://schemas.xmlsoap.org/ws/2005/02/trust/Issue > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil= e-=3D > > > > > > > 1.0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > //SOAPEnvelope after embbeding requestSecurityToken > > > > > > > > > > > > http://schemas.xmlsoap.org/soap/envelope=3D > > > > > > > /" > > > > > > > xmlns:xsd=3DD"http://www.w3.org/2001/XMLSchema " > > > > > > xmlns:xsi=3D" > > > > > > > http://www.w3.org/2001/XMLSchema-instance" > > > > > > > > > xmlns:ns1=3D" > > > > > > > http://schemas.xmlsoap.org/ws/2005/02/trust"> > > > > > > > > > > > > > > > > > > > http://schemas.xmlsoap.org/ws/2005/02/trust/Issue > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profil= e-=3D > > > > > > > 1.0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Ruchith > > > > > > > > > > > > > > > > > > > > > > -- > > > Ruchith > > > > > > > > > > -- > Ruchith > ------=_Part_13362_1457442.1130833423538 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks Ruchith

It now works as it was supposed :0)

- Alex

 
On 10/30/05, Ruchith Fernando <ruchith.fernando@gmail.com> wrote:
Hi Alex,

I updated the serialization/deserialization of the message = elements of
the WS-Trust requests. Now when you try to get the values th= ey should
work properly.

I noticed that u did :
sbe.setName (SRVConstants.SRV_REQ.toString())
to set 'RequestSecurityToken' as the e= lement local name. This is not
really necessary since it is added by Iss= ueRequestSecurityToken.

I'm not sure about the token type URI to be = used for X509 Certs, (A
quick glance at the WS-Trust and WS-SecurityPolicy specs wasn't muchhelp :-( ) but will try to have a look at the constant value used in
WS= E 3.0 impl [1] .. have to get hold of a Windows box and get the .NET
2.0 and WSE 3.0 installed :-).

Thanks
Ruchith

[1]http://ms= dn.microsoft.com/library/default.asp?url=3D/library/en-us/wseref/html/T_Mic= rosoft_Web_Services2_Security_WSTrust_TokenTypes.asp


On 10/26/05= , Alex K. < alex1353@gmail.com> wrote:
= > Hi Ruchith,
>
>  Unfortunately still I couldn't = make any progress on this error. Have you
> done something on it ??>
>  Would you please take a look at it ?  I really ne= ed to get it fixed !! any
> estimation on when your work may get fini= shed ?
>
>  Thanks for any help !
>
>&nbs= p; Alex
>
>
>
>
> On 10/21/05, Ruchith Fernando <ruchith.fernando@gmail.com> wrote:
> >= ; Hi Alex,
> >
> > Have a look this:
> >
>= =20 http://mail-archives.apa= che.org/mod_mbox/ws-wss4j-dev/200508.mbox/%3C559c463d050831142314dacd7e@mai= l.gmail.com%3E
> >
> > It explains the current state of the
>= > org.apache.ws.sandbox.security.trust.* stuff.
> >
> &g= t; maybe it'll help you get a better understanding of it :-)
> >
> > Thanks,
> > Ruchith
> >
> > On 10/= 21/05, Alex K. < alex1353@gmail.co= m> wrote:
> > > Thanks for ur reply.
> > >
> > >  Yes I'm using the sanbox stuff. I try to dig = dipper into this to see if
> I
> > > can fix it. I just d= o my best but for sure you can always do it in
> better
> > = > way :0)
> > >
> > >  Cheers
> > >> > >  Alex.
> > >
> > >
>= ; > >
> > >
> > > On 10/21/05, Ruchith Fernan= do < ruchith.fernando@gmail.com> wrote:
> > > > Hi
>= > > >
> > > > Very sorry about the delay in replyi= ng.
> > > >
> > > > I guess you are using
> > > org.apache.ws.sandbox.security.trust.* since I
> &= gt; > > 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.tok= en.RequestSecurityToken
> > > > then, its a part of an objec= t model that I am working on, and
> > > > unfortunately its NOT complete and not tested as we= ll :-(. 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 t= o use the
> > > > org.apache.ws.sandbox.security.trust.messa= ge.token.*
> > > stuff yet.
> > > >
> >= > > Thanks,
> > > > Ruchith
> > > >
> > > &g= t;
> > > > On 10/21/05, Alex K. <alex1353@gmail.com> 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"
> ???
> > > > >
> > > > > &= nbsp;Thanks
> > > > >
> > > > > &n= bsp;Alex.
> > > > >
> > > > >
> &= gt; > > > On 10/20/05, Alex K. < alex1353@gmail.com> wrote:
= > > > > > >
> > > > > > Hi,
> = > > > > >
> > > > > > 1) I'm running th= e below code to generate an
> IssueRequestSeurityToken
> > > and
> > > &= gt; > embed
> > > > > > it to a SOAPMessage .. By c= reating the securityToken I get the tag
> > > "wst:"
> > > > > > for the TokenType and RequestType which i= s fine. Thought after
> > > generating
> > > > &= gt; > the SOAPMessage I get "NS1:" tag for these elements whic= h makes me
> > > unable
> > > > > to
> > > = > > > get their value later by calling getTokenType() and
> = getRequestType()
> > > (they
> > > > > > a= lways return null).
> > > > > >
> > > > > > I have e= nclosed the related output as well .
> > > > > >
&g= t; > > > > > What am I doing wrong here ??
> > >= > > >
> > > > > > 2) What is the constant value for X509 ce= rtificates ???
> > > > > >
> > > > >= > Thanks for any help
> > > > > >
> > >= ; > > > Alex.
> > > > > >
> > > > > >
> = > > > > > /*''''''''''''''''''''''''''''''''''''''''''''
= > CODE
> > > > > ''''*/
> > > > > &g= t;
> > > > > >
> > > > > > SOAPEnve= lope reqSOAPMessage =3Dnew SOAPEnvelope();
> > > > > >= SOAPBodyElement sbe =3Dnull;
> > > > > > Document req= uestDoc =3Dnull;
> > > > > > WSSConfig wssconfig =3D WSSConfig.getDefa= ultWSConfig();
> > > > > > IssueRequestSecurityToken r= equestToken =3Dnull;
> > > > > > try {
> > &g= t; > > > requestDoc =3D stsReqSOAPMessage.getAsDocumen
> > > > > >
> >= ; > > > > t();
> > > > > > requestToken = =3Dnew
> > > IssueRequestSecurityToken(requestDoc);
> >= ; > > > >
> > > > > > // just for test
> > > > &= gt; >
> > > > >
> > >
> requestToken= .setRequestType(TrustConstants.ISSUE_SECURITY_TOKEN);
> > > >= ; > >=20 requestToken.setTokenType (WSConstants.X509TOKEN_NS);
> > > >= ; > >
> > > > > > logger.debug(requestToken.toSt= ring ());
> > > > > >
> > > > > >
> > > > > > sbe =3Dnew SOAPBodyElement( requestToken.= getElement());
> > > > > >
> > > > >= > sbe.setName (SRVConstants.SRV_REQ.toString());
> > > >= > >=20 reqSOAPMessage.addBodyElement(sbe);
> > > > > >
>= ; > > > > > logger.debug(reqSOAPMessage.toString());
>= > > > > > ...... OUT PUT
> > > > > >
> > > > >
> > > > >
> > > = > > >
> > > > > > // SecurityTokenElement
= > > > > > >
> > > > > > <wst:Requ= estSecurityToken xmlns:wst=3D"
> > > > > > http://schemas.xmlsoap.org/ws/2005/02/trust" = >
> > > > > >
> > > > >
> &= gt; >
> <wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue> > > > > > </wst:RequestType>
> > > &= gt; > > <wst:TokenType>
> > > > > >
> > > > >
> > = >
> http://docs.oasis-open.org/wss/2004/01/oasis-2= 00401-wss-x509-token-profile-=3D
> > > > > > 1.0
> > > > > > = </wst:TokenType>
> > > > > > </wst:RequestSec= urityToken>
> > > > > >
> > > > >= > //SOAPEnvelope after embbeding requestSecurityToken
> > > > > > <soapenv:Envelope xmlns:soapenv=3D&quo= t;
> > > > > http://schemas.xmlsoap.org/soap/envelope=3D
> > &g= t; > > > /"
> > > > > > xmlns:xsd=3DD"http://www.w3.org/2001/XMLSchema "
> = > > > > xmlns:xsi=3D"
> > > > > > http://www.w3.org/2001/XMLSchema-instance" >
> > > = > > > <soapenv:Body><ns1:RequestSecurityToken
> xml= ns:ns1=3D"
> > > > > > http://schemas.xmlsoap.org/ws/2005/02/trust">
> > >= > > >
> > > > >
> > > <ns1:Reque= stType>
> http://schemas.xmlsoap.org/ws/2005/02/trust/Issue
> > > >= ; > > </ns1:RequestType>
> > > > > > <n= s1:TokenType>
> > > > > >
> > > > &g= t;
> > >
> http://docs.oasis-open.org/wss/2= 004/01/oasis-200401-wss-x509-token-profile-=3D
> > > > &= gt; >=20 1.0
> > > > > > </ns1:TokenType>
> > &g= t; > > > </ns1:RequestSecurityToken> </soapenv:Body>> > > > > > </soapenv:Envelope>
> > >= > >
> > > > >
> > > >
> > > ><= br>> > > > --
> > > > Ruchith
> > > = >
> > >
> > >
> >
> >
> = > --
> > Ruchith
> >
>
>


--
Ruchith=

------=_Part_13362_1457442.1130833423538--