Wednesday, February 11, 2009

Shoutouts - First Edition

I'm taking a quick break from the MVP series to post my first edition of "Shoutouts." This series aims to acknowledge, summarize, and cite technical blog posts that have helped me solve extremely specific low-level tech problems. With the right descriptive keywords, I hope to make it that much easier for you to Google these than it was for me.




Posting Source Code on Blogger, Especially XML
A meta-Shoutout: the post you are now reading would not be possible without this guy's help.

Citation: Please Make A Note





Spring Web Services - Generating WSDL
To get the WSDL generator to include the hostname and full URL in your <soap:address location="">, add this to your web.xml file:

<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>

This tidbit was missing from the Spring WS Tutorial, and it cost me half a day. I don't know why transformWsdlLocations=true isn't just the default setting when configuring the dispatcher servlet, and I made this known in a comment to the cited blog replete with late-night histrionics.

Citation: Phill's J2EE Blog
Also: Mike's Blog





Spring Web Servies - AbstractStaxStreamPayloadEndpoint Sample
This is the only sample code I found for the AbstractStaxStreamPayloadEndpoint. There isn't even an example in the actual Spring-WS distribution. Using STAX is crucial for dealing with large XML requests and replies. You want to stream things whenever possible, rather than materializing giant DOMs.

Citation: Pascal's Blog





Tomcat, Log4J, Spring - Error: java.lang.IllegalStateException: Web app root system property already set to different value
It's quite likely that you'll use these three frameworks together. It's also quite likely you'll get this error message if you do. To fix it, add this to your web.xml:

<context-param>
<param-name>webAppRootKey</param-name>
<param-value>uniqueAppRootNamee</param-value>
</context-param>

To find out why, read the citation. It's Tomcat's fault. I love Tomcat but there is no earthly reason why this had to happen.

Citation: Glennn's Stuff





Maven Profile Activation
Discussion of the subtleties of Maven profile activation, including what <activeByDefault> really means. The word "subtleties" and the words "Maven profile activation" do not belong in the same sentence. This has made me want to back off of my use of Maven profiles, and I'm posting a comment to the cited blog asking what alternatives I can use to accomplish what I want.

Citation: James Lorenzen's Blog



Maven Jetty Plugin Configuration
The Maven Jetty Plugin saves tons of time when doing web app development. Unfortunately, its documentation page is incomplete, and does not fully specify how to change things as basic as the port number. Luckily, I found a blog post that does - see the citation.

Citation: aminal

No comments:

Post a Comment