2009年11月6日星期五

[fw-webservices] New to ZF and SOAP services.

Hi.

I've been asked to build a SOAP service to allow our clients access
our data. I've also been asked to build a SOAP client to extract data
from our clients into our system.

I'm looking to use Zend Framework's Zend_Soap_Server and
Zend_Soap_Client for this.

Currently the services need to build are ...

Service : Authentication
Login() -> PreAuthToken
Authenticate(Username, md5(Password + ' : ' + PreAuthToken)) -> AuthToken
Logout(PreAuthToken, AuthToken) -> Nothing

Service : SupplyData
Brands()
Customers()
Products()
RemovalReasons()
Vehicles()
WheelPositions()


One of the features that I need to incorporate is the ability to have
versioning of the services.

So, say we build V1 today and agree on the interface, but tomorrow a
customer has a grand idea and V2 is created.

We need to be able to support V1 and V2 side-by-side.

I've been asked to implement major and minor versions along with LIVE
and TEST switches.

Add to that some service versions may need to be disabled (killswitch'd).

It has been agreed that all requests _may_ contain the xml ...

<version>
<major>major version integer</major>
<minor>minor version integer</minor>
<release>LIVE or TEST</release>
</version>

So, with that I have a few questions.

1 : How do I read the version before I create the Zend_Soap_Server and
load the required class?
2 : How do I know which service is being requested?
3 : Can I create a dummy soap service which has just the version
content and from there determine which class to load?

I think I want a Zend_Soap_Server_Proxy. Something that all soap
requests will go through. The result of which will either be the
correct soap service called or an exception (no version for service,
version killed/superceeded, etc.).


Is this even possible?

Any assistance would be really nice.

At this stage, I think I can have the spec changed, so if you have any
better way of dealing with this, then I'd appreciate knowing that too!

Thank you.

Richard Quadling.

--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

没有评论: