Discussion:
[jade-develop] error dynamicClient
maria diciocia
2014-07-24 10:30:03 UTC
Permalink
I want to build behavior with call web services.

I download add-ons wsdc and compile.
I put wdsc.jar in my project.

code----------

public class BookSellerAgent extends Agent {
// The catalogue of books for sale (maps the title of a book to its price)
private Hashtable catalogue;
// The GUI by means of which the user can add books in the catalogue
private BookSellerGui myGui;
// Put agent initializations here
protected void setup() {
// Create the catalogue
catalogue = new Hashtable();

// Create and show the GUI
myGui = new BookSellerGui(this);
myGui.showGui();

// Register the book-selling service in the yellow pages
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
ServiceDescription sd = new ServiceDescription();
sd.setType("book-selling");
sd.setName("JADE-book-trading");
dfd.addServices(sd);
try {
DFService.register(this, dfd);
}
catch (FIPAException fe) {
fe.printStackTrace();
}

// Get an instance of DynamicClient
DynamicClient dc = new DynamicClient();

// Initialize DynamicClient for MathFunctions webservice by file
try {
dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctions.wsdl
"));
} catch (DynamicClientException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

// Get the DynamicClient for MathFunctions webservice by url
// dc.initClient(new URI("
http://localhost:2000/axis/test/MathFunctionsPort?wsdl"));
}

error----


*** Uncaught Exception for agent ciccio ***
java.lang.NoSuchMethodError:
org.apache.axis.wsdl.toJava.Emitter.setBobMode(Z)V
at
jade.webservice.dynamicClient.DynamicClient.internalInitClient(DynamicClient.java:616)
at
jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:557)
at
jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:539)
at examples.bookTrading.BookSellerAgent.setup(BookSellerAgent.java:65)
at jade.core.Agent$ActiveLifeCycle.init(Agent.java:1522)
at jade.core.Agent.run(Agent.java:1468)
at java.lang.Thread.run(Unknown Source)


what'is the problem?

thankyou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140724/6af70595/attachment.html>
Caire Giovanni
2014-08-03 21:06:57 UTC
Permalink
Hi,

The WSDC guru is on holyday at present. Anyway:
1) WSDC relies on an enhanced version of AXIS (AxisPlus) whose jar file is included in the WSDC distribution. When running a program that uses the DynamicClient, you must put both wsdc.jar and all jar files (axisPlus.jar in particular) included in the lib directory of the WSDC distribution in the classpath.

2) Note that WSDC is designed to invoke web services whose WSDL is not known a priori. If you know exactly the WSDL of the web services you have to invoke before running your program (your agents) you are not required to use WSDC: you can use more standard (de facto) tools to invoke web services from Java such as Axis2 or CXF.

Bye,

Giovanni

Da: jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di maria diciocia
Inviato: giovedì 24 luglio 2014 12:30
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] error dynamicClient

I want to build behavior with call web services.

I download add-ons wsdc and compile.
I put wdsc.jar in my project.

code----------

public class BookSellerAgent extends Agent {
// The catalogue of books for sale (maps the title of a book to its price)
private Hashtable catalogue;
// The GUI by means of which the user can add books in the catalogue
private BookSellerGui myGui;

// Put agent initializations here
protected void setup() {
// Create the catalogue
catalogue = new Hashtable();

// Create and show the GUI
myGui = new BookSellerGui(this);
myGui.showGui();

// Register the book-selling service in the yellow pages
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
ServiceDescription sd = new ServiceDescription();
sd.setType("book-selling");
sd.setName("JADE-book-trading");
dfd.addServices(sd);
try {
DFService.register(this, dfd);
}
catch (FIPAException fe) {
fe.printStackTrace();
}


// Get an instance of DynamicClient
DynamicClient dc = new DynamicClient();

// Initialize DynamicClient for MathFunctions webservice by file
try {
dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctions.wsdl"));
} catch (DynamicClientException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

// Get the DynamicClient for MathFunctions webservice by url
// dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctionsPort?wsdl"));

}

error----


*** Uncaught Exception for agent ciccio ***
java.lang.NoSuchMethodError: org.apache.axis.wsdl.toJava.Emitter.setBobMode(Z)V
at jade.webservice.dynamicClient.DynamicClient.internalInitClient(DynamicClient.java:616)
at jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:557)
at jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:539)
at examples.bookTrading.BookSellerAgent.setup(BookSellerAgent.java:65)
at jade.core.Agent$ActiveLifeCycle.init(Agent.java:1522)
at jade.core.Agent.run(Agent.java:1468)
at java.lang.Thread.run(Unknown Source)


what'is the problem?

thankyou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140803/8d65f610/attachment-0001.html>
Bruno Veloso
2014-08-04 08:14:43 UTC
Permalink
Hi Maria,

