Subject: RE: [jade-develop] communication between an agent and a JSP using SOAP
From: Caire Giovanni (Giovanni.Caire@TILAB.COM)
Date: Tue Feb 18 2003 - 09:22:44 MET
If the scenario you want to achieve is:
- the JSP calls the getQuery() method of the SOAPAgent
- the SOAPAgent sends the query to IDAgent
- IDAgent sends back a result
- the result is returned to the JSP as the return value of the getQuery() method
.... then your code definitely doesn't work. You should do something like:
getQuery(String query) {
// send message to IDAGent
ACLMessage msg = blockingReceive()
return msg.getContent();
}
Bye
Giovanni
> ----------
> From: pca@csd.abdn.ac.uk[SMTP:pca@csd.abdn.ac.uk]
> Sent: luned́ 17 febbraio 2003 23.38
> To: jade-develop@sharon.cselt.it
> Subject: [jade-develop] communication between an agent and a JSP using SOAP
>
> <<File: SOAPAgent.java>>
>
>
> hi again,
>
> the same problem with SOAP and JADE...
>
> So far I have got
> --->two agents that speak to each other
> --->one agent speaks to a JSP via SOAP
>
> my problem is passing a String from a method in the Agent, to a behaviour in
> the same agent... I basically can't get them to share information...
>
> i pass in the query from a JSP to the "getQuery" method. this should update the
> main "query" variable whenever it receives a new one from the JSP so that it
> can send the message to the other agent and get the corresponding result!
> if anyone ahs any idea if this is an impossible way to do it, or if there is
> some code that would allow me to do this... it would be great!
>
> thanks loads,
> paul
>
> a simple version of code is attached...
>
This archive was generated by hypermail 2a22 : Tue Feb 18 2003 - 09:22:47 MET