<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>All About Interop : JAXWS</title><link>http://blogs.msdn.com/dotnetinterop/archive/tags/JAXWS/default.aspx</link><description>Tags: JAXWS</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Changing of the Guard: AXIS out, JAXWS in</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/07/30/changing-of-the-guard-axis-out-jaxws-in.aspx</link><pubDate>Wed, 30 Jul 2008 19:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8789718</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8789718.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8789718</wfw:commentRss><description>&lt;P&gt;I have come to a conclusion: I no longer want to deal with the hassle that has become Apache AXIS. &lt;/P&gt;
&lt;P&gt;Back in the day, when interconnecting Java to .NET was still novel, I started using Apache SOAP to show how interop between .NET and JAva was possible.&amp;nbsp; I was looking for something simple and easy, something that would allow interconnection without a ton of pain.&amp;nbsp; Apache SOAP was that thing.&amp;nbsp;&amp;nbsp; But Apache SOAP was brittle.&amp;nbsp; It had scads of problems with xsi:type and SOAP Section 4 encoding.&amp;nbsp; I needed something more flexible, something easier. &lt;/P&gt;
&lt;P&gt;Then came Glue from &lt;A class="" href="http://www.oreillynet.com/pub/d/506" mce_href="http://www.oreillynet.com/pub/d/506"&gt;The Mind Electric&lt;/A&gt;.&amp;nbsp; Glue was the easier, more flexible web services stack.&amp;nbsp; It was simple.&amp;nbsp; It worked.&amp;nbsp; It was actively maintained. &lt;A class="" href="http://grahamglass.blogs.com/about.html" mce_href="http://grahamglass.blogs.com/about.html"&gt;Graham Glass&lt;/A&gt; came regularly to Redmond to make sure the interop with .NET was good. &lt;/P&gt;
&lt;P&gt;Then TME got bought by WebMethods, and Glue disappeared.&amp;nbsp; I needed to pick a new Java&amp;nbsp;stack.&amp;nbsp;When AXIS came out, I switched, looking for better tools, and something that would be reliable, maintained longer term.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;At that time, I looked at Sun's web services stuff, but it was always bundled with a Web server or Open Office or a Sun Ray or something else from Sun I didn't want. It was like Scott McNealy's proverbial furball.&amp;nbsp; I just wanted a working web services stack, I didn't want to buy a Solaris Server.&amp;nbsp; I didn't want a furball.&amp;nbsp; So I went with AXIS.&amp;nbsp; I could use it on Tomcat, on JBoss, or on Jetty. I could use it client or server side.&amp;nbsp; I wrote a few pages on the AXIS&amp;nbsp;wiki, specifically around how to get it to work with .NET. I sat on the AXIS users mail list, responded to interop questions. &lt;/P&gt;
&lt;P&gt;AXIS (Version 1) worked great for a long time, still does in fact. It has connected to many different endpoints for me - &lt;A class="" href="http://msdn.microsoft.com/en-us/library/ms546696.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms546696.aspx"&gt;Excel Services&lt;/A&gt;, &lt;A class="" href="http://dinoch.dyndns.org:7070/axis1.4/" mce_href="http://dinoch.dyndns.org:7070/axis1.4/"&gt;WCF endpoints&lt;/A&gt;, .NET, SQL Server, and many other pieces.&amp;nbsp;&amp;nbsp;It was neat and clean; the tool options made sense.&amp;nbsp; The code it generated was pretty clean.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;But AXIS1&amp;nbsp;is no longer being maintained.&amp;nbsp; Any new standards (like &lt;A class="" href="http://en.wikipedia.org/wiki/MTOM" mce_href="http://en.wikipedia.org/wiki/MTOM"&gt;MTOM&lt;/A&gt; - heh, &lt;STRONG&gt;&lt;EM&gt;new since 2005&lt;/EM&gt;&lt;/STRONG&gt;) will not be supported in AXIS1. Also,&amp;nbsp;&lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/2008/07/29/connecting-to-exchange-using-jax-ws-part-1.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2008/07/29/connecting-to-exchange-using-jax-ws-part-1.aspx"&gt;it didn't work so well when it came to connecting to Exchange. AXIS2 likewise&lt;/A&gt;.&amp;nbsp;And that allowed me to step back and re-evaluate.&amp;nbsp; AXIS2 is current, but has become very large, the doc is poor, the support is invisible, the &lt;A class="" href="http://c2.com/cgi/wiki?CodeSmell" mce_href="http://c2.com/cgi/wiki?CodeSmell"&gt;generated code smells&lt;/A&gt;, and the seams are everywhere.&amp;nbsp; Fifty nine jar files?&amp;nbsp; Really?&amp;nbsp;&amp;nbsp; Do I need this hassle?&amp;nbsp; With JAX-WS, do I need AXIS any longer? I think not.&lt;/P&gt;
&lt;P&gt;I'm switching to &lt;A class="" href="http://en.wikipedia.org/wiki/JAX-WS" mce_href="http://en.wikipedia.org/wiki/JAX-WS"&gt;JAX-WS&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This is kinda backwards, because my goal is to show customers that they can in fact connect disparate systems together.&amp;nbsp; Given that goal, my own interests should rank near the bottom in the list of criteria for selecting a web services library.&amp;nbsp; It should be - &lt;EM&gt;what are customers using&lt;/EM&gt;?&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;What do customers want to see&lt;/EM&gt;?&amp;nbsp; But I honestly cannot believe customers will continue to put up with the furball that AXIS2 has become. &lt;/P&gt;
&lt;P&gt;And if I am in a position to make a recommendation, I will recommend JAX-WS. &lt;/P&gt;
&lt;P&gt;It works. There is a single runtime jar file. The tools are better.&amp;nbsp; The interop is good. It's fast.&amp;nbsp; I'm happy.&lt;/P&gt;
&lt;P&gt;I'm changing my decision but I haven't changed my criteria.&amp;nbsp; I still want something that just works, simply.&amp;nbsp; Basically I want the closest philosophoical equivalent of .NET, but in Java.&amp;nbsp; &amp;nbsp; AXIS used to be that.&amp;nbsp; Now, JAX-WS fits that bill. &lt;/P&gt;
&lt;P mce_keep="true"&gt;I still love .NET and WCF.&amp;nbsp;&amp;nbsp; But if I need to connect to .NET from Java, I will use JAX-WS.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8789718" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/AXIS/default.aspx">AXIS</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/JAXWS/default.aspx">JAXWS</category></item><item><title>Connecting to Exchange using JAX-WS, part 1</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/07/29/connecting-to-exchange-using-jax-ws-part-1.aspx</link><pubDate>Tue, 29 Jul 2008 21:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8789662</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8789662.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8789662</wfw:commentRss><description>&lt;FONT face=Tahoma size=2&gt;
&lt;H3&gt;Yes, it is possible to Connect to Exchange using JAX-WS&lt;/H3&gt;
&lt;P&gt;The fear and trepidation I had when considering the effort to connect a Java application to Exchange Server 2007 was well founded. It wasn't easy. I'm going to spoil the ending and tell you, yes, it is possible to connect Java apps to Exchange Server via Web services, and you can do it securely and with good performance and reliability. But it took some starts and stops to make it happen. &lt;/P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;!-- ------------------------------------------------------- --&gt;
&lt;H4&gt;Warning: Old Guy Reminiscing Ahead&lt;/H4&gt;
&lt;P&gt;Back a few years, I was a technical marketing guy for the Microsoft platform, and my main role Was talking to customers. One of the things I talked with customers about often, was interop. Pretty much every customer I talked to already had a signficant investment in information technology, they had a strategy that was in place and working, they had systems in place, working. They had off-the-shelf apps, they had some custom-built apps, and they had skillz. They were looking to make adjustments, to evolve their systems, to improve. It reminded me of the principles of Agile Development. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Do you remember &lt;A href="http://en.wikipedia.org/wiki/Extreme_Programming" mce_href="http://en.wikipedia.org/wiki/Extreme_Programming"&gt;XP&lt;/A&gt;? Do you remember how trendy that was, like 3 or 4 years ago. Everyone was talking about XP, everyone was looking to apply XP principles into their approaches. That seems a long time ago. XP is &lt;B&gt;so 2004&lt;/B&gt;. &lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The approach that companies took with their information systems architecture was something like what developers did in a different domain with XP. Lots of little iterations, constant improvement, and steadily you get closer to your goal. &lt;/P&gt;
&lt;P&gt;I remember talking to customers about web services technology, about using standard XML-based protocols to enable better connections between disparate information systems. Yes, Virginia, this was actually a theme of my conversations back only a few years ago. Now it seems so obvious. Now that everything speaks XML and interconnection is fairly easy, the wisdom of using standard protocols to gain efficiencies in IT is apparent. But only a short time ago this issue was not so clearly understood. &lt;/P&gt;
&lt;P&gt;To make my case that web services and XML based protocols were the future, I'd show customers the investments that Microsoft was making into them. I'd tell them about all the standards was Microsoft working on. But the thing that customers wanted was hard evidence - not standards or papers. They wanted proof of XML usage in Microsoft products. So I'd talk about all the XML-based protocols that were already in the existing Microsoft systems they had: the web services libraries in the .NET Framework, the tooling in Visual Studio (but these were fairly obvious). The XML shredding capability that was introduced in SQL 2000 and improved in SQL 2005. Actually with the &lt;A href="http://msdn.microsoft.com/en-us/library/ms191268.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms191268.aspx"&gt;FOR XML&lt;/A&gt; clause you can do some pretty nifty things with the data that is already in your database. The &lt;A href="http://en.wikipedia.org/wiki/MSXML" mce_href="http://en.wikipedia.org/wiki/MSXML"&gt;MSXML&lt;/A&gt; component - now sort of just accepted as part of the landscape, a key, if almost forgotten enabler of AJAX - but 6 or 7 years ago it was undergoing rapid development.&lt;/P&gt;
&lt;P&gt;These are all pretty good examples of Microsoft's investment in XML and WS-*. But one of the things that really surprised people was the web services capabilities we were introducing into Office (with WordML and ExcelML and so on), and the Exchange Server. &lt;/P&gt;&lt;!-- ------------------------------------------------------- --&gt;
&lt;H4&gt;Exchange Server 2007 and Web services &lt;/H4&gt;
&lt;P&gt;Exchange Server 2003 had some limited web services capabilities. With Exchange Server 2007, Microsoft delivered an email and collab server that &lt;A href="http://msdn.microsoft.com/en-us/library/bb204119(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb204119(EXCHG.80).aspx"&gt;exposed all of its features through standard web services interfaces&lt;/A&gt;. Today if you have an Exchange Server, you can point your browser to http://my.exchange.server.com/ews/Exchange.asmx and get a WSDL for the server. Wow. That is pretty cool. &lt;/P&gt;
&lt;P&gt;Standards are standards, and complying to a standard doesn't guarantee interop. If you are designing a web services interface, you can get better interop by keeping your WSDL fairly simple, and constraining your interface definitions to avoid some of the more esoteric nooks and crannies of the XML Schema spec. This is advice we've all been following for years. It works. &lt;/P&gt;
&lt;P&gt;The problem with that advice is that it does not work if the information systems at the end of the wire are not simple, or if the requirements are not simple. For example, if you want WS-Addressing or delegated security, things can get complicated. And, similarly, Exchange Server is not simple. It stores lots of different types of things (email messages, contacts, tasks, notes, calendar entries, requests, resent items, recurrences, mime content type, cancellations, suggestions for new times, and so on). And then it compounds that complexity by adding in an unstructured aspect - document attachments and other unstructured data. Then there is stuff like impersonation, delegation (your admin assistant can update your calendar), out-of-office messages, and so on. It's pretty rich. &lt;/P&gt;
&lt;P&gt;With all that capability, necessarily, the interface to Exchange is not going to be simple. Look at the &lt;EM&gt;user&lt;/EM&gt; interface in Outlook - it is pretty rich. And the same is true with the &lt;EM&gt;network&lt;/EM&gt; interface on the wire, described in the WSDL. &lt;/P&gt;
&lt;P&gt;As a result, the WSDL for Exchange is complicated. It's big. It's got lots of nested structures. There are unions and restrictions and headers and bodies. It breaks all the rules for designing schema with interop in mind. &lt;/P&gt;
&lt;P&gt;Anyway, who needs web services, right? We can &lt;A href="http://blogs.msdn.com/dotnetinterop/archive/2008/07/21/connecting-java-to-exchange-over-webdav-with-apache-httpclient.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2008/07/21/connecting-java-to-exchange-over-webdav-with-apache-httpclient.aspx"&gt;use WebDAV&lt;/A&gt;! &lt;/P&gt;&lt;!-- ------------------------------------------------------- --&gt;
&lt;H4&gt;Interop and the Exchange Server web services interface &lt;/H4&gt;
&lt;P&gt;First decision: which web services library to use? My first thought was to use the tried-and-true &lt;A href="http://ws.apache.org/axis/" mce_href="http://ws.apache.org/axis/"&gt;Apache AXIS 1.4&lt;/A&gt; library that I had been depending on since 2006. It wasn't &lt;EM&gt;THAT&lt;/EM&gt; old, and it worked for all the other interop tasks I had tried it on. It &lt;A href="http://dinoch.dyndns.org:7070/axis1.4/" mce_href="http://dinoch.dyndns.org:7070/axis1.4/"&gt;connected to .NET systems using ASMX or WCF.&lt;/A&gt; It was simple. I knew the tools. &lt;/P&gt;
&lt;P&gt;My first step was to grab the Exchange.wsdl, the types.xsd and the message.xsd. I knew that I needed to add a service definition to the end of the Exchange.wsdl file, because most WSDL compilers want it: &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;   &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;service&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"ExchangeServices"&lt;/SPAN&gt;&amp;gt;
     &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;port&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"ExchangeServicePort"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;binding&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"tns:ExchangeServiceBinding"&lt;/SPAN&gt;&amp;gt;
       &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;address&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;location&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"https://myexchange.company.com/EWS/Exchange.asmx"&lt;/SPAN&gt;/&amp;gt;
     &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;port&lt;/SPAN&gt;&amp;gt;
   &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;service&lt;/SPAN&gt;&amp;gt;

&amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;definitions&lt;/SPAN&gt;&amp;gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;But very early the work with AXIS 1.4 was hitting roadblocks. That library generated source code that did not compile. It choked on quite a few things. Other people have &lt;A href="http://forums.microsoft.com/technet/showpost.aspx?postid=2199009&amp;amp;siteid=17" mce_href="http://forums.microsoft.com/technet/showpost.aspx?postid=2199009&amp;amp;siteid=17"&gt;walked this path&lt;/A&gt; but custom modifications to the generated code did not sound like fun to me. I quickly decided that I'd need to move to something else. &lt;/P&gt;
&lt;P&gt;My next idea was to move to &lt;A href="http://ws.apache.org/axis2/" mce_href="http://ws.apache.org/axis2/"&gt;AXIS2&lt;/A&gt;, which, coincidentally, is also at version 1.4. Now why they chose to call it "AXIS2 1.4" instead of "AXIS 2.4" is beyond me. There is a significant breakage in back-compatability with the move to AXIS to AXIS2, but still the version numbers are very confusing. &lt;/P&gt;
&lt;P&gt;AXIS2 introduces a number of changes over AXIS (1). The AXIS guys improved the XML schema support, for one. Also, they made the XML serialization engine pluggable, so you can use the built-in simple library (called ADB), or you can switch to use &lt;A href="http://jibx.sourceforge.net/" mce_href="http://jibx.sourceforge.net/"&gt;JiBX&lt;/A&gt; or &lt;A href="http://xmlbeans.apache.org/overview.html" mce_href="http://xmlbeans.apache.org/overview.html"&gt;XMLBeans&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;As with AXIS1, I ran the Exchange WSDL through the AXIS2 tools to generate the client-side proxies. This time, the code actually compiled. I was pleased to see that there was just one giant Java file generated for the entire Exchange interface. In AXIS 1.4, there was a whole series of files, 447 of em. Too many, thought I. But AXIS2 v1.4 generated just one file. Cool! &lt;/P&gt;
&lt;P&gt;And it was a big one. Opening the file in emacs - emacs asked me, "are you sure you want to open this file? it's really big!" Seriously. And compiling that single file with javac, I actually got a heap overflow. Wow! That's a big file. I just used the -X heap magic incantations on that file and I was able to compile it. &lt;/P&gt;
&lt;P&gt;I wrote up a simple proof of concept Java class that used the generated AXIS stub classes to connect to Exchange Server. When I ran the code, I got a failure: &lt;B&gt;"required attribute localTraversal is null" &lt;/B&gt;I had no idea where that was leading me. I searched in the WSDL and schema for Exchange but couldn't find any elements or attributes by that name. I considered ripping open the AXIS2 source code to try to troubleshoot it. Wasn't real excited about that prospect. I had no idea where that was leading me. &lt;/P&gt;
&lt;P&gt;My next step was to try the XMLbeans serialization option in AXIS 2. With this, I was back to generating ~ 400 Java files. But I didn't care, as long as the interop worked. And I had to update my client application code, because switching from ADB to XMLBeans necessitates a change in the programming model. I didn't care, though. Interop! (The things I do for interop!)&lt;/P&gt;
&lt;P&gt;The AXIS2 + XMLbeans combo was looking promising, but also failed, this time with &lt;/P&gt;&lt;PRE&gt;java.lang.ClassCastException: org.apache.xmlbeans.impl.values.XmlComplexContentImpl cannot be cast to com.microsoft.schemas.exchange.services._2006.types.Folder
IdType
&lt;/PRE&gt;
&lt;P&gt;This is apparently a common error, if there is a duplication in classes. I don't think I had that. I keep a clean workspace. Some of the XMLBeans people suggested on forums to upgrade to the later version of XMLBeans. There was no better suggestion I found. The AXIS2 library bundles XMLBeans 2.3.0, but XMLBeans standalone was at v2.4.0. So I downloaded 2.4.0, and tried to manually compile the schema with the scomp tool. &lt;/P&gt;&lt;PRE&gt;c:\apache\xmlbeans-2.3.0\bin\scomp -out GeneratedTypes.jar contract\ExchangeServices.wsdl  -compiler c:\sunjdk\bin\javac.exe
&lt;/PRE&gt;
&lt;P&gt;But, then, another runtime exception:&lt;/P&gt;&lt;PRE&gt;Exception in thread "main" java.lang.NoClassDefFoundError: com/microsoft/schemas/exchange/services/_2006/types/FolderIdType
        at ExchangeClient.Run(ExchangeClient.java:161)
        at ExchangeClient.main(ExchangeClient.java:217)
