'encouragement' to MySQL
RandomThought2
RandomThought3
a couple more news items
in some good news, IBM created a cool Eclipse plugin for Web Services which supposedly allows a developer to more easily visualize and debug web service transactions, or at least, web services hosted on WebSphere! I've thought this would be an awesome feature for Zend Studio or for the php Eclipse plugin, but that's further down the road when apache/php are extended (by us?) to be very powerful web servicers.
today at the MySQL meetup, I presented the php5 code I wrote along with the webservice helper that created/published/hosted the WSDL enabling the code to be re-used anywhere with SOAP capabilities. I think it went over pretty well, but I still need to enhance the service by adding more couriers and consolidating the results into a single XML response. then I'll hopefully get a chance to show that to Mike G. from EDS, as he couldn't be at today's meetup.
nothing else.
</div>
my very first web service
here's the description as generated by webservice helper. here's the WSDL for you to use.
what I've done is used cURL in PHP to make an HTTP post to UPS. I made a class that creates the correctly formed UPS access XML and request XML strings, then made another class and function that takes the inputs (as described in the WSDL) and returns an XML string. then I just added the proper documentation in the class (for ws-helper), and dropped that class into ws-helper's designated directory, and voila. it generated the WSDL and accepts the soap requests.
the code to consume this service in PHP 5 is pretty easy too, if you have configured PHP with --enable-soap, that is.
$returnXML = $lukeUPSRateService->performUPSRateRequest($fromZip, $height, $length, $toZip, $weight, $width);</p>
then you could do whatever you want with the XML...like, say...
(un-tested code follows)
$upsXMLObject = simplexml_load_string($returnXML);
$cheapestRate = 100000;
for($i=0; i<$upsXMLObject->RatedShipment.length; $i++){
if($upsXMLObject->RatedShipment[i]->TotalCharges->MonetaryValue < $cheapestRate){ $cheapestRate = $upsXMLObject->RatedShipment[i]->TotalCharges->MonetaryValue;
}
}
</div>
Random news items
if T. Erl is still reading this blog, he would have a good deal to say about this, maybe. while I think it's beneficial for code-cruncher types, the idea of being able to properly implement web services after supposedly only 24 hours of research is pretty crazy. and as Erl would agree, it would no doubt miss out on the full potential of what a Web Services platform can do. but quick-and-dirty IT projects are the bread and butter of some developers, and some successful businesses, too!
(as an aside, I have read that book, and it was very good as a starter. but please, please, if you read it, don't consider the single 20-page chapter on 'Typical Web Services Designs' as a good grounds for architecting an SOA with Web Services. it demonstrates only the typical hub-and-spoke integration approach, and Erl's book is far superior.
it looks like we bought our Altova XML Enterprise Suite a little too early up at the office. I've signed up for that ridiculous www.freeipods.com site, because my geeky nature demands I have an iPod, but my wallet demands I don't spend money on it. Altova wanted to give me an iPod all along!
just 2 news items, it seems. I guess it's typical blog-fashion, even if it is somewhat lacking in depth.
</div>
2 posts in a day!
Erl responded to my open-source inquiry. I don't know if he spoke for himself, or if he really did just speak for 'some' others...
"That's not an area I'm really involved with, so I'm probably not
the best person to ask. I believe that some think open source
implementations may undermine the standardized interoperability that the
WS-* platform promotes."
in a bit of blog-magic, I will magically turn the former 'Anonymous' commentor into MATT CROUCH and hopefully get him to sink his very shrewd fangs into Erl's statements.
</div>