I had the same problem with wsdc plugin. To fix this problem, change the
axisplus.jar with a previous version found in the previous version of wsdc
plugin.
I think that axisplus.jar have some bug.

Best Regards,
Bruno Veloso
Post by Caire Giovanni
Hi,
1) WSDC relies on an enhanced version of AXIS (AxisPlus) whose jar file is
included in the WSDC distribution. When running a program that uses the
DynamicClient, you must put both wsdc.jar and all jar files (axisPlus.jar
in particular) included in the lib directory of the WSDC distribution in
the classpath.
2) Note that WSDC is designed to invoke web services whose WSDL is not
known a priori. If you know exactly the WSDL of the web services you have
to invoke before running your program (your agents) you are not required to
use WSDC: you can use more standard (de facto) tools to invoke web services
from Java such as Axis2 or CXF.
Bye,
Giovanni
*Da:* jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] *Per
conto di *maria diciocia
*Inviato:* giovedì 24 luglio 2014 12:30
*A:* jade-develop at avalon.tilab.com
*Oggetto:* [jade-develop] error dynamicClient
I want to build behavior with call web services.
I download add-ons wsdc and compile.
I put wdsc.jar in my project.
code----------
public class BookSellerAgent extends Agent {
// The catalogue of books for sale (maps the title of a book to its price)
private Hashtable catalogue;
// The GUI by means of which the user can add books in the catalogue
private BookSellerGui myGui;
// Put agent initializations here
protected void setup() {
// Create the catalogue
catalogue = new Hashtable();
// Create and show the GUI
myGui = new BookSellerGui(this);
myGui.showGui();
// Register the book-selling service in the yellow pages
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
ServiceDescription sd = new ServiceDescription();
sd.setType("book-selling");
sd.setName("JADE-book-trading");
dfd.addServices(sd);
try {
DFService.register(this, dfd);
}
catch (FIPAException fe) {
fe.printStackTrace();
}
// Get an instance of DynamicClient
DynamicClient dc = new DynamicClient();
// Initialize DynamicClient
for MathFunctions webservice by file
try {
dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctions.wsdl
"));
} catch
(DynamicClientException e) {
// TODO
Auto-generated catch block
e.printStackTrace();
} catch (URISyntaxException e) {
// TODO
Auto-generated catch block
e.printStackTrace();
}
// Get the DynamicClient
for MathFunctions webservice by url
// dc.initClient(new URI("
http://localhost:2000/axis/test/MathFunctionsPort?wsdl"));
}
error----
*** Uncaught Exception for agent ciccio ***
org.apache.axis.wsdl.toJava.Emitter.setBobMode(Z)V
at
jade.webservice.dynamicClient.DynamicClient.internalInitClient(DynamicClient.java:616)
at
jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:557)
at
jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:539)
at
examples.bookTrading.BookSellerAgent.setup(BookSellerAgent.java:65)
at jade.core.Agent$ActiveLifeCycle.init(Agent.java:1522)
at jade.core.Agent.run(Agent.java:1468)
at java.lang.Thread.run(Unknown Source)
what'is the problem?
thankyou
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com
http://jade.tilab.com/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140804/e555c85d/attachment.html>
Scagliotti Enrico (Guest)
2014-08-04 10:52:39 UTC
Permalink
Hi Maria,

I did some testing with the latest versions (available on the website):
- JADE 4.3.2 release
- Dynamic Web Service Client (WSDC) release 2.6
and I have not encountered any problems, invoking a webservice dynamically.
In your project include all the libraries contained in the WSDC add-on, and of course the JADE jars?
Among the libraries of your project there is the standard library axis.jar?
The following error appears to be related to the use of an unmodified version of axis (axisPlus.jar) used by the WSDC.
Let me know...

Bye
Enrico


Da: jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di maria diciocia
Inviato: giovedì 24 luglio 2014 12:30
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] error dynamicClient

I want to build behavior with call web services.

I download add-ons wsdc and compile.
I put wdsc.jar in my project.

code----------