Caused by: java.lang.ClassNotFoundException: com.microsoft.schemas.exchange.services._2006.types.FolderIdType
        at java.net.URLClassLoader$1.run(Unknown Source)
&lt;/PRE&gt;
&lt;P&gt;It was one problem after another. Also, I had found the documentation and examples to be completely lacking for AXIS2. I couldn't find anyplace that gave me any hints. Why was it so hard to find information on this thing? And why did I have to use Class.Factory.Create(); instead of just calling new Class(). How dumb is this? And finally, there were 59 JAR files I needed to reference for AXIS2. That's what the doc told me. Commons-logging, xmlbeans, axis-api, axis-rt, corba, neethi, axiom, anogen, and on and on. I don't even know what those things are. The whole thing felt very... messy. I've already experienced JAR Hell and I don't want to go back there. I'm sure each one of those jars is required, but AXIS2 *could* be a little more seamless. As it is, it feels like a science project. &lt;/P&gt;
&lt;P&gt;Ok, time to switch horses. The AXIS Stuff was not giving me joy. My next attempt would be to use &lt;A href="https://jax-ws.dev.java.net/" mce_href="https://jax-ws.dev.java.net/"&gt;JAXWS&lt;/A&gt;. 
&lt;P&gt;With JAXWS, there is one runtime JAR. One. The code-gen produces... a JAR. How refreshing! I don't need 400 class files. I can just reference a JAR. (Yes, I know there are 400 classes inside the jar.&amp;nbsp; I don't care.&amp;nbsp; It's a single jar).&amp;nbsp; Hmm, someone ought to tell the AXIS project about this upstart JAXWS. The stub classes get generated and compile nicely. (small victory, cross fingers and hope for more). I am starting to like JAXWS. &lt;/P&gt;
&lt;P&gt;The programming model exposed by JAXWS-generated client-side classes is a little different than what I was used to. Rather than using return values from a stub method for the response, JAXWS has this idea of using the &lt;A href="http://search.msn.com/results.aspx?q=javax.xml.ws.holder&amp;amp;form=QBRE" mce_href="http://search.msn.com/results.aspx?q=javax.xml.ws.holder&amp;amp;form=QBRE"&gt;javax.xml.ws.Holder&lt;/A&gt; class for return values. Kinda odd, but... &lt;A href="http://uk.youtube.com/watch?v=Xz7_3n7xyDg" mce_href="http://uk.youtube.com/watch?v=Xz7_3n7xyDg"&gt;whatever&lt;/A&gt;. Maybe there is a way to change the client-side programming model, but I wasn't going to worry about that right then. &lt;/P&gt;
&lt;P&gt;There is some stuff in the Exchange interface (WSDL) having to do with impersonation and SerializedSecurityContext in each request on the EWS Service port, which is not useful. I'm using neither of those things, yet they are included in every Web services stub method. Passing null for these parameters does not satisfy, I get an error saying that I cannot set that to xsi:nil unless the schema has nillable='true'. I tried fiddling with the WSDL.. to set it to nillable in the right spots... That didn't work, so I just removed that stuff from the WSDL completely, from every wsdl:message in the WSDL file: &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;message&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"GetFolderSoapIn"&lt;/SPAN&gt;&amp;gt;
                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;part&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"request"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;element&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"tns:GetFolder"&lt;/SPAN&gt; /&amp;gt;
