troubleshooting Question

AxisFault

Avatar of romram
romram asked on
JavaApache Web ServerEditors IDEs
6 Comments1 Solution914 ViewsLast Modified:
I tried to run the attached code in netbeans 6.0.1, however the following error occurred for me:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.ConnectException: Connection timed out: connect
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:135)
        at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:99)
        at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:131)
        at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:370)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:88)
        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:147)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
        at org.apache.axis.client.Call.invoke(Call.java:2702)
        at org.apache.axis.client.Call.invoke(Call.java:1856)
        at org.mindswap.wsdl.WSDLOperation.invoke(WSDLOperation.java:139)
        at impl.owls.grounding.WSDLAtomicGroundingImpl.invoke(WSDLAtomicGroundingImpl.java:181)
        at impl.owls.process.execution.ProcessExecutionEngineImpl.executeAtomicProcess(ProcessExecutionEngineImpl.java:338)
        at impl.owls.process.execution.ProcessExecutionEngineImpl.executeProcess(ProcessExecutionEngineImpl.java:307)
        at impl.owls.process.execution.ProcessExecutionEngineImpl.execute(ProcessExecutionEngineImpl.java:262)
        at RunService.runCurrencyConverter(RunService.java:211)
        at RunService.runAll(RunService.java:290)
        at RunService.main(RunService.java:337)

        {http://xml.apache.org/axis/}hostname:reem

java.net.ConnectException: Connection timed out: connect
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:97)
        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:147)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
        at org.apache.axis.client.Call.invoke(Call.java:2702)
        at org.apache.axis.client.Call.invoke(Call.java:1856)
        at org.mindswap.wsdl.WSDLOperation.invoke(WSDLOperation.java:139)
        at impl.owls.grounding.WSDLAtomicGroundingImpl.invoke(WSDLAtomicGroundingImpl.java:181)
        at impl.owls.process.execution.ProcessExecutionEngineImpl.executeAtomicProcess(ProcessExecutionEngineImpl.java:338)
        at impl.owls.process.execution.ProcessExecutionEngineImpl.executeProcess(ProcessExecutionEngineImpl.java:307)
        at impl.owls.process.execution.ProcessExecutionEngineImpl.execute(ProcessExecutionEngineImpl.java:262)
        at RunService.runCurrencyConverter(RunService.java:211)
        at RunService.runAll(RunService.java:290)
        at RunService.main(RunService.java:337)
Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:135)
        at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:99)
        at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:131)
        at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:370)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:88)
Execution failed:
        ... 15 more
org.mindswap.exceptions.ExecutionException: java.net.ConnectException: Connection timed out: connect

Start executing process http://www.mindswap.org/2004/owl-s/1.1/ZipCodeFinder.owl#ZipCodeFinderProcess
Inputs:



What could be the problem?
// The MIT License
//
// Copyright (c) 2004 Evren Sirin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
 
/*
 * Created on Mar 19, 2004
 */
 
import java.net.URI;
 
import org.mindswap.owl.OWLClass;
import org.mindswap.owl.OWLDataProperty;
import org.mindswap.owl.OWLDataValue;
import org.mindswap.owl.OWLFactory;
import org.mindswap.owl.OWLIndividual;
import org.mindswap.owl.OWLKnowledgeBase;
import org.mindswap.owl.OWLObjectProperty;
import org.mindswap.owls.OWLSFactory;
import org.mindswap.owls.process.Process;
import org.mindswap.owls.process.execution.DefaultProcessMonitor;
import org.mindswap.owls.process.execution.ProcessExecutionEngine;
import org.mindswap.owls.profile.Profile;
import org.mindswap.owls.service.Service;
import org.mindswap.query.ValueMap;
import org.mindswap.wsdl.WSDLOperation;
import org.mindswap.wsdl.WSDLService;
 
/**
 *
 * Examples to show how services can be executed. Some examples of simple execution monitoring is
 * included.
 *
 * @author Evren Sirin
 */
public class RunService {
    Service service;
    Profile profile;
    Process process;
    WSDLService s;
    WSDLOperation op;
    String inValue;
    String outValue;
    ValueMap values;
    ProcessExecutionEngine exec;
 
