Programming Web Services with SOAP By Doug Tidwell, James Snell, Pavel Kulchenko The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification This page was updated November 07, 2002. UNCONFIRMED errors and comments from readers: (6) Last Line; It reads "... Private Key Infrastructure (PKI) ..." This should be "... Public Key Infrastructure (PKI) ..." (18) Example 2-6: should the URLs be in plain type instead of Italic? (24) Example 2-12: the last four tags use uppercase "S", but the tags at the start use lowercase "s". {25} Last 2 Lines of Example 2-13; Errata: p. 25, Example 2-13 The last two lines of the example use the tags and . These should be written as and . (26) 3rd paragraph of "SOAP's Data Encoding" section; In chapter 2, page 26, in the "SOAP's Data Encoding" section, the last sentence has a typo. "...without a priori knowledge..." should probably be "...without a prior knowledge...". (28) Section 2.6.2, in quote from SOAP specification; Part of the reason this paragraph is hard to understand is that it has been misstranscribed and so no longer makes sense. "both in its structure and that types of its values" should read: "both in its structure and THE types of its values" [30] middle of page; Is tweak something specific to C? (40) Example 3-1: The user input should be boldfaced (as p.xi says) (47) last two lines: The user input should be boldfaced (as p.xi says) [49] java command line near base of page; The Java client class file is invoked as if it was in the 'samples' package, but the code shown in Example 3-15 has no package statement. To run the code as given in Example 3-15 omit the "samples." part of the command line. {49} in the last of the page; you said : "% java samples.Hello http://localhost/soap/servlet/rpcrouter James" the correct is : "% java Example1_client http://localhost/soap/servlet/rpcrouter James" {50} last sample command line; In the command "java org.apache.soap.util.net.TcpTunnelGui 8080 http://www.example.com 80" the "http://" should not be included as a part of the "tunnelhost" parameter. The correct command is: "java org.apache.soap.util.net.TcpTunnelGui 8080 www.example.com 80" [60] para 2 and soap example above; The comment about .NET beta not recognizing that is declared as part of the same namespace of its parent is incorrect. Such namespace inheritence *is not* a standard rule of namespaces; a name is only inherited from the default namespace. (there is no default namespace in the example this paragraph discusses). The element is not in any namespace and this can be easily checked using XML tools. {61} example 3-23 (continiued); lines: -> sayHello(SOAP::Data->name(name => $name->type('string) ->uri('urn:Example1')) must be: -> sayHello(SOAP::Data->name(name => $name)->type('string) ->uri('urn:Example1')); (closing parenthesis at first line and semicolon at second line). Otherwise perl can't parse the code. {64} Example 4-1: in the declaration of login, the curly brace "{" should be a parenthesis "(". {67} Example 4-6; The test: die "Wrong parameters: register(email, password, firstName, lastName [, title][,company][, url])\n" unless 4 == map {defined} @parameters{qw(email password firstName lastName)}; will fail if any of the parameters are undefined. Use grep instead of map, like this: die "Wrong parameters: register(email, password, firstName, lastName [, title][, company][, url])\n" unless 4 == grep {defined} @parameters{qw(email password firstName lastName)}; (71-72) Example 4-15: The example would be clearer if user input is boldfaced (as p.xi says) [72] Example 4-16; The following packages should also be imported: import org.apache.soap.*; import org.apache.soap.encoding.soapenc.Base64; The private variables had to be declared static for me to compile: private static int memberID; private static long time; private static String email; private static byte [] signature; [73] Example 4-17; All get accessors had to be: public static .... in order to compile in JBuilder. [73-74] Example 4-17, serialize method; The variable "auth" is used here but never declared. It should be "authInfo" or the name of this class. (83) 1st paragraph; URL http://alphaworks.ibm.com/tech/wsif must be: http://www.alphaworks.ibm.com/tech/wsif/ (103) bottom of page; "Consult Appendix C for the full list." It's not there! (104) Registration Program; "given in Appendix." It's not there! (108) Using UDDI to Locate Services; "Appendix C has" It's not there! [108] Example 6-18; The example creates a variable called services of type BusinessServices however that variable is not really ever used the only place I can see that it is used is services.getBusinessServiceVector().add(service); but then it is never used. Just to make matters worse later it defines services to be of type Vector. [150] 1st section; Actually, this is a general comment, but I am picking on p 150 since it references the download. The major problem is the download samples are incomplete and appear to be an earlier version than what is in the book. It is clear this book needs a cleanup pass that gets the code in shape. I happened to enjoy all the saml stuff since I am involved in that work and understand what the authors are trying to do with the example in ch 7. One other comment is that the master index interface appears to have 3 methods register, update, and login as shown in ex C-44 but is not mentioned in Ch 7. Overall I like what the book is trying to do, but it appears time ran out and a lot of stuff was quickly assembled and not thoroughly reviewed before publication. [179] n/a; Perhaps you should add a "Transaction Protocols" category and mention BTP. [183] Example B-3; It's interesting that this is considered derivation by restriction because it actually allows more values, not a restricted subset (185) Example B-7: the US/Canada/etc. country code is 1, not 01. (In Europe, BTW, that country code is written as 001, because a country code always has two zeroes added to the start of it... so writing it as "1" is even more impor- tant..partly because a city code or area code has one zero added to the start.) (185) Example B-8: the countryCode element pattern value="\d{2}". Not all country codes have two digits. (The US/Canada/etc. code is 1, the Czech Republic code is 420, etc.) [185] Example B-8; What's the point of saying that the type telephoneNumberEx is a derivation of telephoneNumber if every component of the type needs to be redeclared? Is it only to allow telephoneNumberEx elements to be used where telephoneNumber elements are allowed? If so, it's a shame that so much typing is required to acheive this. {194} before line "@Publisher::ISA = qw(SOAP::Server::Parameters);" in Example C-13, Publisher.pm; In Publisher.pm, I found it necessary to add the line use SOAP::Lite; before @Publisher::ISA = qw(SOAP::Server::Parameters); otherwise perl could not find SOAP::Server::Parameters. (Appendix B) is USA-centric, but it doesn't say that anywhere. The problem starts at p.180, the third paragraph, in the sentence "A telephone number [is]... a collection of three invividual atomic values." That isn't really clear. What are those values: country code, city code, and number (as in a lot of the world)? Area code, exchange and number? Parentheses, a dash, and digits? The next paragraph helps some by mentioning country codes, but I was still confused. Oh, ah... I see... there's more info in Example B-4 on p.183. You could clear this up by pointing us ahead to that example. This is especially important for people in parts of the world who don't have "exchanges" and "numbers" like the US does. It could help some of those readers to include a figure that shows what a US-type phone number looks like. [FYI, a typical European phone number, for a phone in Paris, is: 0033 (0)1 12 34 56 78.]