I got ClassCastException when i use the Webservice Deployeble Client.

hi, i created a webservice deployeble client. when i use the proxys i got ClassCastException
here it is my code
Context ic = new InitialContext();
               out.println("----1---");
               Object lookuped =
                    ic.lookup(
                         "wsclients/proxies/sap.com/ClientProxyDefinition/in.mobileone.demo.proxy.WSClientProxy");
               out.println("\n----2---"+lookuped.getClass());     
               PortableRemoteObject objPortableRemoteObject=new PortableRemoteObject();
               out.println("\n---3--
               Object narrowed =
                    objPortableRemoteObject.narrow(lookuped, AdminOperWS.class);
               out.println("\n---4--" + narrowed);
               AdminOperWS service = (AdminOperWS) narrowed;
               out.println("----5---" + service);
               AdminOperWSViDocument client = null;
               ClsSuper objClsSuper = new ClsSuper();
               String strErrorCode = null, strErrorMessage = null;
               client =
                    (AdminOperWSViDocument) service.getLogicalPort(
                         "Config1Port_Document",
                         AdminOperWSViDocument.class);
               out.println("----5---" + client);
               objClsSuper = client.createUser("2", "lakshman", "lakshman", "ad");
i got the output:
1-----
2-----class in.mobileone.demo.proxy.AdminOperWSImpl
3----
java.lang.ClassCastException
plz send solu...
Thank U

Hi Lakshman,
can you please elaborate how you are calling this web service( where you get the stub?)
Why are you using these lines?
PortableRemoteObject objPortableRemoteObject=new PortableRemoteObject();
out.println("\n---3--");
Object narrowed =
objPortableRemoteObject.narrow(lookuped, AdminOperWS.class);
out.println("\n---4--" + narrowed);
These are used mailny for CORBA objects( while calling EJBs).
Just remove these line and try.
Please do come back with the output.
Regards,
Piyush

Similar Messages

  • Numbers does not open with the main user after installing mountain lion. It works flawlessly when I use the second account on my mac. What got corrupted in the admin-account, something in the user-library? How can I fix it? I´m kinda desperate...

    Numbers does not open with the main user after installing mountain lion. It works flawlessly when I use the second account on my mac. What got corrupted in the admin-account, something in the user-library? How can I fix it? I´m kinda desperate... (the same happens with the other iWork-Apps!)
    Looking forward to hearing from somebody with a littlemore expertise than me, Chris

    you can remove preferences files by navigating to the Preferences folder for your user as follows:
    0) Quit ALL iWork apps (Keynote, Pages and Numbers)
    1) from the Finder select the menu item "Go > Go To Folder…".  This will bring up a dialog:
    2) enter the path "~/Library/Preferences" (no double quotes)
    3) find the files:
    com.apple.iWork.Keynote.plist
    com.apple.iWork.Numbers.plist
    com.apple.iWork.Pages.plist
    and move these to the trash.  I would NOT empty until later.
    4) restart Numbers

  • IPhone shuts off when I use the internet on the 3G network & I can't upgrade/restore because of network connection error. Any Help?

    A few months ago, while on the 3G network, my iPhone 3GS starting turning off randomly when I was using safari or an online app and the battery was somewhere around 5-20%. When this happened the only way to get the phone back on was by fully charging it which sometimes took a few hours even. It wasn't a big deal at the time because it was infrequent and while the phone was at a low battery %. However, in the past few months, around the time I upgraded to iOS 5.1 it started happened more and more often and at higher and higher battery percentages. It is now at a point where my phone shuts off every time I connect to the 3G network regardless of what my battery life is. I have called Rogers several times to complain about this and I have been told it is because of the battery for the most part but I don’t buy it; the problem has got to be more significant than the battery alone because I can listen to music and send texts at anytime and fully use the internet when I am connected to Wi-Fi. I more recently talked to someone in tech support from Rogers who said my phone cannot support the iOS 5.1 software and that is why it is crashing. They also asked if my phone was heating up more now than in the past and it is. They said this was further evidence that my phone was couldn't handle the new software and was basically on overload.  I was told to the best solution was to "Back Up" my iPhone then do a full "Restore". Here is where my next problem comes along. I cannot "Restore" my iPhone without doing an upgrade and every time I attempt to "Upgrade & Restore" an error message pops up that says "There was a problem downloading the software for the iPhone "...". The network connection timed out/was reset. -Make sure your network settings are correct and your network connection is active, or try again later". I have followed all of the protocol that is readily available online to address this problem but still no success. I disabled my firewall and anti-virus programs, I have ensured my connection is active and stable, I have upgraded to the newest iTunes, I have uninstalled iTunes and all apple programs in the correct order then reinstalled iTunes, I have disabled my DNS cache. Nothing works.
    If you have any advise whatsoever please share as it would be greatly appreciated.
    Thanks

    I was actually able to upgrade to the newest software, iOS 5.1.1 without connecting to my computer/iTunes but rather directly through my phone when I was home on Wi-Fi. After the upgrade I plugged my phone into a different USB port at the back of my computer and was able to do a full restore. I really don't think the USB port had anything to do with it because I use the same front USB port all the time with my external hard drive and other devices wuth no problems at all; regardless of what the actual solution was, I am now able to connect to iTunes and upgrade/restore without any problems so that half of my problem is resolved.
    I have yet to leave my house since doing the upgrade/restore so I am not sure if the problem with my phone crashing when I use the interent on the 3G is still an issue. I will test it today and tomorrow and give you an update.
    Thanks

  • I just bought a brand new iPhone 4s from a Three store. When I used the cloud restore to put the data from my old 3gs onto the device, it's prompting me for an Apple ID login with an email address that isn't mine!

    I just got a brand new iPhone 4S on a contract from my local Three store. When I used the cloud restore to put the data from my old 3GS onto the device, it's prompting me for an Apple ID login with an email address (hotmail) that isn't mine! My old phone has NEVER had any Apple ID other than mine log into it, and the new one's a sealed box that I've opened and set up from scratch. Can anyone please explain this? I'm worried there's some kind of problem with my iCloud data being mixed with someone else's or something... Since I logged in with my own ID, it's downloaded the data perfectly fine, but I just got the Apple ID prompt again a moment ago with this same hotmail address in it... I'd be very grateful for any explanation!

    In iTunes on your computer, select the Purchased section under STORE in the left column. Click on the first track and choose "Get Info" from the "File" menu.
    In the "Summary" tab you'll see details of the purchaser of the track. Click Next to go through all your purchased music one by one until you find the ones you need to get rid of.
    Unfortunately, there are no smart playlist rules that can filter tracks by the purchaser that I know of.

  • IIS service not showing when I use the get-exchangeCertificate | fl cmdlet

    Hello All,
    I just installed a 3rd party digital certificate to my Exchange 2010 via powershell then assigned the 4 services IIS, pop, smtp, imap but when I use the get-exchangecertificate | fl cmdlet the IIS service is not showing.The rest of the services were fine. 
    During the process of installing the certificate via powershell, I got a message that says: Do you want to enforce SSL communication on the root web
    site? If not, rerun the cmdlet with the -DoNotRequireSSL parameter. I said No to all and the operation continued. By the way, I also invoke the iisreset /restart right after installing the digital
    certificate. I then proceeded to install my root certificate and intermediate certificates. All were imported successfully via certificate snap-in. When I access the exchange 2010 EMC console, the status for the Exchange Certificate still says pending certificate
    signing request. Not sure if that is related at all to the fact that IIS service is not showing amongst the assigned services listed. Any idea why IIS service is not in the list of assigned services for Exchange certificate?? Can I re-run my powershell and
    repeat my steps, but this time just assigned IIS service alone? Or should I re-run powershell altogether and assign all 4 services again??? Also, what about the pending certificate signing request in the EMC console should I process and complete the request??
    Any advise is appreciated. Let me know please.
    Thanks!
    Lotusmail1
    Franz Garcia

    Hi Lotusmail1,
    Please run the following command to just assign IIS service to this third-party certificate (using certificate 5113ae0233a72fccb75b1d0198628675333d010e as a example), then run Get-ExchangeCertificate to check it again:
    Enable-ExchangeCertificate -Thumbprint 5113ae0233a72fccb75b1d0198628675333d010e -Services IMAP,POP,IIS,SMTP
    Regards,
    Winnie Liang
    TechNet Community Support

  • Error when i execute the webservice /SAPAPO/SDM_PARCRTRC

    hi,
    I am getting this error when i execute the webservice /SAPAPO/SDM_PARCRTRC for product availability. please tell me where am i going wrong ..... ? wat parameters are missing ? how to interpret this error?
    An error has occurred. Maybe the request is not accepted by the server:
    XML Serialization Error. Object content does not correspond to Schema restrictions of type [http://sap.com/xi/APO/Global][/wsdl:definitions/wsdl:types/xsd:schema[3]/xsd:complexType[3]/xsd:simpleContent/xsd:extension/xsd:attribute[1]/xsd:simpleType].
    Quick response will be appreciated

    hi,
    due to the bad formatting of your posting it is hard to read. you might consider to use the code tag to enhance readability. moreover, 'executing a webservice' is a bit a vague description of what you do. are you consuming this service with any client program and this is throwing the exception or are you testing the webservice with any 3rd party tool and this is a server error returned to you?
    anyway, I think you ttry to consume that service from within ABAP and the error message says a lot despite of its bad readability:
    The client ist serializing a message (creating it from parameters) and is provided some argument for a parameter which doesn't conform to the WSDL. E.g. the WSDL declares some parameter to be an integer and between 0 and 100 and you try to supply it the value 234. THis would most probably result in your erromessage. or the WSDL says integer and you provided it a string (e.g. like 'foo' or '234').
    anton

  • Got AuthenticationFailedException when I use IMAP protocol

    I always got AuthenticationFailedException when I use javamail to connect IMAP server with login method "LOGIN LITERAL+ STARTTLS".
    Would anyone give me a advice? Thx so much.
    PS.
    This one header is ok.
    * OK [CAPABILITY IMAP4REV1 LITERAL+ X-NETSCAPE SASL-IR LOGIN-REFERRALS STARTTLS
    AUTH=LOGIN] IMAP4rev1 2004.357 at Tue, 5 Sep 2006 22:38:55 +08
    00 (CST)
    This one header can`t connect.
    * OK [CAPABILITY IMAP4 IMAP4rev1 AUTH=LOGIN LITERAL+ STARTTLS]
    Message was edited by:
    Antonov0318

    Below is the trace log and thx for your responding.
    PS. I replace the IP with *.*.*.* , user with * and I can mail you IP and test account if you need. Thank you.
    DEBUG: setDebug: JavaMail version 1.4ea
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.fetchsize: 16384
    * OK [CAPABILITY IMAP4 IMAP4rev1 AUTH=LOGIN LITERAL+ STARTTLS]
    IMAP DEBUG: AUTH: LOGIN
    A0 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=LOGIN LITERAL+ STARTTLS
    A0 OK CAPABILITY completed
    IMAP DEBUG: AUTH: LOGIN
    DEBUG: protocolConnect login, host=*.*.*.*, user=*, password=<non-null>
    A1 AUTHENTICATE LOGIN
    A1 NO AUTHENTICATE not supported
    * OK [CAPABILITY IMAP4 IMAP4rev1 AUTH=LOGIN LITERAL+ STARTTLS]
    IMAP DEBUG: AUTH: LOGIN
    A0 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=LOGIN LITERAL+ STARTTLS
    A0 OK CAPABILITY completed
    IMAP DEBUG: AUTH: LOGIN
    DEBUG: protocolConnect login, host=*.*.*.*, user=*, password=<non-null>
    A1 AUTHENTICATE LOGIN
    A1 NO AUTHENTICATE not supported
    Exception in thread "main" javax.mail.AuthenticationFailedException: AUTHENTICATE not supported
         at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:474)
         at javax.mail.Service.connect(Service.java:297)
         at javax.mail.Service.connect(Service.java:156)
         at javax.mail.Service.connect(Service.java:105)
         at idv.mygy.TEST.WorkingTest.main(WorkingTest.java:56)
    Message was edited by:
    Antonov0318

  • Computer freezes when I use the number keypad

    When I use my number keypad it freezes the computer and I have to turn it off to be able to use it again.
    I use a PowerMac G4 to interface with an instrument at work. Anyway, a while back I got a new Kensington wireless mouse and started having problems with the computer freezing up when I use the number keypad.
    I thought it was the new mouse, but when I plugged back in the old mouse I still had the problem.
    I thought maybe the keypad had gone bad on the keyboard because the light didn't illuminate when I pressed the "Num Loc" key. So, I got a new keyboard with a number keypad and it does the same thing.
    I don't know what to do with it. Does anyone have any idea or suggestions to try. I'd really appreciate some help.
    Kim

    Hi Kim, and a warm welcome to the forums!
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for action in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

  • When I use the new Pages on my iPad, I can't open it on my new computer. It tells me that I must download the new Pages to see the Pages document, but when I try to download the new pages to my computer it tells me all apps are up to date.

    When I use the new Pages app. On my IPod  to type documents, I can't open them on my new computer. It sends me a message that I have to download a newer version of pages to see the Pages document. When I try to do that it tells me all my apps are up to date and will not allow me to upgrade the pages on my iMac.
    Any suggestions?

    What level of OS X is installed on your Mac (your profile is incomplete)?
    Barry

  • I have a Macbook Air with Mountain Lion..I upgraded to the latest version called Mavericks OX now it crashes a lot...when I use the shift key especially I now have version 10.9

    I have a Macbook Air with Mountain Lion..I upgraded to the latest version called mavericks ox now it crashes a lot...when I use the shift and Caps keys especially. I now have version 10.9. how can I get mountain lion back and get rid of this update?

    all of my software was current before i upgraded to maverick....i don't know why this is going on...any help?

  • I want to buy a hard case for my macbook pro, but I don't know what year it is. When I use the serial number to try and find out, all it says is, "~VIN,MacBook Pro (15-inch Glossy)". When I type that into amazon for a case it gives me nothing!

    I want to buy a hard case for my macbook pro, but I don't know what year it is. When I use the serial number to try and find out, all it says is, "~VIN,MacBook Pro (15-inch Glossy)". When I type that into amazon for a case it gives me nothing!

    Hi T,
    Either of these will give you the info you seek:
    http://www.appleserialnumberinfo.com/Desktop/index.php
    http://www.chipmunk.nl/klantenservice/applemodel.html

  • When I use the shortcut to open a new window in safari (command N), I get a 404 error message from Google. How do I change where 'Command N' routes to?

    When I use the shortcut to open a new window in safari (command N) on my Macbook Pro, I get a 404 error message from Google. How do I change where 'Command N' routes to? 

    It's not necessary to change the Command N keystroke..
    From your Safari menu bar click Safari > Preferences then select the Privacy tab.
    Click:   Remove All Website Data
    Then delete the cache.
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.
    If that didn't help, troubleshoot Safari extensions.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test.
    If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.

  • With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    This isn't an issue. Notice the screen prior to the one that shows usage has an iCloud section and a Manage Storage button. For this button to activate ios needs to download a few kb from icloud. Switching back to this screen forces ios to download those few kb.

  • I share a macbook with my other half and we both use it for our iphones. When syncing using the new software I now have all of her and my contacts on my phone.  I don't want her contacts! How do I get rid?

    I share a macbook with my other half and we both use it for our iphones. When syncing using the new software I now have all of her and my contacts on my phone.  I don't want her contacts! How do I get rid?

    Hi,
    You have 2 solutions:
    1 - You can use 2 differents icloud account
    2 - You use the same account but you don't sync yours contacts.
    You configure that in  Settings > icloud
    You activate or desactivate what you want.
    Have a nice day.

  • How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    When talking about a specific image posting the image may be useful.
    One can use a Layer Mask and add a white Layer underneath.

Maybe you are looking for