    public RunService() {
        // create an execution engine
        exec = OWLSFactory.createExecutionEngine();
 
        // Attach a listener to the execution engine
        exec.addMonitor(new DefaultProcessMonitor());
    }
 
    public void runZipCode() throws Exception {
        OWLKnowledgeBase kb = OWLFactory.createKB();
 
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/ZipCodeFinder.owl");
        process = service.getProcess();
 
        // initialize the input values to be empty
        values = new ValueMap();
 
        values.setDataValue(process.getInput("City"), "College Park");
        values.setDataValue(process.getInput("State"), "MD");
 
        values = exec.execute(process, values);
 
        // get the result
        OWLIndividual out = values.getIndividualValue(process.getOutput());
 
        // do something with output
    }
 
    public void runJGroundingTest() throws Exception {
        OWLKnowledgeBase kb = OWLFactory.createKB();
 
        // read the service description
        service = kb.readService("http://www.ifi.unizh.ch/ddis/ont/owl-s/JGroundingTest.owl");
        process = service.getProcess();
 
        // get the parameter using the local name
        values = new ValueMap();
        values.setDataValue(process.getInput("FirstParam"), "2");
        values.setDataValue(process.getInput("SecParam"), "3");
 
        values = exec.execute(process, values);
 
        // do something with output
    }
 
    public void runBookFinder() throws Exception {
        OWLKnowledgeBase kb = OWLFactory.createKB();
 
        // read the service description
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl");
        process = service.getProcess();
 
        // initialize the input values to be empty
        values = new ValueMap();
 
        // use any book name
        inValue = "City of Glass";
 
        // get the parameter using the local name
        values.setDataValue(process.getInput("BookName"), inValue);
        values = exec.execute(process, values);
 
        // get the output param using the index
        OWLIndividual out = values.getIndividualValue(process.getOutput());
 
        // do something with output
    }
 
    public void runBookPrice() throws Exception {
        String currencyOnt = "http://www.daml.ecs.soton.ac.uk/ont/currency.owl#";
 
        OWLKnowledgeBase kb = OWLFactory.createKB();
 
        // read the service description
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/BookPrice.owl");
        process = service.getProcess();
 
        // initialize the input values to be empty
        values = new ValueMap();
 
        // use an arbitrary book name
        inValue = "City of Glass";
        // get the parameter using the local name
        values.setDataValue(process.getInput("BookName"), inValue);
        values.setValue(process.getInput("Currency"),
            kb.getIndividual(URI.create(currencyOnt + "EUR")));
        values = exec.execute(process, values);
 
        // get the output param using the index
        OWLIndividual out = values.getIndividualValue(process.getOutput());
 
        // do something with output
    }
 
    public void runFindCheaperBook() throws Exception {
        OWLKnowledgeBase kb = OWLFactory.createKB();
 
        // we need to check preconditions so that local variables will be assigned values
        exec.setPreconditionCheck( true );
 
        // read the service description
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/FindCheaperBook.owl");
        process = service.getProcess();
 
        // initialize the input values to be empty
        values = new ValueMap();
 
        // use an arbitrary book name
        values.setDataValue(process.getInput("BookName"), "City of Glass");
        values = exec.execute(process, values);
 
        // get the output values
        OWLIndividual price = values.getIndividualValue(process.getOutput("BookPrice"));
        String bookstore = values.getStringValue(process.getOutput("Bookstore"));
 
        // do something with output
    }
 
