[Mulgara-dev] Soap problem into intranet

Roberto Sidoti rsidoti at herzumsoftware.com
Mon Jun 25 11:14:09 UTC 2007


Hi all,
I’m roby and I’m a newbie of Mulgara and of semantic web world.
Sorry for my bad English and for this “long” mail.
I’m using Mulgara 1.0 and I’m trying to interact with it through SOAP.
I wrote this simple code:


  public static void invokeSOAP(URL url, String query)
      throws SOAPException {
    Call call = new Call();
    call.setTargetObjectURI("urn:Query");
    call.setMethodName("executeQueryToString");
    call.setEncodingStyleURI(org.apache.soap.Constants.NS_URI_SOAP_ENC);
    Vector params = new Vector();
    params.addElement(new Parameter("queryString", String.class, query,
org.apache.soap.Constants.NS_URI_SOAP_ENC));
    call.setParams(params);
    Response response= call.invoke(url, "");
    if (!response.generatedFault( )) {
       . . .
    } else {
      Fault fault = response.getFault( );
      System.out.println("Error encountered: " + fault.getFaultString( ));
    }
  }
  
  public static void main(String []ar)throws Exception{
        //String query1=" select $s $p  from
<rmi://localhost/server1#vcardModel> where $s $p
<http://www.roby.org/2007/roby#Mimmo> ;";
        String query="alias <http://www.roby.org/2007/roby#> as Roby;";
        invokeSOAP(new
URL("http://localhost:8080/webservices/services/ItqlBeanService"),query);
  }

Both queries have been tested with iTql and they work.
If I use “query” it works through SOAP too, but If I use query1 it doesn’t. 
The strange thing is that if I use query1 there is the error and after that
error even using iTql it doesn’t work. I’m connected to an intranet, if I
disconnect from local net and restart mulgara server
both queries work thorugh SOAP too!
This is a piece of stacktrace 
. . . 
. . .
Caused by: org.mulgara.query.QueryException: Unable to reconnect to
rmi://localhost/server1
            at
org.mulgara.itql.ItqlInterpreter.setServerURI(ItqlInterpreter.java:1403)
            at
org.mulgara.itql.ItqlInterpreter.updateSession(ItqlInterpreter.java:1324)
            at
org.mulgara.itql.ItqlInterpreter.outASelectCommand(ItqlInterpreter.java:1198
)
            ... 38 more
Caused by: org.mulgara.server.driver.SessionFactoryFinderException: Couldn't
create session factory for rmi://localhost/server1
            at
org.mulgara.server.driver.SessionFactoryFinder.newSessionFactory(SessionFact
oryFinder.java:202)
            at
org.mulgara.itql.ItqlInterpreter.setServerURI(ItqlInterpreter.java:1385)
            ... 40 more
Caused by: org.mulgara.server.NonRemoteSessionException: The URI provided
was not for a remote session
            at
org.mulgara.server.rmi.RmiSessionFactory.<init>(RmiSessionFactory.java:154)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
            at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at
org.mulgara.server.driver.SessionFactoryFinder.newSessionFactory(SessionFact
oryFinder.java:188)
            ... 41 more
2007-06-25 12:20:42,578 ERROR [PoolThread-4] itql.ItqlInterpreterBean -
Failed to execute query
javax.xml.soap.SOAPException: ItqlInterpreter error -
org.mulgara.query.QueryException: Unable to reconnect to
rmi://localhost/server1
Caused by: (QueryException) Unable to reconnect to rmi://localhost/server1
Caused by: (SessionFactoryFinderException) Couldn't create session factory
for rmi://localhost/server1
Caused by: (NonRemoteSessionException) The URI provided was not for a remote
session
            at
org.mulgara.itql.ItqlInterpreterBean.execute(ItqlInterpreterBean.java:405)
            at
org.mulgara.itql.ItqlInterpreterBean.executeQueryToString(ItqlInterpreterBea
n.java:439)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402
) 
. . .
. . .

Please let me know if you have some idea about this problem
Regards
roby




More information about the Mulgara-dev mailing list