romram
asked on
AxisFault
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.Conn ectExcepti on: Connection timed out: connect
at java.net.PlainSocketImpl.s ocketConne ct(Native Method)
at java.net.PlainSocketImpl.d oConnect(P lainSocket Impl.java: 333)
at java.net.PlainSocketImpl.c onnectToAd dress(Plai nSocketImp l.java:195 )
at java.net.PlainSocketImpl.c onnect(Pla inSocketIm pl.java:18 2)
at java.net.SocksSocketImpl.c onnect(Soc ksSocketIm pl.java:36 6)
at java.net.Socket.connect(So cket.java: 519)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:58 5)
at org.apache.axis.components .net.Defau ltSocketFa ctory.crea te(Default SocketFact ory.java:1 35)
at org.apache.axis.components .net.Defau ltSocketFa ctory.crea te(Default SocketFact ory.java:9 9)
at org.apache.axis.transport. http.HTTPS ender.getS ocket(HTTP Sender.jav a:131)
at org.apache.axis.transport. http.HTTPS ender.writ eToSocket( HTTPSender .java:370)
at org.apache.axis.transport. http.HTTPS ender.invo ke(HTTPSen der.java:8 8)
at org.apache.axis.strategies .Invocatio nStrategy. visit(Invo cationStra tegy.java: 32)
at org.apache.axis.SimpleChai n.doVisiti ng(SimpleC hain.java: 118)
at org.apache.axis.SimpleChai n.invoke(S impleChain .java:83)
at org.apache.axis.client.Axi sClient.in voke(AxisC lient.java :147)
at org.apache.axis.client.Cal l.invokeEn gine(Call. java:2719)
at org.apache.axis.client.Cal l.invoke(C all.java:2 702)
at org.apache.axis.client.Cal l.invoke(C all.java:1 856)
at org.mindswap.wsdl.WSDLOper ation.invo ke(WSDLOpe ration.jav a:139)
at impl.owls.grounding.WSDLAt omicGround ingImpl.in voke(WSDLA tomicGroun dingImpl.j ava:181)
at impl.owls.process.executio n.ProcessE xecutionEn gineImpl.e xecuteAtom icProcess( ProcessExe cutionEngi neImpl.jav a:338)
at impl.owls.process.executio n.ProcessE xecutionEn gineImpl.e xecuteProc ess(Proces sExecution EngineImpl .java:307)
at impl.owls.process.executio n.ProcessE xecutionEn gineImpl.e xecute(Pro cessExecut ionEngineI mpl.java:2 62)
at RunService.runCurrencyConv erter(RunS ervice.jav a:211)
at RunService.runAll(RunServi ce.java:29 0)
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.HTTPS ender.invo ke(HTTPSen der.java:9 7)
at org.apache.axis.strategies .Invocatio nStrategy. visit(Invo cationStra tegy.java: 32)
at org.apache.axis.SimpleChai n.doVisiti ng(SimpleC hain.java: 118)
at org.apache.axis.SimpleChai n.invoke(S impleChain .java:83)
at org.apache.axis.client.Axi sClient.in voke(AxisC lient.java :147)
at org.apache.axis.client.Cal l.invokeEn gine(Call. java:2719)
at org.apache.axis.client.Cal l.invoke(C all.java:2 702)
at org.apache.axis.client.Cal l.invoke(C all.java:1 856)
at org.mindswap.wsdl.WSDLOper ation.invo ke(WSDLOpe ration.jav a:139)
at impl.owls.grounding.WSDLAt omicGround ingImpl.in voke(WSDLA tomicGroun dingImpl.j ava:181)
at impl.owls.process.executio n.ProcessE xecutionEn gineImpl.e xecuteAtom icProcess( ProcessExe cutionEngi neImpl.jav a:338)
at impl.owls.process.executio n.ProcessE xecutionEn gineImpl.e xecuteProc ess(Proces sExecution EngineImpl .java:307)
at impl.owls.process.executio n.ProcessE xecutionEn gineImpl.e xecute(Pro cessExecut ionEngineI mpl.java:2 62)
at RunService.runCurrencyConv erter(RunS ervice.jav a:211)
at RunService.runAll(RunServi ce.java:29 0)
at RunService.main(RunService .java:337)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.s ocketConne ct(Native Method)
at java.net.PlainSocketImpl.d oConnect(P lainSocket Impl.java: 333)
at java.net.PlainSocketImpl.c onnectToAd dress(Plai nSocketImp l.java:195 )
at java.net.PlainSocketImpl.c onnect(Pla inSocketIm pl.java:18 2)
at java.net.SocksSocketImpl.c onnect(Soc ksSocketIm pl.java:36 6)
at java.net.Socket.connect(So cket.java: 519)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:58 5)
at org.apache.axis.components .net.Defau ltSocketFa ctory.crea te(Default SocketFact ory.java:1 35)
at org.apache.axis.components .net.Defau ltSocketFa ctory.crea te(Default SocketFact ory.java:9 9)
at org.apache.axis.transport. http.HTTPS ender.getS ocket(HTTP Sender.jav a:131)
at org.apache.axis.transport. http.HTTPS ender.writ eToSocket( HTTPSender .java:370)
at org.apache.axis.transport. http.HTTPS ender.invo ke(HTTPSen der.java:8 8)
Execution failed:
... 15 more
org.mindswap.exceptions.Ex ecutionExc eption: 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?
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException:
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.Conn
at java.net.PlainSocketImpl.s
at java.net.PlainSocketImpl.d
at java.net.PlainSocketImpl.c
at java.net.PlainSocketImpl.c
at java.net.SocksSocketImpl.c
at java.net.Socket.connect(So
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.axis.components
at org.apache.axis.components
at org.apache.axis.transport.
at org.apache.axis.transport.
at org.apache.axis.transport.
at org.apache.axis.strategies
at org.apache.axis.SimpleChai
at org.apache.axis.SimpleChai
at org.apache.axis.client.Axi
at org.apache.axis.client.Cal
at org.apache.axis.client.Cal
at org.apache.axis.client.Cal
at org.mindswap.wsdl.WSDLOper
at impl.owls.grounding.WSDLAt
at impl.owls.process.executio
at impl.owls.process.executio
at impl.owls.process.executio
at RunService.runCurrencyConv
at RunService.runAll(RunServi
at RunService.main(RunService
{http://xml.apache.org/axis/}hostname:reem
java.net.ConnectException:
at org.apache.axis.AxisFault.
at org.apache.axis.transport.
at org.apache.axis.strategies
at org.apache.axis.SimpleChai
at org.apache.axis.SimpleChai
at org.apache.axis.client.Axi
at org.apache.axis.client.Cal
at org.apache.axis.client.Cal
at org.apache.axis.client.Cal
at org.mindswap.wsdl.WSDLOper
at impl.owls.grounding.WSDLAt
at impl.owls.process.executio
at impl.owls.process.executio
at impl.owls.process.executio
at RunService.runCurrencyConv
at RunService.runAll(RunServi
at RunService.main(RunService
Caused by: java.net.ConnectException:
at java.net.PlainSocketImpl.s
at java.net.PlainSocketImpl.d
at java.net.PlainSocketImpl.c
at java.net.PlainSocketImpl.c
at java.net.SocksSocketImpl.c
at java.net.Socket.connect(So
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.axis.components
at org.apache.axis.components
at org.apache.axis.transport.
at org.apache.axis.transport.
at org.apache.axis.transport.
Execution failed:
... 15 more
org.mindswap.exceptions.Ex
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();
}
}
Looks like you can get a connection to the host. See if you can ping it or connect to it via html. If not, you need to fix the network problem
ASKER
>>Looks like you can get a connection to the host. See if you can ping it or connect to it via html. If not, you need to fix the network problem
>>ping it
What do you mean? can you explain for me how to do it?
>>ping it
What do you mean? can you explain for me how to do it?
Can you reach http://www.mindswap.org/ in your browser?
ASKER
Yes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I added authentication code and now it is working...