[TYPO3-mvc] SOAP call using extbase

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Mon Apr 19 22:16:04 CEST 2010


Basically a Domain Service is just a simple PHP class,
may it be a singleton or not, which you can initialize inside
your controller via t3lib_div::makeInstance - nothing more.

Extbase or the makeInstance method will handle the inclusion
of the right file, you just need to call your class like this:
Tx_MyExt_Domain_Model_Service_MyService and store it in the
path /my_ext/Domain/Model/Service/MyService.php

So I'm not sure, but your Domain Service could just provide
the API for your SOAP service.

Thomas

Am 19.04.2010 21:08, schrieb Bernhard Kraft:
> Jochen Rau wrote:
>
>> So wrapping the "ProcedureCall" with a Domain Service would fit best
>> IMO as there is no persistence aspect.
>
> Hello !
>
> I have to admit that I do not have much clue about the whole stuff. I
> got it working using the MVC concept. Right now I create my second
> extbase extension which features a classical database repository. But I
> have not digged enough into what you call a "Domain Service".
>
> If I understood the Repository concept correctly, you define a domain
> class which is an interface representing the entities of your data
> model. Then the repository makes methods like "store", "delete",
> "retrieve", etc. available which accept or deliver instances of the
> domain class? Correct?
>
> But what would a domain service be?
>
>
> I also had a look at the existing repository examples from the
> blog-extension to get a clue what the repository is for. In my case the
> final application should send a SOAP request containin the number of a
> prepaid-card and some merchant information (merchant name, pin,
> transaction number, etc) to a SOAP server to retrieve the current
> balance of such a prepaid card. Just to have a real-world example.
>
> One could think of this as a repository. Where I call a
> "findCard(cardNumber)" method. But this is just a simple example. I do
> not really see from the blog example how I could query a repository (or
> SOAP service) for something requiring more parameters. Like
> "isCardValid" with parameters "cardNumber", "expirationDate" and
> "CVC-Number" like it is common for credit card transactions ...
>
>
>
> PS: I rather like to always have some real world examples instead of
> knocking down each others heads with patterns, factories and other stuff
> sounding like some pieces of 19th century industrialization ;)
>
>
> greets,
> Bernhard


More information about the TYPO3-project-typo3v4mvc mailing list