Web services guest bile

Today’s entry is a guest bile courtesy of Mr Clean. The submission was edited slightly to match the high standard of pottymouthed gibberish you’re all used to, so the disruption in style and content should be minimal.

You are a developer, and we want to stab you in the genitalia with a wooden spoon. We never much cared for the nitty-gritty of coding, so instead we represent our company on the W3C, because it’s fun, exciting, and saves us from actually having to use anything in the real world. You know you can trust us, who else would come up with anything as clever as the DOM API? You on the other hand have stuck to menial development, wearing out braces and semicolons on your rubbery keyboards, and for that, we laugh, point, and fling wet bottomburps in your general direction.

You are powerless to stop us. Powerless we say! Your plan to “put a web service in front of it, should be relatively easy, a few days max.” will rank alongside “this is the Titanic, we don’t swerve for icebergs”, and “a short occupation quickly leading to an independent democracy in Iraq with soldiers worrying about candy and flower related injuries”, in the Naivety Hall of Fame.

Let’s start with WSDL – Web Service Duplication Language. The schema says it is the product of IBM and Microsoft, so you will anticipate some typing will be needed. This is confirmed as you navigate from the schema element, to message with it’s parts, to the portType with operations and inputs and outputs, to the binding with it’s own with operations, and inputs, and outputs. “Boy,” you think, “I bet this is really flexible, glad they did not make things more direct!”. All of these have names, and a simple process of trial and error will show you which names have to refer other names, and which are going to end up in the generated Java. If we used the relational constraints features in the schema for WSDL, that would make things too obvious, thus minimising the fun and challenge of the whole endeavour.

Namespaces in XML are good, so more namespaces must be better. WSDL has many, and these can be especially fun when dealing with the output of a WSDL generator or an IDE. Let’s use the same URI for different things, and for the hell of it, let’s confusingly use the same names for messages and suchlike so you’ll never figure out the cardinalities and relationships. XML being human readable is an outdated concept anyway, and a string of gibberish characters is just as good these days. What they lack in coherence they can make up for in verbosity.

Let us turn to the Java aspects and JAX-RPC. Now, what you want to do is bind the entire XML structure to generated Java classes. Yes you do. No really. Binding is the one true path. Any XML Schema can be bound to Java classes, unless the schema does something silly, like use the features of schema to produce a well designed, tight schema. What was the W3C thinking, designing schema for documents, instead of just remote procedure calls? XML for documents? Why would anyone do that?

The schema will be nice and small anyway, because web services are always used for stock tickers. Anything else is out of scope. You have a stock symbol and a price and that can easily be bound to a few small Java classes. An intelligent young gentleman like yourself would not try to use a complicated schema, now would you? What is that you say? “The format and schema to be used are already defined”? Oh, we are in a pickle. Hope that schema is not an industry standard, designed by a committee, where everyone gets a go at putting a feature in. We would not like to work with an object model like that in our Java. It is not like you can write or have already written your own parsing functionality. No, binding is the one true path.

Why the fixation with XML binding? We created the glorious JAXB, and you snivelling runts ignored it. Well, now you will have no choice. You have your business objects, and you have your XML. So naturally what you need is another separate bunch of Java objects, bound to the schema, which you can navigate to copy the data into your business objects. A one megabyte, industry standard, pile of crap schema becomes twenty megabytes of lovely JAXB source. There are lots of

crappy names and packages, and classes for anonymous schema types. Do not ask us for a DOM, you weakly-typed peon. You may however have SOAPElement objects, provided you hack the WSDL in an implementation specific way, and are prepared to deal with old versions of this
bastard child of JAXM called SAAJ, that are completely separate from the normal Java APIs like DOM. Actually, lets then make a new version which does extend all the DOM crap, because we can. Now that we’ve managed to sucker a bunch of you into using JAXB, we’ve identified the idiots for the smart people. We can now go ahead and introduce JAXB2, which is aimed at the less braindamaged of you despicable developers.

Why use old versions of the SOAPElement classes? Well, J2EE 1.4 is a bit new, now isn’t it? So you are stuck on Websphere 5.x or Weblogic 8.1. (not one of the poor peoples app. servers), and there is no J2EE standard for web services in those. So now you get to learn how (or whether) IBM and BEA programmers think, and you must code accordingly. Dreams of reuse evaporate. You could try switching in an alternative SOAP library, with all the endless hilarity that that entails. You could try using SAAJ and forego JAX-RPC, but you must deal with more factory construction than southern China, and SAAJ does not tell you how to hook-up a service implementation in J2EE, just how to call one. SAAJ is fact is baffling in its pointlessness, all in all.

