Problem in setContent(domsource) -- works well outside WAS

Hi,
Am trying to set SOAP complaint xml content to SOAPPart using setContent() method. When used in normal java program works fine without any problems.
But when the same (whole application) is deployed on WAS 5.1 its throwing the following exception.
java.lang.ClassCastException: org.apache.xerces.dom.DeferredDocumentImpl
     at com.ibm.ws.webservices.engine.utils.XMLUtils.sourceToInputSource(XMLUtils.java:657)
     at com.ibm.ws.webservices.engine.SOAPPart.setContent(SOAPPart.java:874).....................
Am new to WAS and don't know whats wrong.
***Code Snippet is ***
SOAPMessage soapmsg = getMessage();
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = dbFactory.newDocumentBuilder();
Document document = builder.parse(getContents()); // getContents() is constructed xml content -- soapmsg
DOMSource domSource = new DOMSource(document);
SOAPPart soapPart = soapmsg.getSOAPPart();
soapPart.setContent(domSource); // at this part am getting Exception.
*** End Code Snippet***
I did checked the forum and got one post of similar problem, but doesn't have any replies to it.
http://forum.java.sun.com/thread.jspa?forumID=34&threadID=454348
Does anyone know what might be the problem and why is that Exception?
I guess WAS is using some API which is not fully comaptible with what's been used in the program - but not sure.
Any idea / suggestion would be much appreciated!!
Thanks

I am curious as to what you are trying to accomplish. We are using WAS, and WSDC running on an AS/400. I am trying to create an application that writes to an XML file on the server so it can be accessed via an HTML webpage to be used as a data island to display "news" content.
When I try to write the xml to the server I get error, unless I do not specify a path, but then it writes the file to the root of the server.
Thanks

