There is no <service> element in ews/services.wsdl. WHY?!Hi! When i recieved an error trying to generate client from ews/services.wsdl I inspected it's source and found that there is no &lt;service&gt; element at all!  Why it is not there? And how can I fix it? Thanx!<br>© 2009 Microsoft Corporation. All rights reserved.Thu, 11 Dec 2008 01:38:50 Zd48a2b4f-828a-41ae-b562-3706de67ba31http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#d48a2b4f-828a-41ae-b562-3706de67ba31http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#d48a2b4f-828a-41ae-b562-3706de67ba31Kamradhttp://social.technet.microsoft.com/Profile/en-US/?user=KamradThere is no <service> element in ews/services.wsdl. WHY?!Hi! When i recieved an error trying to generate client from ews/services.wsdl I inspected it's source and found that there is no &lt;service&gt; element at all!  Why it is not there? And how can I fix it? Thanx!<br>Mon, 13 Aug 2007 14:55:09 Z2007-08-13T14:55:09Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#106d70eb-2e6f-4f3a-98e4-4e54d3525985http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#106d70eb-2e6f-4f3a-98e4-4e54d3525985krish.sunihttp://social.technet.microsoft.com/Profile/en-US/?user=krish.suniThere is no <service> element in ews/services.wsdl. WHY?!<br>I manually added the following at the end of services.wsdl :-<br><br>...<br> <div style="text-align:left"> <div class=codeseg> <div class=codecontent> <div class=codesniptitle><span style="width:100%">Code Snippet</span></div> <p>  &lt;wsdl:service name=&quot;ExchangeWebService&quot;&gt;<br>    &lt;wsdl:port name=&quot;ExchangeWebPort&quot; binding=&quot;tns:ExchangeServiceBinding&quot;&gt;<br>      &lt;soap:address<br>      location=&quot;https://myserver/EWS/exchange.asmx&quot; /&gt;<br>    &lt;/wsdl:port&gt;<br>  &lt;/wsdl:service&gt;<br><br>&lt;/wsdl:definitions&gt;</p></div></div><br></div><br>Let me know if you make more progress.<br><br><br><br>Mon, 13 Aug 2007 16:20:06 Z2007-08-13T16:20:06Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#bc65699b-bcc6-40f5-8b1f-70019a338e7ehttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#bc65699b-bcc6-40f5-8b1f-70019a338e7eKamradhttp://social.technet.microsoft.com/Profile/en-US/?user=KamradThere is no <service> element in ews/services.wsdl. WHY?!Thanks a lot. Now everything seems fine. Stub classes are generated. But... In Exchange SDK tutorial for C# everything is working around ExchangeServiceBinding class. It is used to set login/pass, domain and endpoint.<br><br>ExchangeServiceBinding esb = new ExchangeServiceBinding();<br>esb.Credentials = new NetworkCredential(&quot;username&quot;, &quot;password&quot;, &quot;domain&quot;);<br>esb.Url = &quot;https://CAS01.contoso.com/EWS/exchange.asmx&quot;;<br><br>But with jaxws (java toolkit for webservices development) there is no such class. When I should specify access parameters?  I'm new to web services at all, so may be I don't understand something. Can you clearify situation for me?<br>Tue, 14 Aug 2007 10:30:12 Z2007-08-14T10:30:12Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#dcb4d13e-5a51-4eb8-8d4d-07c94cd4ed00http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#dcb4d13e-5a51-4eb8-8d4d-07c94cd4ed00krish.sunihttp://social.technet.microsoft.com/Profile/en-US/?user=krish.suniThere is no <service> element in ews/services.wsdl. WHY?!Iam pretty much in the same boat. Could not get a web service client working. Will share as i make more progress.<br>Wed, 15 Aug 2007 19:39:51 Z2007-08-15T19:39:51Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#e60902ec-f7d6-4d78-9428-5308f190a12bhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#e60902ec-f7d6-4d78-9428-5308f190a12bKamradhttp://social.technet.microsoft.com/Profile/en-US/?user=KamradThere is no <service> element in ews/services.wsdl. WHY?!All right then... If I'll figure out something I'll share it too. Good luck! <br>Thu, 16 Aug 2007 06:46:07 Z2007-08-16T06:46:07Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#e32f90c0-916f-47ad-b254-9a577e0f1804http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#e32f90c0-916f-47ad-b254-9a577e0f1804David Sterling - MSFThttp://social.technet.microsoft.com/Profile/en-US/?user=David%20Sterling%20-%20MSFTThere is no <service> element in ews/services.wsdl. WHY?!<p>We wrestled with this one for a while before we omitted the wsdl<img height=19 alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif" width=19>ervice element.  Some may disagree with our decision, but there were several complications/concerns that caused us to choose the path that we did.</p> <p align=left> </p> <p align=left>1.  It is not always a good thing to expose machine names or vdir URLs within a WSDL file for security reasons.  Although access to the WSDL file is limited to authenticated users in a standard EWS installation, it is easy enough to publish that WSDL file in a non secure place and forget that is contains URLs that you might not want to make public.</p> <p align=left>2.  It is not easy to determine at install time if a given CAS box is actually behind an NLB.  If this is the case, the URL in the service section should be the URL of the NLB instead of the URL of the vdir for that specific box.  Of course, admins could simply go in and modify the &lt;service&gt; element to point to the external NLB URL, but then they could also just add the service section at that point too.</p> <p align=left>3.  The various Visual Studio tools (and some non-VS ones too) are able to generate proxy classes from a WSDL file that doesn't have the &lt;wsdl<img height=19 alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif" width=19>ervice&gt; section.  For those that require it, it is simple to add the service element with the appropriate information, but that should be an explicit decision rather than the default one.</p> <p align=left> </p> <p align=left>Hope this helps.</p> <p align=left> </p> <p align=left> </p> <p align=left> </p> <p align=left> </p> <p align=left><font face=Arial size=2></font> </p>Thu, 16 Aug 2007 14:03:08 Z2007-08-16T14:03:08Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#8e25b739-b3ce-47af-bed1-cc05ac4ede3dhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#8e25b739-b3ce-47af-bed1-cc05ac4ede3dKamradhttp://social.technet.microsoft.com/Profile/en-US/?user=KamradThere is no <service> element in ews/services.wsdl. WHY?!Hi David! Thast is what I did:<br>1. Download services.wsdl, messages.xsd and types.xsd to local hard drive.<br>2. Added following code to the services.wsdl:<br>    &lt;wsdl<img alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif">ervice name=&quot;ExchangeWebService&quot;&gt; <br>        &lt;wsdl<img height=19 alt="Stick out tongue" src="http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif" width=19>ort name=&quot;ExchangeWebPort&quot; binding=&quot;tns:ExchangeServiceBinding&quot;&gt;<br>            &lt;soap:address   location=&quot;https://&lt;server&gt;/EWS/exchange.asmx&quot; /&gt; <br>        &lt;/wsdl<img height=19 alt="Stick out tongue" src="http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif" width=19>ort&gt;<br>    &lt;/wsdl<img height=19 alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif" width=19>ervice&gt;<br>3. Try to generate stub usnig JAX-WS toolset from SUN. There was an xml parse error &quot;undefined attribute 'xml:lang' in this place in types.xsd:<br> &lt;xs:complexType name=&quot;ReplyBody&quot;&gt;<br>     &lt;xs<img height=19 alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif" width=19>equence&gt;<br>        &lt;xs:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;Message&quot; type=&quot;xs<img height=19 alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif" width=19>tring&quot; /&gt;<br>    &lt;/xs<img height=19 alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif" width=19>equence&gt;<br> <div style="margin-left:40px">&lt;!-- here was an error --&gt;    &lt;xs:attribute ref=&quot;xml:lang&quot; use=&quot;optional&quot; /&gt;   &lt;!-- here was an error --&gt;</div> &lt;/xs:complexType&gt;<br><br>What was wrong with it? <br><br>As fast workaround I just deleted &quot;&lt;xs:attribute ref=&quot;xml:lang&quot; use=&quot;optional&quot; /&gt;&quot;  <br><br>Are all previous steps correct? Is https://&lt;server&gt;/EWS/exchange.asmx correct end-point link?<br><br>But then in stub I did not found any refference to the https://&lt;server&gt;/EWS/exchange.asmx. Why is that so? Probably it is questyion to JAXWS... But anyway, do you have any recommendations as to access exchange web services from java?<br><br> Please!!! <br><br><br>Mon, 20 Aug 2007 10:46:20 Z2007-08-20T10:46:20Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#b59bf85e-5ca0-4cdb-a204-45456db186d4http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#b59bf85e-5ca0-4cdb-a204-45456db186d4David Sterling - MSFThttp://social.technet.microsoft.com/Profile/en-US/?user=David%20Sterling%20-%20MSFTThere is no <service> element in ews/services.wsdl. WHY?!<p align=left><font face=Arial size=2>Your workaround will work as long as you never need to set a language on the reply body.  Since this is inbound only, it shouldnt' cause a problem.  Notice that it is optional.  The xml:lang reference comes from the following at the beginning of the types.xsd schema file</font></p> <p align=left> </p><font color="#0000ff" size=2> <p>&lt;</font><font color="#800000" size=2>xs:import</font><font color="#0000ff" size=2> </font><font color="#ff0000" size=2>namespace</font><font color="#0000ff" size=2>=</font><font size=2>&quot;</font><font color="#0000ff" size=2>http://www.w3.org/XML/1998/namespace</font><font size=2>&quot;</font><font color="#0000ff" size=2>/&gt;</font></p> <p align=left><font color="#0000ff" size=2></font> </p> <p align=left><font color="#0000ff">Not exactly sure why JAXWS would complain about that (I am not a Java dev, so I can't help you much there).  Is there a way to reference external namespaces when calling JAXWS?</font></p> <p align=left><font color="#0000ff"></font> </p> <p align=left><font color="#0000ff">Regarding the reference to the end point, the path looks correct to me.  Whether or not a proxy generator emits the reference into the generated classes is really a function of the proxy generator.  For instance with the Visual Studio generator, it does, but it also allows you to override it via the Uri property on the ExchangeServiceBinding.  It could be that their proxy generator does some validation on the WSDL (and fails due to the missing service element), but once you add the service element, maybe it doesn't use it for anything - or maybe it sticks the information info a configuration file along side the proxy.  This is just a guess.  You might want to ping a JAXWS forum to figure out what is going on there.</font></p> <p align=left><font color="#0000ff"></font> </p> <p align=left><font color="#0000ff">Thanks</font></p> <p align=left><font color="#0000ff" size=2> </p> <p> </p> <p align=left></font> </p>Mon, 20 Aug 2007 15:02:12 Z2007-08-20T15:02:12Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#39f67cf4-dc6f-4972-9c50-81a4aa34e65ehttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#39f67cf4-dc6f-4972-9c50-81a4aa34e65elplatypushttp://social.technet.microsoft.com/Profile/en-US/?user=lplatypusThere is no <service> element in ews/services.wsdl. WHY?!David, that namespace import refers to an obsolete schema document.  The document at that URL contains this warning:<br><br> <div style="margin-left:40px">!!!THIS SCHEMA DOCUMENT IS OUT OF DATE!!! It uses a preliminary W3C XML Schema syntax which has been superseded. The up-to-date version is at http://www.w3.org/2001/xml.xsd<br></div><br>I guess that the Java tools do not like the old schema syntax.<br><br>The correct import element would be:<br><br> <div style="margin-left:40px">&lt;import namespace=&quot;http://www.w3.org/XML/1998/namespace&quot; schemaLocation=&quot;http://www.w3.org/2001/xml.xsd&quot;/&gt;<br></div><br>This correction allows me to compile the WSDL with the Java &quot;wsimport&quot; tool in <a title="https://metro.dev.java.net/" href="https://metro.dev.java.net/">Metro</a>Tue, 16 Oct 2007 07:11:28 Z2007-10-16T07:11:28Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#2f094528-985b-431b-9b6c-6c6dd409ff2dhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#2f094528-985b-431b-9b6c-6c6dd409ff2dDavid Sterling - MSFThttp://social.technet.microsoft.com/Profile/en-US/?user=David%20Sterling%20-%20MSFTThere is no <service> element in ews/services.wsdl. WHY?!<p align=left><font face=Arial size=2></font> </p>Good to know about the outdated namespace - I will make a note of it.Tue, 16 Oct 2007 13:56:33 Z2007-10-16T13:56:33Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#3c68baa8-8f6a-4cf4-843c-15983d2b5e0ahttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#3c68baa8-8f6a-4cf4-843c-15983d2b5e0aHWeberhttp://social.technet.microsoft.com/Profile/en-US/?user=HWeberThere is no <service> element in ews/services.wsdl. WHY?!<p align=left><font face=Arial>So when I have generated the classes with jaxws, </font>what is the equivalent code in Java for logging into the webservice:</p> <p align=left> </p> <p align=left>C#:</p> <p align=left> </p> <p align=left>ExchangeServiceBinding esb = new ExchangeServiceBinding();<br>esb.Credentials = new NetworkCredential(&quot;username&quot;, &quot;password&quot;, &quot;domain&quot;);<br>esb.Url = &quot;<a title="https://myserver/EWS/exchange.asmx" href="https://myserver/EWS/exchange.asmx">https://myserver/EWS/exchange.asmx</a>&quot;;</p> <p align=left><br> </p> <p align=left>Java:</p> <p align=left> </p> <p align=left>ExchangeServices exchangeServer = new ExchangeService();<br>???</p> <p align=left>...</p> <p align=left> </p> <p>Where I have to put the login data (username, password, domain)?</p> <p align=left> </p>Fri, 01 Feb 2008 13:17:24 Z2008-02-01T13:17:24Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#38c9d22a-2539-4c72-8121-0fa20d7786b0http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#38c9d22a-2539-4c72-8121-0fa20d7786b0David Hauserhttp://social.technet.microsoft.com/Profile/en-US/?user=David%20HauserThere is no <service> element in ews/services.wsdl. WHY?!Any luck with this?  Has anyone been able to successfully get the wsdl working in Java?  If so, can you please post some sample code?<font face=Arial size=2></font>Wed, 20 Aug 2008 23:47:28 Z2008-08-20T23:47:28Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#264c7054-9bff-4b8a-89a9-127ea4be8a07http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#264c7054-9bff-4b8a-89a9-127ea4be8a07Karl Mosshttp://social.technet.microsoft.com/Profile/en-US/?user=Karl%20MossThere is no <service> element in ews/services.wsdl. WHY?!<p>I've added the &lt;wsdl<img height=19 alt="Tongue Tied" src="http://forums.microsoft.com/MSDN/emoticons/emotion-7.gif" width=19>ervice&gt; tag and generated the proxies just fine. The problem I have is, I think, with authentication. After I've created an ExchangeService and the service port, and set the user/password:</p> <p align=left> </p> <p align=left> </p><font face=Arial size=2><font size=2> <p align=left>ExchangeServices services = </font><b><font color="#7f0055" size=2>new</b></font><font size=2> ExchangeServices();</p></font><font size=2> <p align=left>ExchangeServicePortType proxy = services.getExchangeServicePort();</p></font><font size=2> <p align=left></p> <p align=left></font><font color="#3f7f5f" size=2>// Set the user ID/password</p></font><font size=2> <p align=left>((BindingProvider) proxy).getRequestContext().put(BindingProvider.</font><i><font color="#0000c0" size=2>USERNAME_PROPERTY</i></font><font size=2>, userID);</p> <p align=left>((BindingProvider) proxy).getRequestContext().put(BindingProvider.</font><i><font color="#0000c0" size=2>PASSWORD_PROPERTY</i></font><font size=2>, password);</p> <p> </p> <p align=left>I get the following exception when making a method call on the proxy:</p> <p align=left> </p><font color="#ff0000" size=2> <p>Failed to get valid Active Directory information for the calling account. Confirm that it is a valid Active Directory account.</p> <p> </p> <p align=left></font></font></font> </p> <p>I don't think it's an issue with the AD, but rather the user credentials are not being set properly.</p> <p align=left> </p> <p align=left>Any suggestions on what I'm doing wrong? I've also tried implementing an Authenticator and setting it as the default, but it never gets called.</p> <p align=left> </p> <p align=left>Thanks,</p> <p align=left> </p> <p align=left>Karl.</p>Fri, 05 Sep 2008 18:11:31 Z2008-09-05T18:11:31Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#6aba93cb-6eab-4547-8187-77c99d586e07http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d48a2b4f-828a-41ae-b562-3706de67ba31#6aba93cb-6eab-4547-8187-77c99d586e07David Sterling - MSFThttp://social.technet.microsoft.com/Profile/en-US/?user=David%20Sterling%20-%20MSFTThere is no <service> element in ews/services.wsdl. WHY?!<p align=left><font face=Arial size=2>Try adding the domain to the creds to make sure that it isn't resolving to an account that is local to the box instead of a domain account.</font></p>Sat, 06 Sep 2008 12:54:30 Z2008-09-06T12:54:30Z