Error in getting Username from UserPrincipal in WSRP Producer

Hi,
In WSRP Producer,we are trying to get the the username from the UserPrincipal which was sent by the consumer.
String userID = this.getRequest().getUserPrincipal().getName();
I'm getting an Null pointer exception in one of the Producer but the same kind of code is working in other producer.
The two producers are in different domains. And the Consumer is same for the both Producers.
Could anybody help me to find out what went wrong. ?
Thanks,
Mohan

Hello,
It is likely that your two producers are configured differently for security (SAML). For the producer that isn't working, it is likely that you just need the proper entries in your key store to get it to work. Look at the key store for the producer that is working, and try to ensure the other producer is similarly configured.
Kevin

Similar Messages

  • How to get username from customer email id.

    Hi experts,
    How to get username from customer email id.I am using transaction XD02.
    I would be thankful for your kind replies .
    Regards,
    Sachin Hada

    Hi sachin,
    Re: Email id field
    Regards,
    Sravanthi

  • Get username from session and retrieve records from database wit tat userna

    hello..
    i got a ChangePassword.jsp which i retrieve the username from session using bean to display on e page..
    <jsp:getProperty name="UsernamePassword" property = "username"/>
    but in my servlet, i wan to retrieve records from database with tat username..
    i tot of coding
    String username = (String)request.getSession().getAttribute("UsernamePassword");
    and then use tat username to retrieve records.. but is that e right way? The page did not display and i got a CastingException..
    Please help.

    If you are using the session inside a jsp, you can say "session" without having to declare it.String usernamePassword = (String) session.getAttribute("usernamePassword");However, right after you get this value, check if it is null:
    if(usernamePassword==null)
    // do sth like forward to error page
    else
    // continue processing
    If it is null, then you are probably not setting it right in the first place. Make sure that in your servlet A you create a session, and before you return or forward to a jsp, that you actually set this value in the session like saying
    session.setAttribute("usernamePassword", usernamePassword);
    and it is case sensitive for the key.

  • Error while getting  image from database in SUP using ios?

    Hi All,
      Im developing native iOS application using sup 2.1.3 . Im getting error While retrieving  image from SUP database. Here i'm trying to get image from database and show in imageView.can any one help me how to fix this issue?
    In database image datatype is  'LONG Binary' .
    My table Schema:
    CREATE TABLE dba.ImagesTable (
    RowID INT NOT NULL,
    ImageName VARCHAR(20) NOT NULL,
    PhotoData LONG BINARY NOT NULL,
    IN SYSTEM
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA137 PRIMARY KEY CLUSTERED (RowID)
    ALTER TABLE dba.ImagesTable
      ADD CONSTRAINT ASA138 UNIQUE NONCLUSTERED (RowID)
    in Xcode:
                [SUP107SUP107DB synchronize];
                SUP107ImagesTable *imgTable =[[SUP107ImagesTable alloc]init];
                SUP107ImagesTableList *list =[SUP107ImagesTable findAll];
                SUP107ImagesTable * oneRecord =[list objectAtIndex:0];
                NSLog(@"rowId:%d---imageName:%@---photoData:%@---photoLenght:%d",oneRecord.rowID,oneRecord.imageName,oneRecord.photoData,oneRecord.photoDataLength);
                NSData *tempData =[[NSData alloc]init];
                SUPBigBinary *responseBinaryData = (SUPBigBinary *)oneRecord.photoData.value;
                @try {
                    [responseBinaryData openForWrite:[oneRecord.photoData length]];
                    [responseBinaryData write:tempData];
                @catch (NSException *exception) {
                    NSLog(@"exception: %@",[exception description]);
                UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(50,50,100,100)];
                [self.window addSubview:imgView];
                UIImage * tempImage =[UIImage imageWithData:tempData];
                imgView.image = tempImage;
                [responseBinaryData close];
    Error Log:
    2014-04-02 18:42:15.150 SUP102[2873:70b] rowId:1---imageName:Apple---photoData:SUPBigBinary: column=c pending=1 allow_pending_state=1 table=sup107_1_0_imagestable mbo=0x0 key=(null) ---photoLenght:90656
    Printing description of responseBinaryData:
    <OS_dispatch_data: data[0xc891b40] = { leaf, size = 90656, buf = 0x1213a000 }>
    2014-04-02 18:42:33.304 SUP102[2873:70b] -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] exception: -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.305 SUP102[2873:70b] -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40
    2014-04-02 18:42:33.306 SUP102[2873:70b] [ERROR] [AppDelegate.m:497] NSInvalidArgumentException: -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40

    This thread talks about uploading image to SAP from a IOS device,Sending Image to SAP via iOS Native app (SUP 2.1.3)
    Midhun VP

  • Getting username from an applet

    I'm writing a program (an applet) that needs to get the username from a windows 2000 platform. Is that possible? I guess I need to set a security policy-file... Can someone leed me on the right way?

    It would be possible in an application to just do this:
    String userName = System.getProperty("user.name");But for security reasons it can't be done like this in an applet.
    Some info about signing applets from here:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=152882
    And if that doesn't help, you can search for some more resources at the forums and java.sun.com

  • Security - Hackers Getting Usernames from Open Directory

    Hello,
    My logs indicate that someone from an outside IP has been trying to log-in to our MacOS X Server using AFP and SMB protocols. It appears they already know what usernames to try but they do not know the passwords. They even know about "test" accounts that were created, used temporarily and then set to "disabled" using Workgroup Manager.
    My question is: How did they learn which usernames? The server was just setup yesterday and the 10 users were added less than 24hrs ago.
    There was a period of a couple hours tonight where the built-in MacOS X Server firewall was stopped because other network routing parameters were being configured. Is there a way that someone can request a list of all usernames from the Open Directory without having to authenticate to it first?
    Port 625 is 'Remote Directory Access' - Could someone connect to that port and ask for a list of all users?
    Any theories would be appreciated. Firewall has since been re-enabled and the logs have gone mute again.

    If you're using an Open Directory master, the directory is a public resource. The LDAP port is 389. If you do not need outside access, you can block that port. That said, usernames are generally not considered a security feature. Users need to have strong passwords. I recommend using the policy settings to require users to pick passwords that will not be in hacker dictionaries. Go to Server Admin -> Open Directory -> Settings -> Policy. A reasonable first bid for security is to choose, "differ from account name," the following two for require a letter and a number, and passwords should contain at least 6 characters.

  • Error in Getting Details from SAP by BAPI_MATERIAL_GET_DETAIL

    Hi All,
    I am trying to get the material info from SAP by webDynPro.
    My Input Parameter is Material(IMPORT PARAMETER) and out put is Matrial_general_data(EXPORT PARAMETER).
    In the implementation of method in
    wdDoInit().
    Bapi_Material_Get_Detail_Input input = new Bapi_Material_Get_Detail_Input();
        wdContext.nodeBapi_Material_Get_Detail_Input().bind(input);
    what is the object I have to initiate for material Parameter.
    //for input data Material     
        Matnr bapimat = new Matnr();
    I tried in different way I am getting error.
    Thanks & Regards,
    Ram

    Hi Srinivasa,
             What is the error you are getting?Did you try setting in all the values required for the Input paramater fields and structures?
    Regards,
    Uma.

  • How do i fix an error when getting apps from app store

    I sometimes get an error after trying to buy an app or a free app or even updating, and just before I enter my Apple ID password. Here's a screenshot of the error message. I wonder if anyone can help me fix this.

    Thank you J Hermans, my problem actually is, that error message comes up when I try to install any app from the
    appstore. I have that tangram! installed too.
    At first the message was just like "tangram! Could not be purchased....." when i tried to update a different app. Then every time that I try to get an app from the appstore, the message adds up like "tangram! and 1 other item.....". Then "tangram! And 2 other items..." and so on..

  • How to get username from Form-based login

    I am using form-based login in my web.xml file.
    When I attempt to access a protected .jsp page, I get sent to my login page as expected.
    When I enter my username/password successfully it forwards me to the .jsp page I was trying to go to, as expected.
    From that .jsp page, how do I get the username/password info from the login form? I looked at the session attributes, request attributes, and request parameters, but I don't see anything. Does the form-based authentication remove these variables?
    I need the username that is filled out in the login form, so that I can do custom work with it. I cannot ask the user for it again after they login, as that is inefficient and sloppy.

    Found it.
    request.getUserPrincipal().getName()

  • How to get username from AssignedTo item using Powershell with CSOM?

    Hi all:
    I have a Powershel script with CSOM to extract some information from a list in SP2010, however I can’t get the user name associated to the field ‘AssignedTo’. It seems that in order to extract information from this field you need to use ‘Microsoft.SharePoint.Client.FieldLookupValue’
    however I don’t know how to do that with Powershell.
    Thank you very much for your help
    Regards

    Hi Jaydeep:
    The sentence "New-Object Microsoft.SharePoint.SPFieldUserValue" failed, however, I just added this to get the User Name:
    $item["AssignedTo"].lookupvalue
    I don't know if it is the best solution but it shows the UserName.
    Thank you very much
    Regards
    Carlos Negroni

  • Error in getting details from Bapi BAPI_ALM_ORDER_GET_DETAIL

    Hi,
    I have created Maintenance order by using the bapi BAPI_ALM_ORDER_MAINTAIN.I have used BAPI_ALM_ORDER_GET_DETAIL to get the created maintenance order details.
    i have given the Maintenance order no(4000030) as input for this BAPi(BAPI_ALM_ORDER_GET_DETAIL ).I got the error as "Error reading the 4000030 order in the document table".
    Please any one give me the solution for this and how to get the details for the created maintenance order.
    Thanks,
    guru.

    Hi ,
    In my case the problem is the data is not saving into SAP.I have used customized bapi.
    I think it will be  the same problem for you.Afterusing  this Bapi BAPI_ALM_ORDER_GET_DETAIL you need to commit it inorder to save the data into SAP.So you have to use BAPI_TRANSACTION_COMMIT.
    If you are calling the BAPi BAPI_ALM_ORDER_GET_DETAIL from  xMII , the data will not save in SAP even though you use COMMIT bapi.In that case you need to use Customized Bapi.
    Thanks
    guru.

  • "Download error" when getting songs from iTunes on iPod touch 2G

    Hi all. Recently I've been getting a "Download Error. Tap to retry" message when I'm downloading songs from iTunes on my iPod Touch. It doesn't always happen, but seems to happen most if I leave the Download screen before the song is done downloading and processing. Even though it says "Tap to retry", when I do that, it just errors again. This continues, with frequent pop-up prompts asking for my iTunes password, until I connect my Touch back to iTunes.
    I was curious if other people had the same problem and if there is a fix for this or if I just need to stay on the download screen until the song is done.
    I have a 32gig iPod Touch 2nd Gen with the latest OS.
    Thanks for any info.

    Basics from the manual are:
    Restart, reset, restore
    http://manuals.info.apple.com/enUS/iPod_touch_3.1_UserGuide.pdf

  • How to get username from audible account if one is associated with the store account

    So, I noticed, while de-authorizing a previous computer of an itunes store account, that an audible account was available for deauthorization as well.  I never authorized an audible account, and I'm not getting any help from apple about retaining a username if you never created one.  shady

    Have you ever had an account with audible.com ? If not then you won't have one to deauthorise - the option to deauthorise one shows in the Advanced menu on my iTunes, even though I haven't currently got one authorised on it. If you have got an audible account and you have authorised it on that computer then Apple won't know what it is, as the account would be with audible.com, not Apple.

  • J2ME error to get value from variable in another class

    hi,,
    i write code for a mobile application like a tour guide..
    i had create 5 class for this application, KutaBeachDictionary MIDlet class, ListMainMenu List class, ListMenuHotel List class, HotelDes01 Form class and the last Hotel class that store all information.
    the problem is, i have [choose] variable in ListMenuHotel that contain getSelectedIndex() value, i want to take [choose] value from ListMenuHotel class to [index] variable in HotelDes01, so it determine the name of hotel that will display in form.but the index always 0 although i had choosen different menu from ListMenuHotel..
    here is all code
    in MIDlet class
    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.midlet.MIDlet;
    public class KutaBeachDictionary extends MIDlet {
        public KutaBeachDictionary() {
            lstMenuUtama = new ListMenuUtama(this);
            lstMenuHotel = new ListMenuHotel(this);
            htlDes1 = new HotelDes01(this);
            frmLoading = new FormLoading(this);
        public Display getDisplay() {
            return Display.getDisplay(this);
        public void exitMIDlet() {
            switchDisplayable(null, null);
            destroyApp(true);
            notifyDestroyed();
        public void startApp() {
            if (midletPaused) {
                resumeMIDlet();
            } else {
                initialize();
                startMIDlet();
            midletPaused = false;
            getDisplay().setCurrent(frmLoading);
            new Thread(frmLoading).start();
            frmLoading.done = false;
            frmLoading.gLoading.setValue(0);
        public void pauseApp() {
            midletPaused = true;
        public void destroyApp(boolean unconditional) {
        private boolean midletPaused = false;
        public ListMenuHotel lstMenuHotel;
        public ListMenuRestaurant lstMenuRestaurant;
        ListMenuUtama lstMenuUtama;
        FormAbout frmAbout;
        public HotelDes01 htlDes1;
        FormLoading frmLoading;
    }the code in ListMenuHotel
    import java.io.IOException;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.List;
    import javax.microedition.lcdui.Ticker;
    public class ListMenuHotel extends List implements CommandListener {
        Hotel objHotel = new Hotel();
        ListMenuHotel(KutaBeachDictionary run) {
            super("List Hotel", List.IMPLICIT);
            this.run = run;
            try {
                btnImage = Image.createImage("/btnImage.png");
            } catch (IOException e) {
            tickerMenu = new Ticker("Daftar Hotel di Pantai Kuta Bali");
            setTicker(tickerMenu);
            for (int i = 0; i < objHotel.namaHotels.length; i++) {
                append(objHotel.namaHotels, btnImage);
    addCommand(new Command("Select", Command.OK, 0));
    addCommand(new Command("Back", Command.BACK, 0));
    setCommandListener(this);
    public void commandAction(Command cmd, Displayable dsp) {
    if (cmd == SELECT_COMMAND) {
    choose = getSelectedIndex();
    Display.getDisplay(run).setCurrent(run.htlDes1);
    switch (cmd.getCommandType()) {
    case Command.BACK:
    Display.getDisplay(run).setCurrent(run.lstMenuUtama);
    break;
    public int getChoose() {return choose;}
    private KutaBeachDictionary run;
    private Image btnImage;
    private Ticker tickerMenu;
    private int choose;
    the code in HotelDes01 Form classimport java.io.IOException;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.ImageItem;
    public class HotelDes01 extends Form implements CommandListener {
    private KutaBeachDictionary run;
    private int index;
    private Hotel isiHotel = new Hotel();
    public HotelDes01(KutaBeachDictionary run) {
    super("Inna Kuta Hotel");
    index = run.lstMenuHotel.getChoose(); //here is the problem..the value remain 0 althought i choose another??!!
    this.run = run;
    Image imgHotel = null;
    String namaHotel = "\n" + isiHotel.namaHotels[index] + "\n";
    try {
    imgHotel = Image.createImage("/HotelImage/interface/htlDes1.png");
    } catch (IOException e) {
    append(new ImageItem(null, imgHotel, ImageItem.LAYOUT_CENTER, null));
    append(namaHotel);
    addCommand(new Command("Back", Command.BACK, 0));
    setCommandListener(this);
    public void commandAction(Command cmd, Displayable dsp) {
    switch (cmd.getCommandType()) {
    case Command.BACK:
    Display.getDisplay(run).setCurrent(run.lstMenuHotel);
    break;
    can someone fix the code,, i had tried so many ways,,but completely failure.. T_T
    Edited by: diaca on Mar 22, 2010 7:55 AM
    Edited by: diaca on Mar 22, 2010 8:01 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    hei bro,i had solved the problem :)
    the problem is , i had constructed the form of hotelDes01 each time the program starting with this code
    public class KutaBeachDictionary extends MIDlet {
        public KutaBeachDictionary() {
            //.. declaring several new object
            htlDes1 = new HotelDes01(this);
        //..another procedure like startApp, pauseApp, etc
    public HotelDes01 htlDes1;
    }i think if i declare this class in the beginning it never updated the index value
    so i delete the code above, and i declare the htlDes1 in the listMenuHotel like this:
    public class ListMenuHotel extends List implements CommandListener {
        //..several code just like before
    public void commandAction(Command cmd, Displayable dsp) {
            if (cmd == cmdSelect) {
               objHotel.setChoose(getSelectedIndex()); //i change the code like this
               showInformation();
            if (cmd == cmdBack) {
                Display.getDisplay(run).setCurrent(run.lstMenuUtama);
        public void showInformation() {
            HotelDescription htlDes1 = new HotelDescription(run); //reconstruct the object in the class ListMenuHotel
            Display.getDisplay(run).setCurrent(htlDes1); //display the object
        }so the form of hotelDes01 now always reconstruct whenever user change the election in ListMenuHotel class and now index value get updated.. :D
    thanks for trying to fix the code qnat..
    this is my coursework, so i get to finish it ASAP..

  • Error in Getting Response From Server

    Hi,
    I am getting the following error when i call a remote method of java class using lcd's:
    RPC Fault faultString="[MessagingError
    message='Destination 'loginService' either does not
    exist or the destination has no channels defined(and the
    application does not define any default channels.)']"
    faultCode="InvokeFailed" faultDetail="Couldn't establish
    a connection to 'loginServlet'"
    Can anybody resolve this problem.
    Regards,
    Naveen.

    Hi,
    I am getting the following error when i call a remote method of java class using lcd's:
    RPC Fault faultString="[MessagingError
    message='Destination 'loginService' either does not
    exist or the destination has no channels defined(and the
    application does not define any default channels.)']"
    faultCode="InvokeFailed" faultDetail="Couldn't establish
    a connection to 'loginServlet'"
    Can anybody resolve this problem.
    Regards,
    Naveen.

Maybe you are looking for