incubator-agila-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tngu...@symcor.com
Subject Re: get back the response message
Date Sat, 11 Feb 2006 15:41:08 GMT

Davide, thanks a lot for you help.  I think I am getting there.

Thanks
Tu


                                                                           
             Davide Ling                                                   
             <lingda@libero.it                                             
             >                                                          To 
                                       agila-user@incubator.apache.org     
             02/10/2006 02:20                                           cc 
             AM                                                            
                                                                   Subject 
                                       Re: get back the response message   
             Please respond to                                             
             agila-user@incuba                                             
              tor.apache.org                                               
                                                                           
                                                                           
                                                                           




On Friday 10 February 2006 04:26, tnguyen@symcor.com wrote:
> Davide,
>
> If you don't mind, could you send me the SOAPUtilityMethods class and the
> createXpathQuery code.
>

Excuse me for the delay, but at time You sent your mail It's 4:26 am here!
Ok, I'm happy to help You.


Here the createXPathQuery method I used for my test cases.
So written is not so much riusable, but You can modify it to pass
any namespaces. XPath needs namespaces if Your XML messages
has some namespace prefix in its elements.

Ah!.. As You can see it uses Jaxen.

private org.jaxen.XPath createXpathQuery(final String queryString)
        throws JaxenException {

        org.jaxen.XPath xpath = new DOMXPath(queryString);
        SimpleNamespaceContext namespace = new SimpleNamespaceContext();

        /* Insert your namespaces!!! */
        namespace.addNamespace("tn",
               "http://davideling.altervista.org/divisione-wsdl/");
        namespace.addNamespace("ns", "http://www.apache.org/agila");
        xpath.setNamespaceContext(namespace);

        return xpath;
    }

The SOAPMessageHandler class is allegated.

--
Davide Ling
Sito Personale - http://davideling.altervista.org
Key fingerprint = 284A 0FB9 F9F6 763C D429  E02B AA5D 483A 7E45 D2A6
(See attached file: SOAPMessageHandler.java)
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message