Similar Messages

  • Hi  I am a keen photographer and I have just bought you SD card reader for ipad. This works well but was winding if there is an app that I can view the images on the SD card full screen without having to import them to the iPad or is there a way to do thi

    Hi
    I am a keen photographer and I have just bought you SD card reader for ipad. This works well but was winding if there is an app that I can view the images on the SD card full screen without having to import them to the iPad or is there a way to do this on the iPad
    The reason for buy this was for when I was out and about to get a better view off my images.
    I have a iPad 2 16gb
    Hope you can help!
    Thanks

    A couple of weeks ago, (after reading a review in TUAW) I bought a wireless hub/ SD card reader called RAVPower.  its app comes with a built in viewer, so you can load it up, and see the pics full screen. 

  • Recently, my Gmail began constantly refreshing on Firefox. It must not be a Google problem as the Gmail works well with Windows Explorer.

    It worked well before installing Firefox 5.0 on my Windows 7 HP Pavilion computer. Thanks for your help.

    It worked well before installing Firefox 5.0 on my Windows 7 HP Pavilion computer. Thanks for your help.

  • Am I Understanding Correctly That iPhoto Doesn't Work Well With Others?

    After reading all the previous posts and topics on iPhoto vs. LR2 and such with RAW/NEF file formats, they simply don't work well with each other, right?
    Basically, what I am trying to understand like a lot of others is that the way they read/write file info is dramatically different.
    I just started using LR2 in the trial period and maybe I'm just not used to it yet but I still like using iPhoto for organizing my library of photos; it seems a lot easier with the folders and albums and such.
    I also started using Nikon's RAW format NEF and working with them in iPhoto is a loser it seems.
    Other than the obvious increase and control and options availabe for editing in LR, is iPhoto all that bad with working with NEF or RAW files? What is the downside to it?
    Thanks for reading.
    John

    The problem is that Lightroom and iPhoto are essentially the type of application.
    They are both Photo Managers, they both want to own and control the pics, to be your central “go to” app for whenever you want to get a photo. Obviously only one can be the primary application.
    Lightroom - a rather more expensive application - is a professional app, aimed at the Pro Photographer. It’s a rather more powerful app in pretty much every way. For a point of comparison, Lightroom is closer to Apple’s Aperture rather than iPhoto.
    On top of that, earlier versions of Lightroom had a bug in the way that it wrote metadata to the file and iPhoto was unable to import these files - tho’ I believe that’s been fixed since.
    As to the RAW/NEF issue, There’s no point dealing in filetypes. Each model of camer produces a different RAW file, so what you need to tell us is the Model of Nikon you use. For instance iPhoto imports the NEFs from my D40 with no problems.
    As to “working well with others” iPhoto integrates with just abou every app on your mac, make the pics available in every ‘Open...’ dialogue in the OS, with Mail app and an any image editor you care to mention.
    Regards
    TD

  • Hi I m having iphone 5.it was working well.I dont know what happened to it today.It started showing "No sim card installed ".How can I get rid of this problem.

    hi I m having iphone 5.I got it on my birthday, it was working well till today...I dont know what happened to it today..it started showing "No sim card installed ".how is it possible i talked to my friend on the same phone only 2 min before ds notification..kindly help me out

    You could try removing the sim card and cleaning it - then put it back.
    I assume that there is supposed to be a sim card in your model of iPhone 5 ?

  • My phone battery can only last an hour. Problem started a week ago while I was in Argentina. I am back in the country now, this morning I left the house with a full battery and when I got to work the phone had shut down. Phone is 7 months old. Why?

    Dear Apple Family,
    I have been using an iPhone since I lost interest with Nokia phones. I fell in love with Apple's innovation, design and technology.  However, I am beginning to lose interest wth the product as well.
    I have an iPhone 5, my phone's battery can only last an hour and the phone is 7 month old.  The problem started last week while I was in Argentina. I had a bad holiday due to this, as I could not make use of the technology because my phone was off most of the time and I had nowehere to charge except to go back to the hotel.  I could not even share pictures on Instagram.  Has anyone ever experienced such a problem?  If so, why and how was the problem fixed?  I am starting to engage in a debate that I have been trying to avoid with my friends.  They say that Samsung is striving and I now tend to agree, and if the problem persists I will gladly join the Samsung family. They seem to make reliable phones.  Sadly, I never experienced this problem with iPhone 3GS & iPhone 4S.
    With Gratitude,
    Thapelo

    Hello,
    If you're in a country where there's an apple shop (unfortunately not mine), go check it and ask the employee about it: he's gonna check your Iphone on a "device"
    I've got an iphone 5 and it's working very well with me but I have to admit that its battery lasts (slower) than my Ipad 2.
    Still i can help with some tips that may improve your iohone's battery by an hour in addition (hopefully):
    - close all apps by multitasking....
    - do NOT keep the brightness to the max
    Believe me you're gonna regret changing your phone to a samsung
    Hope i've helped and sorry for my bad english (has english as 3rd language)

  • There is a problem with my apple watch.it is not working well .There is a problem in its charging .The repairers says that contact to your company and ask them to provide you its software. Please help me.

    There is a problem with my apple watch.it is not working well .There is a problem in its charging .The repairers says that contact to your company and ask them to provide you its software.
    Please help me.

    Please be aware that you are not communicating with Apple when you post in these forums. These are user-to-user support forums, so in almost all cases the only people who will reply to your posts are, like me, your fellow users.
    As to your issue, Apple does not and never has made a wristwatch as such. The only thing close to a watch that they have made was the 6th-generation iPod nano:
    http://support.apple.com/kb/ht1353#iPod_Nano_6G
    which has a clock feature and which some people have worn as a wristwatch. Is that what you mean?
    Message was edited by: varjak paw

  • Has anyone ever had a problem with your iphone working outside your home but not inside. The internet works fine in and outside of the house

    Has anyone had problems with your iphone working outside of the house, but not inside? Cannot make or receive calls, nor can I send or receive any text messages. This is something that just happened out of nowhere. Can I get some help please?

    Did you used to have service and now suddenly you don't?
    This happened to me a few years back, and several other iPhone users in my neighborhood, and after a while on the phone with AT&T they figured out that a technician had recently adjusted the receiver/sender on the tower and it was slightly off. They sent them back up and I actually had a better signal after than I did before it went out.
    I would call AT&T and explain the issue you are having and see if they can fix it.
    If you never had service there then like wjosten said it's probably just a bad zone.
    Hope you get it sussed out.
    -PM

  • I have a MacBook Pro and all of a sudden  I cannot get wireless internet connectivity to my router or any other router, I get connectivity through the ethernet port but not wireless. This was working well till this morning

    I  have a MacBook Pro and all of a sudden  I cannot get wireless internet connectivity to my router or any other router, I get connectivity through the ethernet port but not wireless. This was working well till this morning

    BXB1905 wrote:
    I tried the Apple diagnostics it did not work.
    What do you mean it did not work!  What were the results of the diagnostic tests?
    Have you contacted your ISP to determine if the problem is on their end?  
    Have you changed your router channel?  Sometimes this resolves wireless problems.
    Your profile confirms you are using Lion.  Check out the following: 
    Troubleshooting Wi-Fi issues in OS X Lion and Mac OS X v10.6
    Configuring 802.1X in Mac OS X Lion and Later

  • I have free account and it was working well till yesterday , its started to asking me to verify my payment info ,,,,

    I have free account and it was working well till yesterday , its started to asking me to verify my payment info , and i didn't put that when i create it in the beginning !! I tried pushing the Done button but it won't work , its keep asking me to verify my payment info??? and the redeem payment wont work anymore??
    How do I solve this problem???

    It's just how they do it now. What it shoudl do is charge you the dollar, then the dollar comes back off.

  • My phone was working well. i installed some free games and after 2 days u guyz charged me $34 from my debit card. and now i can install any free apps, they keep asking to put my billing info for those. please this is urgent. i want my money back.

    hello  sir/madam
    this is a very urgent and important question. i nedd your assinstance.
    i have iphone 3g. i was working well. about 2 months earlier i bought an app of $2.99. after then every thing was okay. but last week i installed some free games and 2 days later itunes send me a reciept via email and you guyz charged me $34. now whenever i try to install free apps they want my billing info. please i need your help and want those money back. 
    $34 for free games , i will show u the reciept. if its not possible to get the money back i will forced to take proper action.
    thank you sir /madam.

    The games might be free but I think you've clicked In-App purchase which cost money. You are warned before you accept the In-App purchase. You not that young and you can read so take action if you must. It's your own fault and all purchases are final. Good luck.

  • I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    Hi, blank white screen where exactly?
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.5, 10.6, 10.7 & 10.8…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x/10.8.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    If using Wifi/Airport...
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    For 10.5/10.6/10.7/10.8, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
    208.67.222.222
    208.67.220.220
    (There may be better or faster DNS numbers in your area, but these should be a good test).
    Click OK.

  • After upgrading to ios 5.1 on my iphone 3gs, the battery percentage dosent work well, it dosent move. how can i fix the problem?

    after upgrading to ios 5.1 on my iphone 3gs, the battery percentage dosent work well, it dosent move. how can i fix the problem?

    Have you tried doing turning the battery level display off and then General -> "Reset all settings"? You won't loose any data and that should do the trick.

  • I updated to Itunes 10.6.1.7. over 6 months ago on my windows XP desktop.It's worked well. Recently, on startup, a dialog box appeared which read: Itunes was not properly installed. If you wish to burn or import CDs please re-install Itunes. Please help.

    I updated to Itunes 10.6.1.7. over 6 months ago on my Mindows XP desktop. It has worked well.
    Recently, on startup, a dialogue box appeared which read: "Itunes was nor properly installed. If
    you wish to burn or import CDs you have to re-install Itunes." I attempted to upgrade to V 11.0.1
    which ended with an error message and a code 2330. I have abandoned that idea. I would like to
    re-install V10.6.1.7 or update to 10.6.3. but where do I find these old versions? Which do I use,
    32 or 64 bit?
    Please help.
    Konogboki 1968

    I attempted to upgrade to V 11.0.1
    which ended with an error message and a code 2330.
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • IWork apps no longer sync with iCloud. I am on iOS 5.1,1, and this problem is several days old, before it was working fine. Anyone has an idea?

    iWork apps no longer sync with iCloud. I am on iOS 5.1,1, and this problem is several days old, before it was working fine. Anyone has an idea?

    Sadly this is not a new problem and I would not expect a forthcoming solution.  I bought an iPad 3G and the iWork suite at the end of August and iCloud syncing worked fine.  About the time Apple rolled out iOS 6 the syncing stopped working for me (without me upgrading or changing anything).  It has never really worked since.   Run iOS 5.1.1 on both the iPhone 4 and iPad 3G.  The "geniuses" claim that Apples iOS 5 requirement is not correct and that I MUST upgrade both to ios 6 (although I know for fact that lots of folks STILL have the iCloud probs even with its 6.  The last genius basically shrugged and non-verbally acknowledged the iCloud/iWork failing and suggested "just use Dropbox.". So why the **** did we pay for iWork!?!?!
    Basically the  iwork/iCloud Connnection is broken and I have yet to get a viable solution to repair the issue.  Sorry for the bad news.  For reference I have uninstalled/installed each iteration of iWork upgrades on each device without success.  I have reset all settings multiple times, turned iCloud off/on repeatedly etc etc without success.  I even wiped the iPad and restored from iCloud w/o intention (another Apple IPad "glitch" when I tried the "reset all settings" and the iPad decided to "erase all" instead.  The genius said "it happens.")
    Oddly, the Pages app is the only one that has marginally worked at times since the first probs.  However it is basically broken and non-functioning.  Certainly DO NOT trust vital documents to iCloud/iWork.  I lost a number of work critical docs in this whole annoying, messy process of trying to get what Apple promised as easy....

Maybe you are looking for

  • Ipod touch 3rd gen software issue????

    I have a 3rd gen ipod touch which is currently on software version 4.2.1. Everytime I try to download a new app it comes up on the ipod and on computer if trying to do it through that, that the the app "requires software version IOS 4.3" or this "app

  • Synch mail to multiple macs

    is there a way to synchronize mail, including multiple email accounts and folder structure between multiple macs using cloud services such as dropbox? For instance is there a pst file I could copy to dropbox and later upload from dropbox that would m

  • Web searches are being redirected to other sites

    Web searches are being redirected to alternative websites. Deleted MacKeeper but the redirects are still occuring

  • SET_UPDATE_CONFLICT_HANDLER is making all procedures invalid

    Oracle version 10.2.0.3 DECLARE cols DBMS_UTILITY.NAME_ARRAY; BEGIN cols(1) := 'EMP_PK'; cols(2) := 'TIMESTAMP'; DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(object_name => 'SEMP.EMP',method_name => 'MAXIMUM', resolution_column => TIMESTAMP, column_lis

  • Cant change an existing account (FS00)

    Hi If I have created and saved an account via FS00 I want to change the short- and long description of it. I am in FS00 again, I am in change mod but I can change every parameter but the short- and long description which is grey. Could anybody help m