public class BookSellerAgent extends Agent {
// The catalogue of books for sale (maps the title of a book to its price)
private Hashtable catalogue;
// The GUI by means of which the user can add books in the catalogue
private BookSellerGui myGui;

// Put agent initializations here
protected void setup() {
// Create the catalogue
catalogue = new Hashtable();

// Create and show the GUI
myGui = new BookSellerGui(this);
myGui.showGui();

// Register the book-selling service in the yellow pages
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
ServiceDescription sd = new ServiceDescription();
sd.setType("book-selling");
sd.setName("JADE-book-trading");
dfd.addServices(sd);
try {
DFService.register(this, dfd);
}
catch (FIPAException fe) {
fe.printStackTrace();
}


// Get an instance of DynamicClient
DynamicClient dc = new DynamicClient();

// Initialize DynamicClient for MathFunctions webservice by file
try {
dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctions.wsdl"));
} catch (DynamicClientException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

// Get the DynamicClient for MathFunctions webservice by url
// dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctionsPort?wsdl"));

}

error----


*** Uncaught Exception for agent ciccio ***
java.lang.NoSuchMethodError: org.apache.axis.wsdl.toJava.Emitter.setBobMode(Z)V
at jade.webservice.dynamicClient.DynamicClient.internalInitClient(DynamicClient.java:616)
at jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:557)
at jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:539)
at examples.bookTrading.BookSellerAgent.setup(BookSellerAgent.java:65)
at jade.core.Agent$ActiveLifeCycle.init(Agent.java:1522)
at jade.core.Agent.run(Agent.java:1468)
at java.lang.Thread.run(Unknown Source)


what'is the problem?

thankyou
________________________________
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com<http://www.avg.com>
Versione: 2014.0.4716 / Database dei virus: 3986/7918 - Data di rilascio: 25/07/2014
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140804/3077ceeb/attachment.html>
maria diciocia
2014-08-07 09:05:35 UTC
Permalink
Thank you.

I added activation.jar, mail.jar, xmlsec.jar and all jar from lib
DynamicClient in builpath project.
I tested Initialize DynamicClient for MathFunctions webservice.

Tthe project run CORRECT with this code

dc.initClient(new URI("file:./MathFunctions.wsdl"));

but when use this

dc.initClient(new URI("http://localhost/MathFunctionsPort?wsdl"));

error:
*jade.webservice.dynamicClient.DynamicClient internalInitClient*
*GRAVE: Error discovering wsdl http://localhost/MathFunctionsPort?wsdl
<http://localhost/MathFunctionsPort?wsdl>*
*jade.webservice.dynamicClient.DynamicClientException: Wsdl
http://localhost/MathFunctionsPort?wsdl
<http://localhost/MathFunctionsPort?wsdl> unreachable*


*what's the problem ?*


2014-08-04 12:52 GMT+02:00 Scagliotti Enrico (Guest) <
Post by Bruno Veloso
Hi Maria,
- JADE 4.3.2 release
- Dynamic Web Service Client (WSDC) release 2.6
and I have not encountered any problems, invoking a webservice dynamically.
In your project include all the libraries contained in the WSDC add-on,
and of course the JADE jars?
Among the libraries of your project there is the standard library axis.jar?
The following error appears to be related to the use of an unmodified
version of axis (axisPlus.jar) used by the WSDC.
Let me know...
Bye
Enrico
*Da:* jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] *Per
conto di *maria diciocia
*Inviato:* giovedì 24 luglio 2014 12:30
*A:* jade-develop at avalon.tilab.com
*Oggetto:* [jade-develop] error dynamicClient
I want to build behavior with call web services.
I download add-ons wsdc and compile.
I put wdsc.jar in my project.
code----------
public class BookSellerAgent extends Agent {
// The catalogue of books for sale (maps the title of a book to its price)
private Hashtable catalogue;
// The GUI by means of which the user can add books in the catalogue
private BookSellerGui myGui;
// Put agent initializations here
protected void setup() {
// Create the catalogue
catalogue = new Hashtable();
// Create and show the GUI
myGui = new BookSellerGui(this);
myGui.showGui();
// Register the book-selling service in the yellow pages
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
ServiceDescription sd = new ServiceDescription();
sd.setType("book-selling");
sd.setName("JADE-book-trading");
dfd.addServices(sd);
try {
DFService.register(this, dfd);
}
catch (FIPAException fe) {
fe.printStackTrace();
}
// Get an instance of DynamicClient
DynamicClient dc = new DynamicClient();
// Initialize DynamicClient
for MathFunctions webservice by file
try {
dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctions.wsdl
"));
} catch
(DynamicClientException e) {
// TODO
Auto-generated catch block
e.printStackTrace();
} catch (URISyntaxException e) {
// TODO
Auto-generated catch block
e.printStackTrace();
}
// Get the DynamicClient
for MathFunctions webservice by url
// dc.initClient(new URI("
http://localhost:2000/axis/test/MathFunctionsPort?wsdl"));
}
error----
*** Uncaught Exception for agent ciccio ***
org.apache.axis.wsdl.toJava.Emitter.setBobMode(Z)V
at
jade.webservice.dynamicClient.DynamicClient.internalInitClient(DynamicClient.java:616)
at
jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:557)
at
jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:539)
at
examples.bookTrading.BookSellerAgent.setup(BookSellerAgent.java:65)
at jade.core.Agent$ActiveLifeCycle.init(Agent.java:1522)
at jade.core.Agent.run(Agent.java:1468)
at java.lang.Thread.run(Unknown Source)
what'is the problem?
thankyou
------------------------------
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 2014.0.4716 / Database dei virus: 3986/7918 - Data di rilascio: 25/07/2014
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140807/048ffa8c/attachment.html>
Scagliotti Enrico (Guest)
2014-08-07 09:31:38 UTC
Permalink
Hi Maria,

