users@glassfish.java.net

RE: error while accesing secure service

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 22 Jun 2010 09:10:00 -0400

display web.xml to determine configurations which may have missing resources

also display wsit-<package>.<service>.xml (server side configuration) to determine configurations which may have missing resources
wsit-client.xml (client side configuration) to determine configurations which may have missing configurations.


did you include the resource code ?

      11. The STS wizard creates an empty implementation of provider class. Implement the provider implementation class by copying the following code into the MySTS.java file:
             1. Add these import statements to the list of imports:

                  import com.sun.xml.ws.security.trust.sts.BaseSTSImpl;
                  import javax.annotation.Resource;
                  import javax.xml.ws.Provider;
                  import javax.xml.ws.Service;
                  import javax.xml.ws.ServiceMode;
                  import javax.xml.ws.WebServiceContext;
                  import javax.xml.ws.WebServiceProvider;
                  import javax.xml.transform.Source;
                  import javax.xml.ws.handler.MessageContext;


             2. Add the following Resource annotation after the line
                public class MySTS implements javax.xml.ws.Provider<Source> {

                  @Resource protected WebServiceContext context;


             3. Change the following line of code:

                  public class MySTS implements javax.xml.ws.Provider<Source>

                to:

                  public class MySTS extends BaseSTSImpl implements javax.xml.ws.Provider<Source>


             4. For the invoke method, replace the return null line with the following return statement:

                  return super.invoke(source);


             5. Add the following method after the invoke method:

                  protected MessageContext getMessageContext() {
                    MessageContext msgCtx = context.getMessageContext();
                    return msgCtx;
                  }

Add the WSIT-users
http://docs.sun.com/app/docs/doc/820-1072/6ncp48v4e?a=view


also once you have a valid implementation of WebServiceContext make SURE the specified user (the name you used for adding WSIT-user) is in role

http://java.sun.com/javase/6/docs/api/javax/xml/ws/WebServiceContext.html#isUserInRole%28java.lang.String%29


Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 

> Date: Tue, 22 Jun 2010 04:32:15 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Re: RE: error while accesing secure service
>
> yeah i followed instructions mentioned in WSIT tutorial. i also given same application names.could you pls explain why this error is coming?
> [Message sent by forum member 'alishacse']
>
> http://forums.java.net/jive/thread.jspa?messageID=475344
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3