&lt;SPAN style="COLOR: #b22222"&gt;&amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;dinoch - change for JAXWS
                &amp;lt;wsdl:part name="Impersonation" element="t:ExchangeImpersonation"/&amp;gt;
                &amp;lt;wsdl:part name="S2SAuth" element="t:SerializedSecurityContext"/&amp;gt;
                &amp;lt;wsdl:part name="MailboxCulture" element="t:MailboxCulture"/&amp;gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;--&amp;gt;&lt;/SPAN&gt;
                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;part&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"RequestVersion"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;element&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"t:RequestServerVersion"&lt;/SPAN&gt;/&amp;gt;
        &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;message&lt;/SPAN&gt;&amp;gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;and also from every soap:operation:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;operation&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"GetItem"&lt;/SPAN&gt;&amp;gt;
                        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;operation&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;soapAction&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/messages/GetItem"&lt;/SPAN&gt; /&amp;gt;
                        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;input&lt;/SPAN&gt;&amp;gt;
&lt;SPAN style="COLOR: #b22222"&gt;&amp;lt;!--&lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;
                                &amp;lt;soap:header message="tns:GetItemSoapIn" part="Impersonation" use="literal"/&amp;gt;
                                &amp;lt;soap:header message="tns:GetItemSoapIn" part="S2SAuth" use="literal"/&amp;gt;
                                &amp;lt;soap:header message="tns:GetItemSoapIn" part="MailboxCulture" use="literal"/&amp;gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;--&amp;gt;&lt;/SPAN&gt;
                                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;header&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;message&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"tns:GetItemSoapIn"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;part&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"RequestVersion"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;use&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"literal"&lt;/SPAN&gt;/&amp;gt;
                                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;body&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;parts&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"request"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;use&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"literal"&lt;/SPAN&gt; /&amp;gt;
                        &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;input&lt;/SPAN&gt;&amp;gt;
                        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;output&lt;/SPAN&gt;&amp;gt;
                                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;body&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;parts&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"GetItemResult"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;use&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"literal"&lt;/SPAN&gt; /&amp;gt;
                                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;header&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;message&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"tns:GetItemSoapOut"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;part&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"ServerVersion"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;use&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"literal"&lt;/SPAN&gt;/&amp;gt;
                        &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;output&lt;/SPAN&gt;&amp;gt;
                &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;operation&lt;/SPAN&gt;&amp;gt;
                &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;wsdl&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;operation&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"CreateItem"&lt;/SPAN&gt;&amp;gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Ok, I was getting somewhere. With this change I was able to send a FindItem message over the wire to Exchange, and get message IDs back. &lt;B&gt;Very cool.&lt;/B&gt; The approach I was taking was to use findItem to get the item IDs, and then use GetItem on the Ids to get the full content. The FindItem() was working flawlessly, but the GetItem() was not. I was not getting the results I expected. No exceptions, but my data was not coming back. &lt;/P&gt;
