accessing Webservices?

View: New views
2 Messages — Rating Filter:   Alert me  

accessing Webservices?

by Jens Schwarz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?)

Thanks

Jens
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: accessing Webservices?

by Joel Bernstein :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/14 Jens Schwarz <blacky6767@...>:
> 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@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/