forgive the question maybe useless...but from a browser the URL "http://localhost/MathFunctionsPort?wsdl" return the correct wsdl?

Bye
Enrico


Da: maria diciocia [mailto:maria.diciocia at gmail.com]
Inviato: giovedì 7 agosto 2014 11:06
A: Scagliotti Enrico (Guest)
Cc: jade-develop at avalon.tilab.com
Oggetto: Re: [jade-develop] error dynamicClient

Thank you.

I added activation.jar, mail.jar, xmlsec.jar and all jar from lib DynamicClient in builpath project.
I tested Initialize DynamicClient for MathFunctions webservice.

Tthe project run CORRECT with this code

dc.initClient(new URI("file:./MathFunctions.wsdl"));

but when use this

dc.initClient(new URI("http://localhost/MathFunctionsPort?wsdl"));

error:
jade.webservice.dynamicClient.DynamicClient internalInitClient
GRAVE: Error discovering wsdl http://localhost/MathFunctionsPort?wsdl
jade.webservice.dynamicClient.DynamicClientException: Wsdl http://localhost/MathFunctionsPort?wsdl unreachable


what's the problem ?

2014-08-04 12:52 GMT+02:00 Scagliotti Enrico (Guest) <enrico.scagliotti at guest.telecomitalia.it<mailto:enrico.scagliotti at guest.telecomitalia.it>>:
Hi Maria,

I did some testing with the latest versions (available on the website):
- JADE 4.3.2 release
- Dynamic Web Service Client (WSDC) release 2.6
and I have not encountered any problems, invoking a webservice dynamically.
In your project include all the libraries contained in the WSDC add-on, and of course the JADE jars?
Among the libraries of your project there is the standard library axis.jar?
The following error appears to be related to the use of an unmodified version of axis (axisPlus.jar) used by the WSDC.
Let me know...

Bye
Enrico


Da: jade-develop [mailto:jade-develop-bounces at avalon.tilab.com<mailto:jade-develop-bounces at avalon.tilab.com>] Per conto di maria diciocia
Inviato: giovedì 24 luglio 2014 12:30
A: jade-develop at avalon.tilab.com<mailto:jade-develop at avalon.tilab.com>
Oggetto: [jade-develop] error dynamicClient

I want to build behavior with call web services.

I download add-ons wsdc and compile.
I put wdsc.jar in my project.

code----------

public class BookSellerAgent extends Agent {
// The catalogue of books for sale (maps the title of a book to its price)
private Hashtable catalogue;
// The GUI by means of which the user can add books in the catalogue
private BookSellerGui myGui;

// Put agent initializations here
protected void setup() {
// Create the catalogue
catalogue = new Hashtable();

// Create and show the GUI
myGui = new BookSellerGui(this);
myGui.showGui();

// Register the book-selling service in the yellow pages
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
ServiceDescription sd = new ServiceDescription();
sd.setType("book-selling");
sd.setName("JADE-book-trading");
dfd.addServices(sd);
try {
DFService.register(this, dfd);
}
catch (FIPAException fe) {
fe.printStackTrace();
}


// Get an instance of DynamicClient
DynamicClient dc = new DynamicClient();

// Initialize DynamicClient for MathFunctions webservice by file
try {
dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctions.wsdl"));
} catch (DynamicClientException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (URISyntaxException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

// Get the DynamicClient for MathFunctions webservice by url
// dc.initClient(new URI("http://localhost:2000/axis/test/MathFunctionsPort?wsdl"));

}

error----


*** Uncaught Exception for agent ciccio ***
java.lang.NoSuchMethodError: org.apache.axis.wsdl.toJava.Emitter.setBobMode(Z)V
at jade.webservice.dynamicClient.DynamicClient.internalInitClient(DynamicClient.java:616)
at jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:557)
at jade.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java:539)
at examples.bookTrading.BookSellerAgent.setup(BookSellerAgent.java:65)
at jade.core.Agent$ActiveLifeCycle.init(Agent.java:1522)
at jade.core.Agent.run(Agent.java:1468)
at java.lang.Thread.run(Unknown Source)


what'is the problem?

thankyou
________________________________
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com<http://www.avg.com>
Versione: 2014.0.4716 / Database dei virus: 3986/7918 - Data di rilascio: 25/07/2014

________________________________
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com<http://www.avg.com>
Versione: 2014.0.4716 / Database dei virus: 3986/7974 - Data di rilascio: 03/08/2014
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140807/e4e48fa4/attachment-0001.html>
Loading...