
joel at fysh
Sep 14, 2009, 5:28 AM
Post #2 of 2
(721 views)
Permalink
|
2009/9/14 Jens Schwarz <blacky6767 [at] gmx>: > Hi, > > I want to get/write some of my application data not from/to my app's MySQL DB, but from/to a webservice. > > Are there any reccomendations on how to access SAP webservices with Catalyst applications? > > I recently succeeded accessing them with a plain perl script using SOAP::WSDL, but do not know on how to accomplish this inside of my Cat app. > > (I looked into C::M::SOAP but had some difficulties integrating it into my App. Are there some more examples?) For the SOAP interface, I'd look at using XML::Compile, with which I have had good results. As for how to architect this, consider not "how would I build this in Catalyst" but "how would I build this standalone". Both from a perspective of layered design, and of testing, this will simplify your efforts. Once you have a standalone package wrapping your SOAP API and any client-side business logic, wrap this up into a Catalyst model. You may get good mileage with C::Model::Adaptor (or one of the other patterns in its dist, e.g. ::Factory::PerRequest, if you need per-request SOAP connection semantics) or by writing your own model package that uses ACCEPT_CONTEXT to extract config etc from the Catalyst context object. Also look at the C::Component::InstancePerContext role, if you need per-request model instantiation / configuration. /joel _______________________________________________ List: Catalyst [at] lists Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst [at] lists/ Dev site: http://dev.catalyst.perl.org/
|