XPath: doesn't work for SOAP message?

My method
     * Get value of the node specified by an XPath.
     * @param item The starting context (e.g. document, node, node list).
     * @param xPath XPath to select single node value (e.g. "/root/data/value[1]/text()")
     * @return Result of <i>xPath</i> (the node's value) or null if failed.
     * @throws XPathExpressionException if <i>xPath</i> is wrong.
    static public String getXPathValue(Object item, String xPath) throws XPathExpressionException {
        String result = null;
        if (item != null && xPath != null) {
            try {
                result = XPathFactory.newInstance().newXPath().evaluate(xPath, item);
            } catch (NullPointerException npe) {
                //XPathFactory.newInstance() throws NullPointerException when called from ActiveX bean
                if (item instanceof Document) {
                    result = getXPathValueApache((Document) item, xPath);
        }//else: input values not available
        return result;
    }//getXPathValue()works good enough for plain XML files (no namespaces). Now I have a SOAP XML message and my XPath doesn't work with this code - but it works with other XPath tools or my old Apache method:
     * Get value of the node specified by an XPath.
     * @param document Document to get node value of.
     * @param xPath XPath to select single node value (e.g. "/root/data/value[1]/text()")
     * @return Result of <i>xPath</i> (the node's value) or null if failed.
     * @throws org.w3c.dom.xpath.XPathException if XPath result object is not of type XPathResult.
     * @see <a href="http://www.w3schools.com/xpath/default.asp">XPath Tutorial</a>
    static private String getXPathValueApache(Document document, String xPath) throws org.w3c.dom.xpath.XPathException {
        String result = null;
        if (document != null && xPath != null) {        
            org.w3c.dom.xpath.XPathEvaluator evaluator = new org.apache.xpath.domapi.XPathEvaluatorImpl(document);
            Object o = evaluator.evaluate(xPath, document, evaluator.createNSResolver(document), org.w3c.dom.xpath.XPathResult.FIRST_ORDERED_NODE_TYPE, null);
            if (o != null) {
                if (o instanceof org.w3c.dom.xpath.XPathResult) {
                    org.w3c.dom.xpath.XPathResult xpResult = (org.w3c.dom.xpath.XPathResult) o;
                    Node node = xpResult.getSingleNodeValue();
                    if (node != null) {
                        result = node.getNodeValue();   
                } else {
                    throw new org.w3c.dom.xpath.XPathException(org.w3c.dom.xpath.XPathException.TYPE_ERR, "XPath '"+xPath+"' didn't return an object of type  XPathResult!");
            }//else: no result for XPath
        }//else: input values not available
        return result;
    }//getXPathValue()The XPath is quite simple and I also had it in 2 ways: short and long:
//rsp:SessionId[1]/text()
/SOAP:Envelope/SOAP:Header/rsp:Response/rsp:SessionId/text()
Why doesn't this work with the standard
XPathFactory.newInstance().newXPath().evaluate(xPath, item)
?

Hi,
I have cancelled your Export PDF subscription for the order no.AD013879714.
Your refund no.is 66181172.
You will get the refund in 7 business days.
Regards,
Florence

Similar Messages

  • Applying rules manually doesn't work for multiple messages

    I've been using Mail for some time now and love rules. Love 'em. A few months ago I started having touble and have not been able to figure it out.
    The rules get applied to new incoming messages properly, as they should. However, I used to be able to select all the messages in my inbox (Command + A) and then 'Apply Rules' (Option + Command + L). That command no longer works. It still works if I go and select a bunch of eBay-related e-mails, for example, and then Apply Rules. Those message are moved accordingly. But if I select all message and Apply Rules, those same 4 or 5 messages remain put in the inbox even though there's a perfectly functioning rule for them that should be applied.
    NOTE: NONE of my rules work when I select all and Apply Rules.
    Any suggestions?

    The reason there are messages in my inbox to which rules haven't been applied is because when I'm at work I check my mail via the web (I use FastMail.fm). At home, using Mail, I access my mail via IMAP. When I receive and read new messages via the web and then go home and open Mail, all the messages in my inbox are no longer new, incoming messages so Mail doesn't process them as such. But just because they're not new incoming messages doesn't mean they belong in my inbox.
    Does that make sense?
    Most of the rules are to Move messages to folders based on categories (Shopping, Forums, Hosting, etc.).

  • 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.

  • Previously posted troubleshooting doesn't work for my error message "iTunes could not back up the iPhone because an error occurred".  What other options do I have?

    Previously posted troubleshooting doesn't work for my error message "iTunes could not back up the iPhone because an error occured".  What other options do I have to backup my iPhone data properly?

    Hi there kchagape,
    You may find the troubleshooting steps in the article below helpful.
    iOS: Troubleshooting backup issues in iTunes
    http://support.apple.com/kb/ts2529
    -Griff W. 

  • Push notifications doesn't work for apps like (fb viber , whatsapp etc ) 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

    Sorry, I've forgotten the actions done.
    I've restarted the iphone, and I've recovered a previous backup.
    Thanks.

  • Central Autoreaction Method doesn't work for NW 7.10 in SolMan 7.01

    Hello!
    The central autoreaction method doesn't work for the satellite system
    NW 7.10. For systems with kernel releases 4.6D, 640, 700 this method
    works fine and e-mail alerts are coming.
    The configuration steps I've checked:
    1. Configured SCOT. The mail_send job executes every 5 minutes.
    2. Background dispatching job is released: SAP_CCMS_MONI_BATCH_DP (In
    central CEN/000/DDIC and satellite system SAT/000/DDIC)
    3. Central dispatching job is released: SAP_CCMS_CENSYS_DISPATCHER
    (Only in central system CEN/000/DDIC)
    4. The sapccm4x-agent registered as web service within CEN using
    Create Remote Monitoring for NW 7.10:
    Connection test to SAPCCM4X.<satellite_host>.00 was performed successfully
    5. Created a new autoreaction method by copying method
    CCMS_OnAlert_Email_V2 to the own Z_CCMS_Email_Alert_CEN:
    Function Module - SALO_EMAIL_IN_CASE_OF_ALERT_V2
    Execute Method on Any Server and Only in Central System, triggered by
    CCMS agents
    SENDER (EMAIL_USER) exists in CEN/000 , RECEPIENT - <distr list
    SAP_BASIS in CEN/000>, RECIPIENT-TYPEID - C
    6. Got MTE Classes from NW 7.10 satellite system and assigned this method
    Z_CCMS_Email_Alert_CEN to an MTE-class CCMS_ORAucPSAPSR3 for NW 7.10
    satellite system. The alert is red right now.
    7. The mail_send job doesn't send anything, in SCOT there are no
    sending orders.
    8. Autoreaction status on this alert in CEN in RZ20 - Sent to CEN.
    CEN_CHECKED.
    9. The alert status in RZ20 in CEN - ACTION_REQUIRED. If I execute it
    in manual the alert status changes to ACTIVE, but no email and no
    messages in sending orders in SCOT.
    Please help me to solve this issue.
    Thank you!

    Hi,
    Since you are using RECIPIENT-TYPEID =C i.e. General distribution list, pls ensure to have shared type of list created in SBWP.
    Also pls verify your SCOT configutaion , if apropriate address area i.e. *@abc.com
    Also one point to note that even if you trigger auto reaction method manually via RZ20 , pls check if alert is listed in SOST.
    if yes , that means there is problem in either SCOT configuration or distribution list.
    If alert is not appearing in SOST , that means you need to check auto reaction method parameters;
    Z_CCMS_OnAlert_Email_V2 , here check release section if Auto reaction execution method is checked.
    Regards,
    Rupali

  • Am unable to install CS5 on mac running yosemite. Tried installing JavaFor OSX, it still doesn't  work. Error message reads "inconsistency in the installer database"

    Am unable to install CS5 on mac running yosemite. Tried installing JavaFor OSX, it still doesn't  work. Error message reads "inconsistency in the installer database"

    remove your caps database.  this shows the location for cs3.  make the obvious changes for cs5.
    Error "...Installer Database is Corrupt..." when you install Adobe Creative Suite 3 products

  • The enclosure in RSS feed doesn't work for Itune

    I subscribed to my podcast rss feed to ITune, which was valid and had been tested successfully with other aggregator such as Ipodder, however, it doesn't work for ITune. When I hit "get" button next to my podcast name, I always get "!" sign in front of the name, and when I clicked it, I got error message "There was a problem downloading 'XXXXX'. The network connection could not be made".
    I'm not sure if this problem resulted from the "rewrite" function I used on my podcasting server in order to track the downloading. Here is how it works: When a mp3 file is requested, my web server will redirect the request to another asp.net program to do something and then redirect to the real mp3 file for downloading. Can it be problem in Itune? But I can use this enclosure url to download this mp3, and also the Ipodder works file with this rss feed.
    Any help will be appreciated.
    Leo
      Windows XP  

    Thanks for your reply.
    However, according to the iTune specs as following,
    Tracking Usage
    Please note that iTunes does not provide usage statistics. Some podcasters have created mechanisms for tracking the number of times that each episode has been downloaded. iTunes does not provide support in how to track downloads, but the following notes may be helpful:
    * 302s will be followed to a depth of 5 redirects and will not update the feed URL in the directory.
    * The URL before the GET-style form values (before the first ?) must end in a media file extension (e.g. mp3). To work around this, the feed provider can alter their URL from this:
    http://www.podcaster.com/load.php?f=&Wipeout.php
    to this:
    http://www.podcaster.com/load.mp3?f=&Wipeout.mp3
    Notice how it says load.mp3 instead of load.php. It should be possible to accomplish this via various means, such as web server rewrites. iTunes looks at the extension of the path part of the url, i.e. the part before the”?”.
    The http request redirection is allowed as long as the appropriate file extension such as ".mp3" is used.
    By the way, I tested it with "no redirection" version, which worked fine.
    Leo

  • Receiver determination doesn't work for same IDoc type but in differentSWCV

    hi guys,
    we have an emergency now. Receiver determination doesn't work for same IDoc type but in different SWCV.Please check below for detail.
    1. The process flow is : R/3 IDoc -> XI -> Third party system
    2. In previous release R13, IDoc ORDERS05 was imported and used in XI and software component version is R13. And receiver determination was created.
    3. Now, in new release R17, IDoc ORDERS05 was imported from R/3 to XI again and software component version is R17. And in R17, the receiver determination created in R13 was used for both old interface(R13) and new interface in R17.
    Then we encountered the problem, both interfaces doesn't work now, even we deleted the receiver condition(In R13, IDoc ORDERS05 was sent to system A, and in R17 IDoc ORDERS05 was sent to system B, RCVPRN was used as an condition).
    Does anyone encounter this problem? really need and appreciate your help.
    -Eddie

    information from monitor:
    Status     Sender               Service Sender Namespace                         Sender Interface
    reschedul  XXXCLNT100     urn:sap-com:document:sap:idoc:messages   ORDRSP.ORDERS05
    columns for "Receiver Service","Receiver Namespace", "Receiver Interface" are blank
    And then double click records in monitor, go into detail information...
    Normally there's lots of setps existed, such as
    Inbound Message ( CENTRAL )
    Receiver Identification
    Interface Determination
    Receiver Grouping
    Message Branch According to Receiver List
    Technical Routing
    Call Adapter
    But now there's only one setp -
    "Inbound Message ( CENTRAL )" existed, no any another setp..., and payload in inbound message looks good.
    And in SMQ2, I checked the queue information, found there's an error - "An exception occurred that was not caught." No any other detail information for this error.

  • Microphone doesn't work for Creative Live! Cam Socialize HD AF HD Webcam

    Microphone doesn't work for Creative Live! Cam Socialize HD AF HD Webcam (for Windows 7).
    I have to use external microphone from Logitech now.
    I send few emails to Customer Service. They answered once to check my Device Manager and disappeared after that. I'm really disappointed.
    It looks like the drivers for Windows 7 are wrong.

    hey Killthebeeping,
    if you have the USB Mic connected kindly remove it first then uninstall the audio drivers for your B510.
    let windows install its generic driver.
    once done plugin your usb mic and test it again.
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    Have you checked out the Community Knowledgebase yet?!
    How to send a private message? --> Check out this article.

  • Why should I use Publish instead of Routing for SOAP messages over JMS?

    Hi,
    I currently read the book "The Definitive Guide to SOA - Oracle Service Bus" and found the following sentence in the chapter "Wrapping an Asynchronous Web Service with a Proxy Service" on page 131, which confuses me:
    When you send a SOAP message over a JMS queue, you need to use the Publish action, not the Routing action. <<Are there general restrictions, when to use Publish and when to use the Routing action in asynchronous communication? Is this special for SOAP messages over JMS?
    Thanks for your advices,
    Katja

    Here are a few reasons why. Enjoy!!
    A
    What Can Amazon Web Services Be Used For?
    Although Amazon Web Services is a cool technology, it also provides the very useful function of enabling business partners to interact with Web site through standard protocols. This interaction can lead to a deeper, more valuable relationship for parties involved. Here are a few of the ways that partners are benefiting from Web Services:
    Associates: Associates program enables Web sites to link to Amazon.com and earn referral fees for sales that they drive through their links. Many Associates are now using Web Services to build more effective links to our store, thus enhancing their sites and earning more money.
    Sellers and Vendors: Amazon.com has thousands of third-party sellers who offer their products on our Web site. Using Web Services, these sellers can more easily manage large quantities of inventory on our platform, and download the latest product information to make sure that their products are competitively priced.
    Developers: Among the thousands of developers who have signed up to our Web Services program, many are now creating solutions to help other people work with Amazon. These solutions are powered using our Web Services APIs.
    www.amazon.com/gp/aws/landing.html

  • I have installed 0S5 but restoring the backup doesn't work. the following messages appear: An error accurred while restoring this iphone (-20)  because the backup was corrupt or not compatible with iphone being restored (my iphone 3GS)

    I have installed 0S5 but restoring the backup doesn't work. the following messages appears: An error accurred while restoring this iphone (-20), followed by another message:  because the backup was corrupt or not compatible with iphone being restored (my iphone is 3GS), I tried restoring the factory settings and then restore the backup, but the same problems and I have lost all my contacts, pictures etc

    Hi Ckuan,
    Thanks a lot for your advice.    
    Deleting the correupted back up means to delete the information of one month since the last back up I made is one month ago.....right? 
    This back up I made right before I restored my iphone.  During the restore however my OS was upgraded to 5.1.1. and reading the comments on the internet it seems I am not the only one whom experience this problem. 
    Can it be that if I downgrade my OS back to 5.1. the back up will not be considered as corrupted?  If so, how do I downgrade the iphone?
    Thanks in advance.

  • The wifi at my school isn't very good. And I can't send iMessages through it. It works for some apps like score center and my radar app, but doesn't work for other apps like clash of clans and iMessage. How can I get it to work on that  wifi network

    The wifi at my school isn't very good. And I can't send iMessages through it. It works for some apps like score center and my radar app, but doesn't work for other apps like clash of clans and iMessage. How can I get it to work on my school wifi. I have an iPhone 4S on AT&T and iOS 7.04

    In a roaming network, your "main" router is the device that would require port mapping/forwarding to be configured in order to access the IP camera from the Internet. This router is also the one that would be provide the private IP address for the camera which you will want to be a static one.
    So as you described your network, the IP cameras should be getting an IP address or you assigned it a static one and this is the address that you would enter in the Private IP address (or equivalent depending on the router used) field when setting up port mapping.
    If you are not able to access this camera from the local network, then this should be troubleshot first.

  • How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    Si vous avez utilisé la commande Save As Template depuis Pages, il y a forcément un dossier
    iWork > Pages
    contenant Templates > My Templates
    comme il y a un dossier
    iWork > Numbers
    contenant Templates > My Templates
    Depuis le Finder, tapez cmd + f
    puis configurez la recherche comme sur cette recopie d'écran.
    puis lancez la recherche.
    Ainsi, vous allez trouver vos modèles personnalisés dans leur dossier.
    Chez moi, il y en a une kyrielle en dehors des dossiers standards parce que je renomme wxcvb.template quasiment tous mes documents Pages et wxcvb.nmbtemplate à peu près tous mes documents Numbers.
    Ainsi, quand je travaille sur un document, je ne suis pas ralenti par Autosave.
    Désolé mais je ne répondrai plus avant demain.
    Pour moi il est temps de dormir.
    Yvan KOENIG (VALLAURIS, France)  mercredi 23 janvier 2011 22:39:28
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • How can I upload a video from my PC through I tunes to camera roll on my iPhone? Is there an app or format of specific video supported? Sync from photos include video doesn't work for me.

    How can I upload a video from my PC through I tunes to camera roll on my iPhone? Is there an app or format of specific video supported? Sync from photos include video doesn't work for me.

    download the new you tube apps in i tunes, in os6 just pick a video in the photos apps and select share, the old you tube app icon will appear

Maybe you are looking for

  • Using a repeater to pass content to a title window

    Hi I have a repeater that has a button and the button open a title window component from flex So far I use the name property of the button to pass the title from the repeater to the title of the titlewindow here it is: Vimeo is the name of the repeat

  • IPhone 6 unlocks but the homescreen wont appear

    Hopefully someone can help me... I have an iPhone 6 128gb running 8.1 and my issue is that when I unlock my phone using the TouchID my home screen wont show up. Now I don't update my software because i always wait for bugs to be fixed.. especially si

  • Debit/credit amounts

    Hi, Iam trying to sum debit & credit amounts separately from bsak table. The following logic is not working. Can u tell me the problem... loop at t_bsak. if t_bsak-shkzg = 'S'.   l_debit = l_debit + t_bsak-wrbtr. endif. if t_bsak-shkzg = 'H'.   l_cre

  • Linked server error 7303

    Good morning, I created a linked server to access sql server 2008. At first everything worked properly, now returns the error 7303. I have already shared the folder with all of the database permits users full control of sql server users , users of th

  • Printing photo get half the image on some paper

    I have printed photos on my Photosmart C4580 without a problem in the past.  Now it prints text from my Mac OS 10.6.8 without a problem but on 4x6 photos, the top half of the photo paper is blank, half the image appears, and there are ink streaks on