&lt;P&gt;To troubleshoot this, I used &lt;A href="http://www.fiddler2.com/Fiddler2/" mce_href="http://www.fiddler2.com/Fiddler2/"&gt;Fiddler2&lt;/A&gt; to see the HTTP messages back and forth between Java and Exchange. Because the communication was using SSL for encryption, Fiddler2 does not work. Some people have used &lt;A href="http://www.charlesproxy.com/" mce_href="http://www.charlesproxy.com/"&gt;Charles&lt;/A&gt;, a similar web debugging proxy. But I already had Fiddler, so... With the fiddler tool I could see &lt;EM&gt;exactly&lt;/EM&gt; why the GetItem message was not giving me joy. (By the way, if you use Fiddler to decrypt SSL traffic, it's necessary to specify to the Java app that it should accept any SSL traffic - basically disable cert validation in the application. Only do this for testing purposes!!) &lt;/P&gt;
&lt;P&gt;Correct flow from a .NET app to Exchange:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;&amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Envelope&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;soap&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.xmlsoap.org/soap/envelope/"&lt;/SPAN&gt;&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;soap&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Body&lt;/SPAN&gt;&amp;gt;
    &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;GetItem&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/messages"&lt;/SPAN&gt;&amp;gt;
      &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ItemShape&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;BaseShape&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/SPAN&gt;&amp;gt;Default&amp;lt;/&lt;SPAN style="COLOR: #0000ff"&gt;BaseShape&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;AdditionalProperties&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/SPAN&gt;&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;FieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Subject"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;FieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Body"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;FieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Categories"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ExtendedFieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;PropertySetId&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"0006200E-0000-0000-C000-000000000046"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;PropertyId&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"35584"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;PropertyType&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"Integer"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ExtendedFieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;PropertyTag&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"0x10F3"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;PropertyType&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"String"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ExtendedFieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;PropertyTag&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"0x3008"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;PropertyType&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"SystemTime"&lt;/SPAN&gt; /&amp;gt;
        &amp;lt;/&lt;SPAN style="COLOR: #0000ff"&gt;AdditionalProperties&lt;/SPAN&gt;&amp;gt;
      &amp;lt;/&lt;SPAN style="COLOR: #0000ff"&gt;ItemShape&lt;/SPAN&gt;&amp;gt;
      &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ItemIds&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ItemId&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;Id&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"AAAZAERpbm8uQ2hpZXNhQG1pY3Jvc29mdC5jb20ARgAAAAAALBHixAbt0hGt6gCAX5/eGgcAd75VstDi0RGt3QCAX5/eGgAAAnopngAAEKx2OMNuVUuHEMvofVOxpwANFT4iewAA"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;ChangeKey&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"AAAAABQAAAAdMskaJAAzTpK1s6mN4vCnAAhyCw=="&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/SPAN&gt; /&amp;gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Broken flow from a JAXWS app to Exchange:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;&amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Envelope&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;S&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.xmlsoap.org/soap/envelope/"&lt;/SPAN&gt;&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Header&lt;/SPAN&gt;&amp;gt;
    &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;RequestServerVersion&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/messages"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;ns2&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;Version&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"Exchange2007_SP1"&lt;/SPAN&gt; /&amp;gt;
  &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Header&lt;/SPAN&gt;&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Body&lt;/SPAN&gt;&amp;gt;
    &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;GetItem&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/messages"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;ns2&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/SPAN&gt;&amp;gt;
      &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ItemShape&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;BaseShape&lt;/SPAN&gt;&amp;gt;Default&amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;BaseShape&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;AdditionalProperties&lt;/SPAN&gt;&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Path&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;xsi&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://www.w3.org/2001/XMLSchema-instance"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xsi&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;type&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"ns2:PathToUnindexedFieldType"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Subject"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Path&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;xsi&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://www.w3.org/2001/XMLSchema-instance"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xsi&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;type&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"ns2:PathToUnindexedFieldType"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Body"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Path&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;xsi&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://www.w3.org/2001/XMLSchema-instance"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xsi&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;type&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"ns2:PathToUnindexedFieldType"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Categories"&lt;/SPAN&gt; /&amp;gt;
        &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;AdditionalProperties&lt;/SPAN&gt;&amp;gt;
      &amp;lt;/&lt;SPAN style="COLOR: #0000ff"&gt;ItemShape&lt;/SPAN&gt;&amp;gt;
      &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ItemIds&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;ItemId&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;ChangeKey&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"AAAAABQAAAAdMskaJAAzTpK1s6mN4vCnAAhyCw=="&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;Id&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"AAMkAGUwNmJhYWVjLTI1ZTgtMTFkMy05MDc5LTAwODA1ZjMxZjgyNgBGAAAAAAAsEeLEBu3SEa3qAIBfn94aBwB3vlWy0OLREa3dAIBfn94aAAACeimeAAAQrHY4w25VS4cQy+h9U7GnAA0VPiJ7AAA="&lt;/SPAN&gt; /&amp;gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Exchange wasn't sending me the data I expected, because the JAXWS request message was not what Exchange expected it to be. With this understanding, I looked into the contract. For the element in question, the schema used a ref="type" structure, and this was the only use of the ref in the entire contract. Clearly causing a problem; JAXWS was formatting it strangely. I modified it to eliminate the ref, just as a test. &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;  &lt;SPAN style="COLOR: #b22222"&gt;&amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;Arrays of paths &lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;--&amp;gt;&lt;/SPAN&gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;complexType&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"NonEmptyArrayOfPathsToElementType"&lt;/SPAN&gt;&amp;gt;
    &lt;SPAN style="COLOR: #b22222"&gt;&amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;using choice here so that proxy generator will not flatten the array and thus lose the
                item element names &lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;--&amp;gt;&lt;/SPAN&gt;
    &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;choice&lt;/SPAN&gt; maxOccurs =&lt;SPAN style="COLOR: #bc8f8f"&gt;"unbounded"&lt;/SPAN&gt;&amp;gt;
&lt;SPAN style="COLOR: #b22222"&gt;&amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;dinoch - change for jaxws &lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;--&amp;gt;&lt;/SPAN&gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;element&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"Path"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;type&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"t:BasePathToElementType"&lt;/SPAN&gt;/&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;element&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"FieldURI"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;type&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"t:PathToUnindexedFieldType"&lt;/SPAN&gt; /&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;element&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"IndexedFieldURI"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;type&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"t:PathToIndexedFieldType"&lt;/SPAN&gt; /&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;element&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;name&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"ExtendedFieldURI"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;type&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"t:PathToExtendedFieldType"&lt;/SPAN&gt;/&amp;gt;

&lt;SPAN style="COLOR: #b22222"&gt;&amp;lt;!--&lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;
      &amp;lt;xs:element ref="t:Path"/&amp;gt;
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #b22222"&gt;--&amp;gt;&lt;/SPAN&gt;

    &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;choice&lt;/SPAN&gt;&amp;gt;
  &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;xs&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;complexType&lt;/SPAN&gt;&amp;gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;After re-generating the client-side stubs, I was able to get the GetItem message to work nicely. Here's the message from JAXWS after the change in schema: &lt;/P&gt;
&lt;DIV style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 2pt; FONT-SIZE: 9pt; BACKGROUND: white; PADDING-BOTTOM: 2pt; BORDER-LEFT: windowtext 1pt solid; COLOR: black; LINE-HEIGHT: 98%; PADDING-TOP: 2pt; BORDER-BOTTOM: windowtext 1pt solid; FONT-FAMILY: Consolas, Courier New"&gt;&lt;PRE&gt;&amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Envelope&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;S&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.xmlsoap.org/soap/envelope/"&lt;/SPAN&gt;&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Header&lt;/SPAN&gt;&amp;gt;
    &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;RequestServerVersion&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/messages"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;ns2&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;Version&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"Exchange2007_SP1"&lt;/SPAN&gt; /&amp;gt;
  &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Header&lt;/SPAN&gt;&amp;gt;
  &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;S&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;Body&lt;/SPAN&gt;&amp;gt;
    &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;GetItem&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;xmlns&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/messages"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #da70d6"&gt;xmlns&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #b8860b"&gt;ns2&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"http://schemas.microsoft.com/exchange/services/2006/types"&lt;/SPAN&gt;&amp;gt;
      &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ItemShape&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;BaseShape&lt;/SPAN&gt;&amp;gt;Default&amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;BaseShape&lt;/SPAN&gt;&amp;gt;
        &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;AdditionalProperties&lt;/SPAN&gt;&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;FieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Subject"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;FieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Body"&lt;/SPAN&gt; /&amp;gt;
          &amp;lt;&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;FieldURI&lt;/SPAN&gt; &lt;SPAN style="COLOR: #b8860b"&gt;FieldURI&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #bc8f8f"&gt;"item:Categories"&lt;/SPAN&gt; /&amp;gt;
        &amp;lt;/&lt;SPAN style="COLOR: #da70d6"&gt;ns2&lt;/SPAN&gt;:&lt;SPAN style="COLOR: #0000ff"&gt;AdditionalProperties&lt;/SPAN&gt;&amp;gt;
      &amp;lt;/&lt;SPAN style="COLOR: #0000ff"&gt;ItemShape&lt;/SPAN&gt;&amp;gt;
      &amp;lt;&lt;SPAN style="COLOR: #0000ff"&gt;ItemIds&lt;/SPAN&gt;&amp;gt;
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;After that, it was a matter of writing up the code to use the jaxws-generated stubs. It all works nicely now. It's pretty darn fast, too! &lt;/P&gt;
&lt;P&gt;Let me summarize what I did to get Java to talk to Exchange:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Modified the exchange.wsdl to include a service definition, and to remove all occurrences of impersonation, S2SAuth, and MailboxCulture from each wsdl:message.&lt;/LI&gt;
&lt;LI&gt;Modified the types.xsd to eliminate the ref="t:Path", and replace it with actual elements&lt;/LI&gt;
&lt;LI&gt;Use Fiddler2 to trace and debug the SOAP messages. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The bottom line is that web services interop is possible even with complicated schema and interfaces, if you are willing to get your hands dirty on the schema, and if you choose the right tools. &lt;/P&gt;
&lt;P&gt;In part 2 of this story, I'll show you some of the application code that uses the JAXWS-generated client classes, and I'll pack up the source code for everything too. &lt;/P&gt;
&lt;P&gt;Great resources: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://tp.its.yale.edu/confluence/display/EXCH/Introduction+to+MS+Exchange+Web+Services+via+Java%28JAXWS%29?focusedCommentId=3080591" mce_href="http://tp.its.yale.edu/confluence/display/EXCH/Introduction+to+MS+Exchange+Web+Services+via+Java%28JAXWS%29?focusedCommentId=3080591"&gt;Good hints from a Yaley&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc540448(EXCHG.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc540448(EXCHG.80).aspx"&gt;Tech article library on MSDN, covering Exchange Web Services&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.fiddler2.com/Fiddler2/" mce_href="http://www.fiddler2.com/Fiddler2/"&gt;Fiddler2&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=838&amp;amp;SiteID=17" mce_href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=838&amp;amp;SiteID=17"&gt;TechNet forum on Exchange Development&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Cheers, &lt;BR&gt;-Dino &lt;/P&gt;&lt;/FONT&gt;&lt;!-- ------------------------------------------------------- --&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8789662" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/AXIS/default.aspx">AXIS</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/XML/default.aspx">XML</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/JAXWS/default.aspx">JAXWS</category></item></channel></rss>