Michael Kear wrote:
>
> That web service worked on the server this code was running on until last
> Friday.  It works on my dev server.   The "public" method works on its own
> web site,  and exactly the same code (but with different query names and
> function names) doesn't work as a web service, when it did last week.  Huh?
> Well that's onion layer number one.   Why it would work ok on two servers,
> and not on the third (production) one.

Apparently the .cfc extension isn't mapped to CF.

> Aside from that, now I'm  wondering what to do .  you say "Why do you choose
> to use SOAP here? I would personally go for using REST".  I haven't got a
> clue.  All I'm doing is using the code in CFWACK and trying to make it work.
> Ben says:  "As we discovered, Web Service creation is exceptionally easy
> when we utilise the functionality inherent in ColdFusion components."    And
> that's what I'm doing.  I thought that what was generated by the CFC using
> access="Remote"  was WSDL - a flavour of SOAP.   Are you saying its not wise
> to use a CFC for it?   

To start from the beginning: a webservice in and of itself is
nothing but an API exposed over the HTTP protocol. Following the
definition of the W3C, we have been using webservices for a long
time now, because even normal forms are webservices.
Some tend to see much more in them, but this is the bottom line.

What XML, SOAP, XML-RCP etc. added to this basic functionality
that we have had for a long time is structure. Standards for
defining datatypes, standards for error codes, standards for
authentication, standards for redirects etc. All of this wrapped
in a lot of XML inside the body or the headers of a HTTP
request-response.

REST (I didn't know it was called that way until I read Thomas's
link) is the old way of doing this. Just use a POST or a GET to
access the webservice. Don't encode the method in XML in the
body, just append it to the query string. Don't bother specifying
datatypes, just give a name-value pair in a string.

This means you loose out on al the nice error handling, all the
type validation etc. But since the PHP developers you have been
in contact with do not appear to be able to handle that, and your
webservice doesn't really need it, it might be better for them to
start the easy way.

Tell them to do a HTTP request  (try it in your browser) for
http://bluegrass.org.au/_cfcs/anniversaries.cfc?method=getthisweeksevents
and parse the XML. That will be hard enough for them as it is.

> Now I move that exact code, and it doesn't work.  I get abusive mail from
> PHP developers telling me that my page produces invalid RSS code (it's not
> RSS so that explains that!) I try to find out how to help the PHP users and
> the PHP people wont help, the web sites I've been shown and have found in
> google, all tell me how to create a web service in PHP, but no one gives any
> instructions I can understand on how to consume a WSDL web service.    I
> thought WSDL produced SOAP output and that's why I used it.

You can use WSDL and SOAP, it wouldn't require any change on the
server side, but I think your target adience needs to learn to
crawl before they try to run.

Jochem

--
I don't get it
immigrants don't work
and steal our jobs
     - Loesje
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to