Hi,
When i querying the same server using the Globus wsrf-query client , there
is no problem and the query give me correct answer . but when using this
code , i see this error .
do you can help me to solve this problem ?
Thanks.
Omid.
On Mon, Aug 25, 2008 at 10:34 AM, Laura Pearlman <[EMAIL PROTECTED]> wrote:
> This error:
>
> java.rmi.RemoteException: ERROR: Unable to invoke QueryRP operation.;
> nested exception is:
> javax.net.ssl.SSLHandshakeException: unknown certificate
>
> seems to point to some sort of problem with authentication. One thing you
> might want to do is try querying the same server using the Globus wsrf-query
> client; this will at least help determine whether the problem is in the
> environment (your credentials, the server credentials, the sets of CA
> certificates available on the client side and the server side, etc.) or in
> your code.
>
> -- Laura
>
> omid boroumand wrote:
>
> Hi,
>
> I want use MDS Service and by the set ' Xpath ' , get some information
> about another grid information ( IP of another grid node ).
>
> but when i execute my Code , i see this error :
>
> ----------------------------
> MDS Running
> java.rmi.RemoteException: ERROR: Unable to invoke QueryRP operation.;
> nested exception is:
> javax.net.ssl.SSLHandshakeException: unknown certificate
> at MDSclass.find(MDSclass.java:111)
> at MDSclass.main(MDSclass.java:47)
> Caused by: javax.net.ssl.SSLHandshakeException: unknown certificate
> at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
> at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
> at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2727)
> at org.apache.axis.client.Call.invoke(Call.java:2710)
> at org.apache.axis.client.Call.invoke(Call.java:2386)
> at org.apache.axis.client.Call.invoke(Call.java:2309)
> at org.apache.axis.client.Call.invoke(Call.java:1766)
> at
> org.oasis.wsrf.properties.QueryResourcePropertiesSOAPBindingStub.queryResourceProperties(QueryResourcePropertiesSOAPBindingStub.java:415)
> at MDSclass.find(MDSclass.java:108)
> ... 1 more
> Caused by: javax.net.ssl.SSLHandshakeException: unknown certificate
> at com.ibm.jsse.bv.a(Unknown Source)
> at com.ibm.jsse.bv.startHandshake(Unknown Source)
> at
> org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
> at
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:181)
> at
> org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:397)
> at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:135)
> ... 12 more
>
> --------------------------
>
> my XPath contain this :
>
> xpathQuery = "//*[local-name()='Address']"
>
> ------------------------
> and my code that execute contain this :
>
> import java.net.URL;
> import java.rmi.RemoteException;
>
> import javax.xml.rpc.ServiceException;
> import javax.xml.rpc.Stub;
>
> import org.apache.axis.message.MessageElement;
> import org.apache.axis.message.addressing.Address;
> import org.apache.axis.message.addressing.EndpointReferenceType;
> import org.apache.axis.types.URI;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
>
> import org.globus.mds.aggregator.types.AggregatorContent;
> import org.globus.mds.aggregator.types.AggregatorData;
> import org.globus.wsrf.NoSuchResourceException;
> import org.globus.wsrf.ResourceContext;
> import org.globus.wsrf.ResourceContextException;
> import org.globus.wsrf.ResourceKey;
> import org.globus.wsrf.WSRFConstants;
> import org.globus.wsrf.encoding.ObjectDeserializer;
> import org.globus.wsrf.impl.security.authorization.NoAuthorization;
> import org.globus.wsrf.security.Constants;
> import org.globus.wsrf.security.SecurityManager;
> import org.globus.wsrf.utils.AddressingUtils;
> import org.oasis.wsrf.properties.QueryExpressionType;
> import org.oasis.wsrf.properties.QueryResourcePropertiesResponse;
> import org.oasis.wsrf.properties.QueryResourceProperties_Element;
> import org.oasis.wsrf.properties.QueryResourceProperties_PortType;
> import
> org.oasis.wsrf.properties.WSResourcePropertiesServiceAddressingLocator;
> import org.oasis.wsrf.servicegroup.EntryType;
>
>
> public class MDSclass
> {
>
>
> public static void main (String args[])
> {
> MDSclass MDS = new MDSclass();
> System.out.print("MDS Running \n");
> try
> {
> MDS.find();
> System.out.print("\n\nsubmitting job ... ");
>
>
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
> }
>
> public void find() throws RemoteException {
>
> String indexURI = "*MailScanner has detected a possible fraud
> attempt from "192.168.134.101:8443" claiming to be* *MailScanner has
> detected a possible fraud attempt from "192.168.134.101:8443" claiming to be
> MailScanner warning: numerical links are often malicious:
> https://192.168.134.101:8443/wsrf/services/DefaultIndexService*<https://192.168.134.101:8443/wsrf/services/ManagedJobFactoryService>
> *";* *
> *
> *
> EndpointReferenceType indexEPR = new EndpointReferenceType();
> try {
> indexEPR.setAddress(new Address(indexURI));
> } catch (Exception e) {
>
> throw new RemoteException("ERROR: Malformed index URI '" +
> indexURI
> + "'", e);
> }
>
> // Get QueryResourceProperties portType
> WSResourcePropertiesServiceAdd* *ressingLocator queryLocator;
> queryLocator = new WSResourcePropertiesServiceAddressingLocator();
> QueryResourceProperties_PortType query = null;
> try {
> query = queryLocator.getQueryResourcePropertiesPort(indexEPR);
> } catch (ServiceException e) {
>
> throw new RemoteException(
> "ERROR: Unable to obtain query portType.", e);
> }
>
> // Setup security options
> ((Stub) query)._setProperty(Constants.GSI_TRANSPORT,
> Constants.SIGNATURE);
> ((Stub) query)._setProperty(Constants.AUTHORIZATION,
> NoAuthorization
> .getInstance());
>
> // The following XPath query retrieves all the files with the
> specified
> // name
> String xpathQuery = "//*[local-name()='Address']";
>
> // Create request to QueryResourceProperties
> QueryExpressionType queryExpr = new QueryExpressionType();
> try {
> queryExpr.setDialect(new URI(WSRFConstants.XPATH_1_DIALECT));
> } catch (Exception e) {
>
> throw new RemoteException(
> "ERROR: Malformed URI (WSRFConstants.XPATH_1_DIALECT)",
> e);
> }
> queryExpr.setValue(xpathQuery);
> QueryResourceProperties_Element queryRequest = new
> QueryResourceProperties_Element(
> queryExpr);
>
> // Invoke QueryResourceProperties
> QueryResourcePropertiesResponse queryResponse = null;
> try {
> queryResponse = query.queryResourceProperties(queryRequest);
> } catch (RemoteException e) {
>
> throw new RemoteException(
> "ERROR: Unable to invoke QueryRP operation.", e);
> }
> // The response includes 0 or more entries from the index service.
> MessageElement[] entries = queryResponse.get_any();
>
>
> // If the number of entries is 0
> if (entries == null || entries.length == 0) {
>
> System.out.println("Number Of Entrys equals Zero");
>
>
> }
> else {
>
> for (int i = 0; i < entries.length; i++) {
>
> try {
> // Access information contained in the entry. First of
> all,
> // we need to deserialize the entry...
> EntryType entry = (EntryType)
> ObjectDeserializer.toObject(
> entries[i], EntryType.class);
>
> //String IP = entry.get_any()[1].getValue();
> //float price = Float.parseFloat(price_str);
> System.out.println(entry);
>
>
> } catch (Exception e) {
>
> throw new RemoteException(
> "Error when accessing index service entry.",
> e);
> }
> }
>
>
> }
>
>
> }
>
> }
>
> ----------------------------
>
> before I execute this program , i run " grid-proxy-init " .
>
> do anyone can help me for solve this error ?
>
> Thanks.
>
> Omid.
>
> *
>
>
>