    public void runCurrencyConverter() throws Exception {
        String currencyOnt = "http://www.daml.ecs.soton.ac.uk/ont/currency.owl#";
        String conceptsOnt = "http://www.mindswap.org/2004/owl-s/concepts.owl#";
 
        OWLKnowledgeBase kb = OWLFactory.createKB();
        // read the service description
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/CurrencyConverter.owl");
        process = service.getProcess();
 
        // initialize the input values to be empty
        values = new ValueMap();
 
 
        OWLIndividual EUR = kb.getIndividual(URI.create(currencyOnt + "EUR"));
        values.setValue(process.getInput("OutputCurrency"), EUR);
 
        OWLIndividual USD = kb.getIndividual(URI.create(currencyOnt + "USD"));
 
        OWLClass Price = kb.getClass(URI.create(conceptsOnt + "Price"));
        OWLObjectProperty currency = kb.getObjectProperty(URI.create(conceptsOnt + "currency"));
        OWLDataProperty amount = kb.getDataProperty(URI.create(conceptsOnt + "amount"));
 
        OWLIndividual inputPrice = kb.createInstance(Price);
        inputPrice.addProperty( currency, USD );
        inputPrice.addProperty( amount, "100" );
 
        // get the parameter using the local name
        values.setValue(process.getInput("InputPrice"), inputPrice);
 
        values = exec.execute(process, values);
 
        // get the output param using the index
        OWLIndividual out = values.getIndividualValue(process.getOutput());
 
        // do something with output
    }
 
    public void runFrenchDictionary() throws Exception {
        OWLKnowledgeBase kb = OWLFactory.createKB();
        // we need a reasoner that can evaluate the precondition of the translator
        kb.setReasoner("Pellet");
 
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/FrenchDictionary.owl");
        process = service.getProcess();
 
        // initialize the input values to be empty
        values = new ValueMap();
 
        inValue = "mere";
        values.setDataValue(process.getInput("InputString"), inValue);
        values = exec.execute(process, values);
 
        // get the output using local name
        outValue = values.getValue(process.getOutputs().getParameter("OutputString")).toString();
 
        // do something with output
    }
 
    public void runTranslator() throws Exception {
        // language ontology
        String langOnt = "http://www.daml.org/2003/09/factbook/languages#";
 
        OWLKnowledgeBase kb = OWLFactory.createKB();
        // we at least need RDFS reasoning to evaluate preconditions (to understand
        // that process:Parameter is subclass of swrl:Variable)
        kb.setReasoner("RDFS");
 
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/BabelFishTranslator.owl");
        process = service.getProcess();
 
        // get the references for these values
        OWLIndividual English = kb.getIndividual(URI.create(langOnt + "English"));
        OWLIndividual French = kb.getIndividual(URI.create(langOnt + "French"));
 
        // initialize the input values to be empty
        values = new ValueMap();
 
        values.setDataValue(process.getInput("InputString"), "Hello world!");
        values.setValue(process.getInput("InputLanguage"), English);
        values.setValue(process.getInput("OutputLanguage"), French);
        values = exec.execute(process, values);
 
        // get the output using local name
        outValue = values.getValue(process.getOutput()).toString();
 
        // do something with output
    }
 
    public void runDictionary() throws Exception {
        OWLKnowledgeBase kb = OWLFactory.createKB();
        service = kb.readService("http://www.mindswap.org/2004/owl-s/1.1/Dictionary.owl");
        process = service.getProcess();
 
        // initialize the input values to be empty
        values = new ValueMap();
 
        inValue = "hello";
        values.setDataValue(process.getInput("InputString"), inValue);
        values = exec.execute(process, values);
 
        // get the output
        OWLDataValue out = (OWLDataValue) values.getValue(process.getOutput());
 
        // do something with output
    }
    
    public void runAll() throws Exception {
    	try {
            runCurrencyConverter();
        } catch(Exception e) {
        }
 
        try {
            runZipCode();
        } catch(Exception e) {
        }
 
        try {
            runTranslator();
        } catch(Exception e) {
        }
 
        try {
            runJGroundingTest();
        } catch(Exception e) {
        }
 
        try {
            runDictionary();
        } catch(Exception e) {
        }
 
        try {
            runBookFinder();
        } catch(Exception e) {
        }
 
        try {
            runFrenchDictionary();
        } catch(Exception e) {
        }
 
        try {
            runBookPrice();
        } catch(Exception e) {
        }
 
        try {
            runFindCheaperBook();
        } catch(Exception e) {
        }
    }
 
    public static void main(String[] args) throws Exception {
        RunService test = new RunService();
        test.runAll();
        
    }
}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros