<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">JIMWU's WebLog</title><subtitle type="html" /><id>http://blogs.msdn.com/jimwu/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jimwu/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/jimwu/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2004-09-02T15:44:00Z</updated><entry><title>SQL 2005</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jimwu/archive/2005/10/06/477896.aspx" /><id>http://blogs.msdn.com/jimwu/archive/2005/10/06/477896.aspx</id><published>2005-10-06T20:33:00Z</published><updated>2005-10-06T20:33:00Z</updated><content type="html">&lt;P&gt;I'm sure many of you already know that SQL 2005 is about to be release.&amp;nbsp; To better consolidate all the knowledge my team has, a different blog site was created.&amp;nbsp; Please refer to &lt;a href="http://blogs.msdn.com/sql_protocols"&gt;http://blogs.msdn.com/sql_protocols&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This blog will now be more dedicated to my personal blogs.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=477896" width="1" height="1"&gt;</content><author><name>jimwu</name><uri>http://blogs.msdn.com/members/jimwu.aspx</uri></author></entry><entry><title>Xml parameter handling through SOAP</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jimwu/archive/2005/02/28/382065.aspx" /><id>http://blogs.msdn.com/jimwu/archive/2005/02/28/382065.aspx</id><published>2005-03-01T02:34:00Z</published><updated>2005-03-01T02:34:00Z</updated><content type="html">&lt;p&gt;People have raised the question, "How do I use the new xml data type as a&amp;nbsp;parameter through SOAP?"&lt;/p&gt; &lt;p&gt;Unfortunately, this isn't as clean as we like it.&amp;nbsp; For now this is what you would have to do if you are using Visual Studio 2005 Beta1:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;EndpointClass proxy = new EndpointClass();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;proxy.Credentials = // whatever credentials you want to use eg. System.Net.CredentialCache.DefaultCredentials;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;EndpointClass.xml a = new EndpointClass.xml();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;a.Any = new System.Xml.XmlNode[1];&amp;nbsp; // it's a node array.&amp;nbsp; for ease of&amp;nbsp;example, I'm only creating an one node array.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;xDoc.LoadXml("&amp;lt;foo&amp;gt;bar&amp;lt;/foo&amp;gt;");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;a.Any[0] = x.DocumentElement;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;EndpointClass.xml retXml = proxy.XmlMethod( a );&lt;br /&gt;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(retXml.Any[0].OuterXml);&lt;/p&gt; &lt;p&gt;Flame me if there's a bug in my sample.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=382065" width="1" height="1"&gt;</content><author><name>jimwu</name><uri>http://blogs.msdn.com/members/jimwu.aspx</uri></author><category term="SOAP access to SQL 2005" scheme="http://blogs.msdn.com/jimwu/archive/tags/SOAP+access+to+SQL+2005/default.aspx" /></entry><entry><title>Intro to Microsoft SQL 2005 native web service support</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jimwu/archive/2004/10/01/236855.aspx" /><id>http://blogs.msdn.com/jimwu/archive/2004/10/01/236855.aspx</id><published>2004-10-01T23:36:00Z</published><updated>2004-10-01T23:36:00Z</updated><content type="html">&lt;p&gt;I'm finally back, well more like I finally found some time to blog.&lt;/p&gt; &lt;p&gt;As promised, I will add a little introduction to how Microsoft SQL 2005 native web service support works.&lt;/p&gt; &lt;p&gt;Native web service support is new to Microsoft SQL 2005.&amp;nbsp; In SQL 2000, web service support was done basically through the use of ADO.Net and IIS.&amp;nbsp; With SQL 2005, the SOAP, XML, and XSD schema support have all been brought into the server.&amp;nbsp; Of course, the SQL 2000 style of hosting a web service is still available and in some cases even preferred over the new SQL 2005 style.&lt;/p&gt; &lt;p&gt;Basic system requirements for native web service support in SQL 2005 is Windows 2003 server or Windows XP SP2.&amp;nbsp; This is because these two OS platforms contains the HTTP.sys resource that is needed.&amp;nbsp; This also means that SQL 2005 native web service support does not require IIS.&lt;/p&gt; &lt;p dir="ltr"&gt;So, onwards to the topic at hand.&amp;nbsp; The native web service support in SQL 2005 provides the ability to expose any SP or Function as a web service method.&amp;nbsp; This includes CLR SP and CLR Functions.&amp;nbsp; In addition, a special built-in method, called "sqlbatch", can be enabled to allow for adhoc queries.&amp;nbsp; All of this is done through what is typically referred to as ENDPOINT mapping.&amp;nbsp; The following is a sample borrowed from Books Online:&lt;/p&gt; &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt; &lt;p&gt;&lt;font face="Garamond" color="#000080" size="2"&gt;CREATE ENDPOINT sql_endpoint &lt;br /&gt;STATE = STARTED&lt;br /&gt;AS HTTP(&lt;br /&gt;&amp;nbsp;&amp;nbsp; PATH = '/sql', &lt;br /&gt;&amp;nbsp;&amp;nbsp; AUTHENTICATION = (INTEGRATED ), &lt;br /&gt;&amp;nbsp;&amp;nbsp; PORTS = ( CLEAR ), &lt;br /&gt;&amp;nbsp;&amp;nbsp; SITE = '*'&lt;br /&gt;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;FOR SOAP (&lt;br /&gt;&amp;nbsp;&amp;nbsp; WEBMETHOD 'http://tempUri.org/'.'GetCustomerInfo' &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (name='AdventureWorks.dbo.GetCustomerInfo', &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; schema=STANDARD ),&lt;br /&gt;&amp;nbsp;&amp;nbsp; WEBMETHOD 'UDFReturningAScalar' &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (name='AdventureWorks.dbo.UDFReturningAScalar'),&lt;br /&gt;&amp;nbsp;&amp;nbsp; BATCHES = ENABLED,&lt;br /&gt;&amp;nbsp;&amp;nbsp; WSDL = DEFAULT,&lt;br /&gt;&amp;nbsp;&amp;nbsp; DATABASE = 'AdventureWorks',&lt;br /&gt;&amp;nbsp;&amp;nbsp; NAMESPACE = 'http://AdventureWorks/Customer'&lt;br /&gt;&amp;nbsp;&amp;nbsp; ) &lt;br /&gt;GO&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p dir="ltr"&gt;&lt;font color="#000000"&gt;In this above sample, the special "sqlbatch" adhoc query method is enabled by the 'BATCHES = ENABLED' setting and 1 SP "GetCustomerInfo" and 1 UDF "UDFReturningAScalar" is exposed on the endpoint.&amp;nbsp; The endpoint URL is 'http://machinename/sql'.&amp;nbsp; Also, something I haven't mentioned is that each endpoint can enable or disable WSDL document generation.&amp;nbsp; In the above case, WSDL generation is enabled by the 'WSDL = DEFAULT' setting.&amp;nbsp; The reason that the keyword 'DEFAULT' is used is that you are actually allowed to create your own WSDL generation SP.&amp;nbsp; In the rare case where you actually want to use your WSDL generation SP, the setting would look more like "WSDL = 'db.owner.myWsdlSp'".&lt;/font&gt;&lt;/p&gt; &lt;p dir="ltr"&gt;Also, as a quick note, SQL 2005 native web service support follows the guidline set out by the WS-I Basic Profile 1.0 specification.&amp;nbsp; Specifically, it only supports DOC/LIT formatting and must use POST to send the SOAP request.&lt;/p&gt; &lt;p dir="ltr"&gt;Oh, one more thing about the default WSDL generation, typically to get the WSDL document from an URL a HTTP GET request is issued to the URL with the query string of ?wsdl.&amp;nbsp; So, for the above sample, the WSDL GET would be against &lt;a href="http://servername/sql?wsdl"&gt;http://servername/sql?wsdl&lt;/a&gt;.&amp;nbsp; With SQL 2005, the default WSDL generator is actually able to generate 2 WSDL documents.&amp;nbsp; The&amp;nbsp;default one, when ?wsdl is received, will use fully decorated XSD schema when declaring parameter and return types.&amp;nbsp; This is so that the uniqueness of SQL data types is defined and identifiable by the client.&amp;nbsp; The second version, when ?wsdlsimple is received, will use standard XSD data types to represent method parameters and return types.&amp;nbsp; This is so that older generation SOAP clients can still communicate with SQL 2005.&lt;/p&gt; &lt;p dir="ltr"&gt;I'll talk about permissions on my next blog.&lt;/p&gt; &lt;p dir="ltr"&gt;Jimmy&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=236855" width="1" height="1"&gt;</content><author><name>jimwu</name><uri>http://blogs.msdn.com/members/jimwu.aspx</uri></author><category term="SOAP access to SQL 2005" scheme="http://blogs.msdn.com/jimwu/archive/tags/SOAP+access+to+SQL+2005/default.aspx" /></entry><entry><title>My first blog post.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jimwu/archive/2004/09/02/224953.aspx" /><id>http://blogs.msdn.com/jimwu/archive/2004/09/02/224953.aspx</id><published>2004-09-02T22:44:00Z</published><updated>2004-09-02T22:44:00Z</updated><content type="html">&lt;p&gt;I appologize to everyone.&amp;nbsp; This is my first attempt at a blog, so please bare with me as I ramp up on how this whole&amp;nbsp;thing works.&amp;nbsp; My goal in creating this blog is to provide a place where I can share some of my personal experiences using Microsoft SQL 2005 as a Web Service.&amp;nbsp; I'll post a little introduction on how this whole SQL 2005 Web Services works and how it is different from the SQL 2000 SqlXml Web Services.&amp;nbsp; I'll also get into how clients communicate with this new functionality.&amp;nbsp; As I know more, I'll keep this blog updated.&lt;/p&gt; &lt;p&gt;Please help me improve this blog by sending me comments on what can be improved and potentially related info that you like to see in this blog.&lt;/p&gt; &lt;p&gt;Jimmy&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=224953" width="1" height="1"&gt;</content><author><name>jimwu</name><uri>http://blogs.msdn.com/members/jimwu.aspx</uri></author><category term="SOAP access to SQL 2005" scheme="http://blogs.msdn.com/jimwu/archive/tags/SOAP+access+to+SQL+2005/default.aspx" /></entry></feed>