JAX-RPC will be better in version 2.0. We have changed the name, but not because we rogered the first versions and there is a stigma. It can’t be any worse, so we can guarantee gratitude and praise. You are a developer, and we want to stab you in the genitalia with a wooden
spoon.

35 Responses to “Web services guest bile”

  1. Definetly Not Mr. Clean Says:

    The blog makes a dig at the W3C, but not the JCP, who arguably are more culpable, as many of these issues relate to JAX-RPC.

    I wonder what that blog would have looked like if it had not been edited by a shiny new JCP member? :-)

    Here is my wildly speculative version of the bile based on this hypothetical parallel universe:

    J2EE Web services: Buzzword Bingo, or Russian Roulette?
    ——————————————————

    You are a developer, and we hate you. We never much cared for the nitty-gritty of coding, so instead we represent our company on a standards body such as the JCP or the W3C. You have persisted in development, and wearing out the punctuation characters on your keyboard, and for that, we view you with contempt.

    We have tentacles (I said “tentacles”, so stop the snickering down the back) in all the standards bodies, so you are powerless to stop us. Powerless. Your plan to “put a web service in front of it, should be relatively easy, a few days max.” will rank alongside “this is the Titanic, we don’t swerve for icebergs”, and “a short occupation quickly leading to an independent democracy in Iraq”, in the Naivety Hall of Fame.

    Let’s start with WSDL – Web Service Duplication Language. The schema says it is the product of IBM and Microsoft, so you will anticipate some typing will be needed. This is confirmed as you navigate from schema element, to message with it’s parts, to the portType with operations and inputs and outputs, to the binding with it’s own with operations, and inputs, and outputs. “Boy,” you think, “I bet this is really flexible, glad they did not make things more direct!”. All of these have names, and a simple process of trial and error will show you which names have to refer other names, and which are going to end up in the generated Java. If we used the relational constraints features in the schema for WSDL, that would make things too obvious.

    Namespaces in XML are good, so more namespaces must be better. WSDL has many, and these can be especially fun when dealing with the output of a WSDL generator or an IDE. Let’s use the same URI for different things, and for the hell of it, let’s confusingly use the same names for messages etc. so you’ll never figure out the cardinalities and relationships.

    Let us turn to the Java aspects and JAX-RPC. Now, what you want to do is bind the entire XML structure to generated Java classes. Yes you do. No really. Binding is the one true path. Any XML Schema can be bound to Java classes, unless the schema does something silly, like use the features of schema to produce a well designed, tight schema. What was the W3C thinking, designing schema for documents, instead of just remote procedure calls? XML for documents? Why would anyone do that?

    The schema will be nice and small anyway, because web services are always used for stock tickers. Anything else is out of scope. You have a stock symbol and a price and that can easily be bound to a few small Java classes. An intelligent young gentleman like yourself would not try to use a complicated schema, now would you? What is that you say? “The format and schema to be used are already defined”? Oh, we are in a pickle. Hope that schema is not an industry standard, designed by a committee, where everyone gets a go at putting a feature in. We would not like to work with an object model like that in our Java. It is not like you can write or have already written your own parsing functionality. No, binding is the one true path.

    Why the fixation with XML binding? We created the glorious JAXB, and you snivelling runts ignored it. Well, now you will have no choice. You have your business objects, and you have your XML. So naturally what you need is another separate bunch of Java objects, bound to the schema, which you can navigate to copy the data into your business objects. A one megabyte, industry standard, pile of crap schema becomes twenty megabytes of lovely JAXB source. There are lots of crappy names and packages, and classes for anonymous schema types. Do not ask us for a DOM, you weakly-typed peon. You may however have SOAPElement objects, provided you hack the WSDL in an implementation specific way, and are prepared to deal with old versions of this bastard child of JAXM called SAAJ, that are completely separate from the normal Java APIs like DOM.

    Why use old versions of the SOAPElement classes? Well, J2EE 1.4 is a bit new, now isn’t it? So you are stuck on Websphere 5.x or Weblogic 8.1. (not one of the poor peoples app. servers), and there is no J2EE standard for web services in those. So now you get to learn how (or whether) IBM and BEA programmers think, and you must code accordingly. Dreams of reuse evaporate. You could try switching in an alternative SOAP library, because you are aching to learn everything there is to know about J2EE classloaders. You could try using SAAJ and forego JAX-RPC, but you must deal with more factory construction than southern China, and SAAJ does not tell you how to hook-up a service implementation in J2EE, just how to call one.

    JAX-RPC will be better in version 2.0. We have changed the name, but not because we rogered the first versions and there is a stigma. It should be better. You are a developer, and we hate you.

  2. Joe Says:

    XML is going downhill since some genius thought we need XML Schema instead of DTD

    Web services are going downhill since some genius thought we need SOAP bindings instead a simply transferring a valid XML file

    but without me, folks! I say *NO* to that crap on every occasion

  3. Benswine Says:

    What the hell is that about? I thought this was supported to be funny? Stick to Maven baby, we’ll never get sick of laughing at that one.

  4. Loved It Says:

    Sorry – got to disagree – this blog entry is pretty cool!

  5. dook Says:

    5th post.

  6. Anonymous clown Says:

    this bile is weak… more maven/jboss genitalia references pls!

  7. Steve: Developing on the Edge Says:

    [Trackback]

    the BileBlog makes

    their concerns over XSD, WSDL and JAX-RPC
    known.

    It actually makes the same point as the

  8. M. Aven Says:

    Hani’s secretly a little snotty maven-lover. He has contributed the Xfire-project which is 100 % mavenfest. You silly little genitalia. Shame on you!

  9. Martin Says:

    Brilliant. Just how I see it, but with less abuse. Maybe guests just aren’t as biled.

  10. Golly Says:

    Boring. I couldn’t even be bothered to finish reading it.

  11. dan Says:

    Dear developers,

    Make yourself familiar with JAXB and schemas with notepad as a start-up.

    If you have any problems, XMLSpy will be there for you like a Visual Studio .NET Enterprise Edition.

    If your company hesitate to buy XMLSpy,we want to stab you in the genitalia with a steel spoon.

  12. Anonymous Says:

    > He has contributed the Xfire-project which is 100 % mavenfest.

    XFire combined with XMLBeans is actually quite good solution.

  13. JAG Says:

    Not just inciteful, but insightful! Bravo to the Sith Lord and his ablutionary apprentice.

    Join the “Yes, WSDL Sucks Balls” revolution at http://www.ssdl.org/

  14. Yo Soy Mexicano, Fuerte, Macho, I Touch my balls and spit while walking on the street Says:

    sometimes I wonder what does Hani write whenever he has nothing to say about Java? … Could it be… about the religious policemen in the Kingdom of Saudi Arabia??? –> http://muttawa.blogspot.com/

  15. Angsuman Chakraborty Says:

    Wonderful post. Who is the author?

  16. Alain Rogister Says:

    I don’t know who this “Mr Clean” is but obviously he has experienced much real-world suffering with the WS crap. A follow-up bile on the 247 other WS-* specs would be sweet.

  17. Sony Mathew Says:

    See Java-In-Action session B2B WebServices Layer.
    Yes, can’t agree more. More crap standards from theorists forced down everyone’s throats. Had a hard time dealing with the whole thing but we got it working. Stuck on Websphere 5.1 with very few options.

  18. J. Axed Says:

    Right on bro!. Hani, you’ve hit the nail on the genitalia.

  19. Dr. Poopiekoph Says:

    Use Axis. Everything else is shit.

  20. Random Troll Says:

    Anyone who thing that this blog is boring, basically, hasn’t ever done any *real* J2EE stuff, and is a namby pamby little poof.

    WebServices has generally left me feeling raped as a developer. It’s impossible to use, over complicated to the point of obscenity, and poorly designed and thought out. And, just to add insult to injury, all the implementations are riddled with bugs and undocumented proprietary bits, leaving you with trial and error as the only way to get anything working.

    Still, the barrier to entry for people coming in to the field is now totally ridiculous, so, we’ll always earn the big bucks, won’t we? lol

  21. Brucieee Says:

    I guess it’s time for my upcoming books

    ‘Beyond Webservices’
    ‘Beyond SOA’
    ‘Bitter Ruby’

  22. Prick Lowtower Says:

    Did Mister Clean try to use JAX-RPC without proper potty training and con-sulting from me? In my next book, “Beyond bitter JAX-RPC in anger”, I’ll explain what the solution to any web services problem is. Yeah, Sheila, the “Beyond” stuff is MINE now. Stick to kayaking!

  23. Joseph Ottinger Says:

    Hey, Prick Lowtower! Have you written your ‘mastering JAX-RPC’ yet. I think you need to do so. Your last book, ‘Mastering Resin’ sucked downkeys Ass!

    As usual, U Dun No Me!

    Go TSS

  24. DaddyO Says:

    It’s official – TSS is nothing but an ANNOUNCEMENT SERVER. All the usual problems in this game are reasonably well solved so all that’s left is to wait for each release of a packaged solution (open source or commercial).

  25. Joseph Ottinger Says:

    Read my announcement on TSS!
    Read my announcement on TSS!!
    Please, Pretty pleae…

    u dun no me

  26. Prick Lowtower Says:

    Not a single AJAX announcement today, Jo’. Is JSF gonna kill AJAX? Just teasin’ ya, my good ole Jo’.

    Thanks God we are kept informed of the latest Hyperic, Kettle and Kosmos releases. What would we do without them? Not a word about the JBoss acquisition of ArjunaTS. Bah! It’s minor stuff compared to the portlet suites in pre-alpha, right?

    BTW Jo’, here’s a title for the announcement: “Is JBoss Transactions gonna kill Tuxedo, CICS, WebLogic and WebSphere – single-handedly ???”

    – Pricky Boy.

  27. hash link clicker Says:

    java.io.FileNotFoundException: /comments/fate/dummy_link/web_services_guest_bile
    at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:141)
    at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
    at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:268)
    at com.caucho.server.webapp.RequestDispatcherImpl.error(RequestDispatcherImpl.java:113)
    at com.caucho.server.webapp.ErrorPageManager.handleErrorStatus(ErrorPageManager.java:539)
    at com.caucho.server.webapp.ErrorPageManager.sendError(ErrorPageManager.java:434)
    at com.caucho.server.connection.AbstractHttpResponse.sendError(AbstractHttpResponse.java:491)
    at com.caucho.server.connection.AbstractHttpResponse.sendError(AbstractHttpResponse.java:448)
    at org.roller.presentation.filters.RequestFilter.doFilter(RequestFilter.java:119)
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at org.roller.presentation.filters.PersistenceSessionFilter.doFilter(PersistenceSessionFilter.java:54)
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:163)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363)
    at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
    at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
    at java.lang.Thread.run(Thread.java:595)

  28. 5 Says:

    Everytime new announcements are posted to TSS (http://www.theserverside.com/tss) – shortly after, our good editor, Joseph Ottinger, will be sure to post another meaningless announcement so that his name appears at the top of TSS’s home page…ha ha!

    It’s probably his favorite game too!

  29. Joseph Ottinger Says:

    5, you dumb ass! I don’t post those news. My Java program does it for me. I am a musician and real Java consultant too. Yeah, Prick boy, eat your heart out!

    Go TSS!

    U Dun No Me

  30. Joseph Ottinger Says:

    Hani,
    pud,

    I had a rather nice dinner yesterday evening, we started with a bowel of New England clam chowder. The appetizers including lobster and crab spring rolls and oysters; my entre was the “Pacific Grill”, which included ling cod, a crab cake and swordfish, with crispy haricots and mashed potato. We ordered a Stags Leap pinot noir and a rather nice pinot gris from an Oregon vineyard. A few minutes ago, about 5:45 PM Eastern Standard Time, I shit it all out in a horrible bowel movement. Just thought I’d share.

    - J O U Dun No Me

  31. King Fahd Says:

    One word: AJAX. AJAX AJAX AJAX. Check my home page and stay out of my turf.

    Your king.

  32. warelock Says:

    Hi, Joe.

    Your dining experience was interesting. Your Pinot Gris was a conventional but undoubtedly pleasing choice – would you mind sharing the vineyard and vintage ? I’m less certain about the Pinot Noir, however, even with such robust dishes as the crab cakes and swordfish. I might prefer a spicy local Riesling, or even – hear me out, now – a quiet vin de blanc from the house cellars. Still, that’s just me.

    The food is also intriguing – it’s the first time I have heard of heard of a ‘bowel’ of clam chowder, although, given your subsequent defecatory experience, it seems an appropriate piece of service. Perhaps your saucy chef was trying to tell you something ?

    Of course, the highlight of your post, in my opinion, is your sharing of your horrible bowel movement. What a delightfully fresh and unusual story ! But don’t taunt us with hints – tell us more ! Was it the Mount St. Helens eruption-style extravaganza or the scattergun monsoon splatterfest ? It reminds of the time I fouled the windows of the 72nd and 73rd floors of the New York Hilton Canard – ah, but this is your story, not mine. Bon appetit, eh ?

    All other shit aside, however, Lotus Notes remains in a tragically unbiled state. Perhaps AJAX could help ?

  33. Rajesh Patel Says:

    This post hit home today. I’m trying to figure out how to do SOAP with attachments today. What a freaking mess. I’m half tempted to evaluate .Net for webservices.

  34. Jake Brake Says:

    This is a brilliant piece of work! I couldn’t stop laughing. You can count on the “big boys” to build something you don’t need and then create a belief that you need it. It is good that wsdl is pronounced “wiz-dul” and not “wis-dom”.

  35. Michael Vorburger Says:

    Regarding the verbosity of WSDL… have a look at my “SWSDL” approach and swsdl2wsdl thingie at http://www.vorburger.ch/blog1/2006/10/swsdl-simple-wsdl-format-and-my.html

    Greetings.

Leave a Reply