cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Heussen" <heus...@rheinland-online.com>
Subject AW: Call Axis based web services using flowscript
Date Wed, 01 Oct 2003 10:33:45 GMT
Thanx for your help, Tony! :-)

I'm new to Cocoon and especially new to 2.1.1 and the flowscript concept.
Now I realized that I can use any Java packages within a flowscript. So I
decided to do it with java.

Maybe someone have the same question so here is what I did:

To generate the java classes to call the web service I use Axis wsdl2java,
copy them into the WEB-INF/lib directory and load them into my flowscript
using

importPackage(java.util);
importPackage(Packages.com.rheinland.online.tarifierung.binding);

(I also need java.util cause the response is a hash map).

I add the following pipeline into my sitemap

<map:match pattern="soap">
	<map:call function="soapCall"/>
</map:match>

and the the following flowscript function into my script

function soapCall() {
  var service = new KfzTarifierungWsServiceLocator();
  cocoon.log.debug(service.getKfzTarifierungWsAddress());
  var port = service.getKfzTarifierungWs();
  var hm = port.call("5791", "4711", "User", "Password", "2004-01-01", 1,
"112", 1, 87, "kw", "0005", "644", "2000-10-19", 1, 0, "2001-04-11", "1440",
28500, -1, -1, 10, 51, 56, "OH022", 0, 0, 33, 50, "OV022", 0, 3,
"1944-11-02", 1, "1973-05-24", 20, 3, 2, 3, -1, -1, -1, 3, -1, -1);
  cocoon.log.debug(hm);
  ...
  ...
  cocoon.sendPageAndWait("views/...");
  ...
  ...
}

and it works fine. This way to do a rpc call to a web service is much more
efficient than using the soap logicsheet within xsp pages. Latter I did
before using Cocoon 2.0.4.

Best regards to all Cocooners :-)

Markus


-----Ursprungliche Nachricht-----
Von: Tony Collen [mailto:colle006@umn.edu]
Gesendet: Mittwoch, 1. Oktober 2003 05:32
An: users@cocoon.apache.org
Betreff: Re: Call Axis based web services using flowscript


Markus Heussen wrote:
> Hi all,
>
> can someone give me a hint how I can call a rpc or document style based
Axis
> web service from a flowscript? Maybe there are useful descriptions
somewhere
> in the web?

Markus,

Have a look at the recent thread entitled, "Flow and Web Services" [1]
on the mailing list archive for cocoon-dev.  That should point you in
the right direction.

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106432248511659&w=2


>
> Greetings,
>
> Markus


Regards,

Tony


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message