Advertisement

05.22.2008 at 06:14AM PDT, ID: 23424233
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

AxisFault

Asked by romram in NetBeans IDE, Java Programming Language, Apache Web Server

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?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
// 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();
        
    }
}
[+][-]05.22.2008 at 06:17AM PDT, ID: 21623494

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 06:53AM PDT, ID: 21623804

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 07:04AM PDT, ID: 21623895

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 07:30AM PDT, ID: 21624122

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 09:46AM PDT, ID: 21625494

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: NetBeans IDE, Java Programming Language, Apache Web Server
Sign Up Now!
Solution Provided By: romram
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.24.2008 at 04:51AM PDT, ID: 21638721

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080924-EE-VQP-39 / EE_QW_2_20070628