[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

external Java function call

maha_isims at hotmail.com maha_isims at hotmail.com
Mon Jun 28 13:03:04 PDT 2010


  external Java function call
Hello

I have an XQUERY query that work well until I add an external function call. This function is written in java.  

 

This is the Java function: 

 

package org.Interface;
import java.net.InetAddress; 

public class Adress {  
    private String adress;

    public String getAdress() {
        try {
            InetAddress iadr = InetAddress.getLocalHost();         
            adress = iadr.getHostAddress();        
        }catch(Exception exp) {
            exp.printStackTrace();
        }

 return adress;
} }

 

and this is the Java function call in my query (with saving this query in the same folder as the Java function):

 

declare namespace xfn="org.Interface"; 

 

I tried this too for the namespace but no result: 

 

declare namespace xfn="java:Adress?path=file:///C:/CMR/src/org/Interface/";

 

<adresse>

{xfn:getAdress()

}

</adresse> 



I work with SAXON API for the XQUERY.

Thank you in advance for any help.



With best regards.

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20100628/fbf8b4aa/attachment.htm


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.