Using HTC to consume the Web Services (SOAP) Support in SQLXML

Using HTC to consume the Web Services (SOAP) Support in SQLXML

Post by <yongwei.zh.. » Thu, 23 May 2002 05:58:32



I tried to use HTC(WebService Behavior) to call Web
Services (SOAP) Support in SQLXML, and get no error by
using Callservice and but all methods of the web service
do nothing. Can we use HTC to consume  the  Web Services
(SOAP) Support in SQLXML?
 
 
 

Using HTC to consume the Web Services (SOAP) Support in SQLXML

Post by Bulent Elmaci [M » Thu, 23 May 2002 09:42:40


Hi,

Can you send your sample so that I can try it out here?

This posting is provided "AS IS" with no warranties, and confers no rights.

Thanks,

~Bulent

--------------------
| Content-Class: urn:content-classes:message


| Subject: Using HTC to consume  the  Web Services (SOAP) Support in SQLXML
| Date: Tue, 21 May 2002 13:58:32 -0700
| Lines: 5

| MIME-Version: 1.0
| Content-Type: text/plain;
|       charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcIBCkPkSRtoVj/6R+qwYKqducwX1Q==
| Newsgroups: microsoft.public.sqlserver.xml
| Path: cpmsftngxa07
| Xref: cpmsftngxa07 microsoft.public.sqlserver.xml:13475
| NNTP-Posting-Host: TKMSFTNGXA04 10.201.232.163
| X-Tomcat-NG: microsoft.public.sqlserver.xml
|
| I tried to use HTC(WebService Behavior) to call Web
| Services (SOAP) Support in SQLXML, and get no error by
| using Callservice and but all methods of the web service
| do nothing. Can we use HTC to consume  the  Web Services
| (SOAP) Support in SQLXML?
|

 
 
 

Using HTC to consume the Web Services (SOAP) Support in SQLXML

Post by Yongwei Zhan » Thu, 23 May 2002 23:29:07


Hi Bulent:
Thank very much

This following sample is based on the "Sample Applications
for Sending SOAP Requests" provided by of SQLXML 3.0 Web
service tool kit. I added a simple
store_procedure "put_data" in northwind database:

CREATE PROCEDURE put_data

AS


GO

And added a virtual name "put_data" on it with "raw/xml
objects"  raw formatting.

I can get right result by using VB.Net winform and ASP.NEt
application, but not HTC.

HTML page is:

<html>
<script language="JavaScript">
var iCallID;

function init()
{
  var callObj = new Object();
   service.useService("http://localhost/nwind2/soap?
wsdl","TestService");
   callObj.funcName = "put_data";      
   callObj.async = true;        
   callObj.endpoint= "http://localhost/nwind2/";

   callObj.SOAPHeader = "<SOAP-ENV:Header>";
   callObj.SOAPHeader += "<t:Transaction xmlns:t='some-
URI' SOAP-ENV:mustUnderstand='1'>";
   callObj.SOAPHeader += "1";
   callObj.SOAPHeader += "</t:Transaction>";  
   callObj.SOAPHeader += "</SOAP-ENV:Header>";  

   iCallID = service.TestService.callService
(onWSresult,callObj,"TestCate");

Quote:}

function onWSresult(result)
{  

    // if there is an error, and the call came from the
call() in init()
    if(result.error)
    {
        // Pull the error information from the
result.errorDetail properties
        var xfaultcode   = result.errorDetail.code;
        var xfaultstring = result.errorDetail.string;
        var xfaultsoap   = result.errorDetail.raw;

        document.writeln("ERROR. Method call
failed!"+"<br>");
        document.writeln("Call ID:" + iCallID+"<br>");
        document.writeln("Fault Code:" +
xfaultcode+"<br>");
        document.writeln("Fault String:" +
xfaultstring+"<br>");
        document.writeln("SOAP Data:" + xfaultsoap+"<br>");
    }
    // if there was no error
    else
    {

      alert("Insert is finished")  
    }

Quote:}

</script>
<body  >
<div id="service" style="behavior:url(webservice.htc)" >
</div>
<input type=button onclick="init()" ID="Button1"
NAME="Button1" value="test">
</body>
</html>

>-----Original Message-----
>Hi,

>Can you send your sample so that I can try it out here?

>This posting is provided "AS IS" with no warranties, and
confers no rights.

>Thanks,

>~Bulent

>--------------------
>| Content-Class: urn:content-classes:message


>| Subject: Using HTC to consume  the  Web Services (SOAP)
Support in SQLXML
>| Date: Tue, 21 May 2002 13:58:32 -0700
>| Lines: 5
>| Message-ID: <598501c2010a$43e4bd00


- Show quoted text -

Quote:>| MIME-Version: 1.0
>| Content-Type: text/plain;
>|   charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>| Thread-Index: AcIBCkPkSRtoVj/6R+qwYKqducwX1Q==
>| Newsgroups: microsoft.public.sqlserver.xml
>| Path: cpmsftngxa07
>| Xref: cpmsftngxa07 microsoft.public.sqlserver.xml:13475
>| NNTP-Posting-Host: TKMSFTNGXA04 10.201.232.163
>| X-Tomcat-NG: microsoft.public.sqlserver.xml
>|
>| I tried to use HTC(WebService Behavior) to call Web
>| Services (SOAP) Support in SQLXML, and get no error by
>| using Callservice and but all methods of the web
service
>| do nothing. Can we use HTC to consume  the  Web
Services
>| (SOAP) Support in SQLXML?
>|

>.

 
 
 

Using HTC to consume the Web Services (SOAP) Support in SQLXML

Post by Bulent Elmaci [M » Fri, 24 May 2002 07:32:55


Hi,

I tried out your code and it worked for me after making a couple of changes:

- Your endpoint should be "http://localhost/nwind2/soap" rather than
"http://localhost/nwind2/". Because nwind2 is the vdir name and soap is the
vname name. The SOAP messages should be POSTed to the vname.
- Based on your useService call; make sure that your service name is
"TestService" (your vname name is "soap")
- Make sure you have the correct webservice.htc
(http://msdnprod/downloads/samples/internet/behaviors/library/webservi...
ault.asp)

This posting is provided "AS IS" with no warranties, and confers no rights.

Thanks,

~Bulent

--------------------

| Subject: RE: Using HTC to consume  the  Web Services (SOAP) Support in
SQLXML
| Date: Wed, 22 May 2002 07:29:07 -0700
|
| Hi Bulent:
| Thank very much
|
| This following sample is based on the "Sample Applications
| for Sending SOAP Requests" provided by of SQLXML 3.0 Web
| service tool kit. I added a simple
| store_procedure "put_data" in northwind database:
|
| CREATE PROCEDURE put_data

| AS
|      

| GO
|
| And added a virtual name "put_data" on it with "raw/xml
| objects"  raw formatting.
|
| I can get right result by using VB.Net winform and ASP.NEt
| application, but not HTC.
|
| HTML page is:
|
| <html>
| <script language="JavaScript">
| var iCallID;
|
| function init()
| {
|   var callObj = new Object();
|    service.useService("http://localhost/nwind2/soap?
| wsdl","TestService");
|    callObj.funcName = "put_data";      
|    callObj.async = true;        
|    callObj.endpoint= "http://localhost/nwind2/";
|
|    callObj.SOAPHeader = "<SOAP-ENV:Header>";
|    callObj.SOAPHeader += "<t:Transaction xmlns:t='some-
| URI' SOAP-ENV:mustUnderstand='1'>";
|    callObj.SOAPHeader += "1";
|    callObj.SOAPHeader += "</t:Transaction>";  
|    callObj.SOAPHeader += "</SOAP-ENV:Header>";  
|    
|    iCallID = service.TestService.callService
| (onWSresult,callObj,"TestCate");
|  
| }
|
| function onWSresult(result)
| {  
|    
|     // if there is an error, and the call came from the
| call() in init()
|     if(result.error)
|     {
|         // Pull the error information from the
| result.errorDetail properties
|         var xfaultcode   = result.errorDetail.code;
|         var xfaultstring = result.errorDetail.string;
|         var xfaultsoap   = result.errorDetail.raw;
|
|      
|         document.writeln("ERROR. Method call
| failed!"+"<br>");
|         document.writeln("Call ID:" + iCallID+"<br>");
|         document.writeln("Fault Code:" +
| xfaultcode+"<br>");
|         document.writeln("Fault String:" +
| xfaultstring+"<br>");
|         document.writeln("SOAP Data:" + xfaultsoap+"<br>");
|     }
|     // if there was no error
|     else
|     {
|        
|       alert("Insert is finished")  
|     }
| }
| </script>
| <body  >
| <div id="service" style="behavior:url(webservice.htc)" >
| </div>
| <input type=button onclick="init()" ID="Button1"
| NAME="Button1" value="test">
| </body>
| </html>
|

| >-----Original Message-----
| >Hi,
| >
| >Can you send your sample so that I can try it out here?
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >
| >Thanks,
| >
| >~Bulent
| >
| >--------------------
| >| Content-Class: urn:content-classes:message


| >| Subject: Using HTC to consume  the  Web Services (SOAP)
| Support in SQLXML
| >| Date: Tue, 21 May 2002 13:58:32 -0700
| >| Lines: 5
| >| Message-ID: <598501c2010a$43e4bd00

| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >|         charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcIBCkPkSRtoVj/6R+qwYKqducwX1Q==
| >| Newsgroups: microsoft.public.sqlserver.xml
| >| Path: cpmsftngxa07
| >| Xref: cpmsftngxa07 microsoft.public.sqlserver.xml:13475
| >| NNTP-Posting-Host: TKMSFTNGXA04 10.201.232.163
| >| X-Tomcat-NG: microsoft.public.sqlserver.xml
| >|
| >| I tried to use HTC(WebService Behavior) to call Web
| >| Services (SOAP) Support in SQLXML, and get no error by
| >| using Callservice and but all methods of the web
| service
| >| do nothing. Can we use HTC to consume  the  Web
| Services
| >| (SOAP) Support in SQLXML?
| >|
| >
| >.
| >
|

 
 
 

Using HTC to consume the Web Services (SOAP) Support in SQLXML

Post by Yongwei Zhan » Sat, 25 May 2002 00:31:37


Hi Bulent:
Thanks lot again

It works now.

Thanks

Quote:>-----Original Message-----
>Hi,

>I tried out your code and it worked for me after making a
couple of changes:

>- Your endpoint should be "http://localhost/nwind2/soap"
rather than
>"http://localhost/nwind2/". Because nwind2 is the vdir

name and soap is the
Quote:>vname name. The SOAP messages should be POSTed to the
vname.
>- Based on your useService call; make sure that your
service name is
>"TestService" (your vname name is "soap")
>- Make sure you have the correct webservice.htc

(http://msdnprod/downloads/samples/internet/behaviors/libra
ry/webservice/def
>ault.asp)

>This posting is provided "AS IS" with no warranties, and
confers no rights.

>Thanks,

>~Bulent

>--------------------

>| Subject: RE: Using HTC to consume  the  Web Services
(SOAP) Support in
>SQLXML
>| Date: Wed, 22 May 2002 07:29:07 -0700
>|
>| Hi Bulent:
>| Thank very much
>|
>| This following sample is based on the "Sample
Applications
>| for Sending SOAP Requests" provided by of SQLXML 3.0
Web
>| service tool kit. I added a simple
>| store_procedure "put_data" in northwind database:
>|
>| CREATE PROCEDURE put_data

>| AS
>|  

>| GO
>|
>| And added a virtual name "put_data" on it with "raw/xml
>| objects"  raw formatting.
>|
>| I can get right result by using VB.Net winform and
ASP.NEt
>| application, but not HTC.
>|
>| HTML page is:
>|
>| <html>
>| <script language="JavaScript">
>| var iCallID;
>|
>| function init()
>| {
>|   var callObj = new Object();
>|    service.useService("http://localhost/nwind2/soap?
>| wsdl","TestService");
>|    callObj.funcName = "put_data";      
>|    callObj.async = true;        
>|    callObj.endpoint= "http://localhost/nwind2/";
>|
>|    callObj.SOAPHeader = "<SOAP-ENV:Header>";
>|    callObj.SOAPHeader += "<t:Transaction xmlns:t='some-
>| URI' SOAP-ENV:mustUnderstand='1'>";
>|    callObj.SOAPHeader += "1";
>|    callObj.SOAPHeader += "</t:Transaction>";  
>|    callObj.SOAPHeader += "</SOAP-ENV:Header>";  
>|    
>|    iCallID = service.TestService.callService
>| (onWSresult,callObj,"TestCate");
>|  
>| }
>|
>| function onWSresult(result)
>| {  
>|    
>|     // if there is an error, and the call came from the
>| call() in init()
>|     if(result.error)
>|     {
>|         // Pull the error information from the
>| result.errorDetail properties
>|         var xfaultcode   = result.errorDetail.code;
>|         var xfaultstring = result.errorDetail.string;
>|         var xfaultsoap   = result.errorDetail.raw;
>|
>|      
>|         document.writeln("ERROR. Method call
>| failed!"+"<br>");
>|         document.writeln("Call ID:" + iCallID+"<br>");
>|         document.writeln("Fault Code:" +
>| xfaultcode+"<br>");
>|         document.writeln("Fault String:" +
>| xfaultstring+"<br>");
>|         document.writeln("SOAP Data:" +
xfaultsoap+"<br>");
>|     }
>|     // if there was no error
>|     else
>|     {
>|        
>|       alert("Insert is finished")  
>|     }
>| }
>| </script>
>| <body  >
>| <div id="service" style="behavior:url(webservice.htc)" >
>| </div>
>| <input type=button onclick="init()" ID="Button1"
>| NAME="Button1" value="test">
>| </body>
>| </html>
>|
>| >-----Original Message-----
>|{ w ) ?rA" At-f  ?  >Hi,
>| >
>| >Can you send your sample so that I can try it out here?
>| >
>| >This posting is provided "AS IS" with no warranties,
and
>| confers no rights.
>| >
>| >Thanks,
>| >
>| >~Bulent
>| >
>| >--------------------
>| >| Content-Class: urn:content-classes:message
>| >| From:

 
 
 

1. SQLXML3: SOAP Exception accessing SQL Server Web Service

I get the following error when trying to run the c# sample web service:

    An unhandled exception of type 'System.InvalidOperationException'
occurred in system.web.services.dll

    Additional information: Client found response content type of
'text/html', but expected 'text/xml'.
    The request failed with the error message:
    --
    <H3>ERROR: 500 Internal Server Error</H3><b>HResult:</b> 0x80040154<br>
    <b>Source:</b> Microsoft SQL isapi extension<br>
    <b>Description:</b> Internal server error occured. Request aborted.<br>

I have a pre-RC1 version of .NET on my machine, so the managed classes
didn't install, but I didn't think they were required for just the standard
Web Service functionality to work.  0x80040154 seems to be Class Not
Registered.  Anyone have any ideas on what's wrong?

Thanks,
Keith

2. Paradox field width troubles

3. consuming web services from SQL

4. Full-text indexing on Chinese

5. Can SQL 2000 consume web services?

6. Hiding App in the Taskbar

7. Calling Web Services through Excel / VB/ SOAP Toolkit / XML

8. SPL Workstation - new IDE for Informix

9. ADO.NET or SQLXML Web Services ??

10. SQLXML stored procedures as web service - ASP.NET problem

11. SQLXML web service: HTTP/1.1 405 Method not allowed

12. sqlxml web service from .net deployment question...

13. Error with WEB Service SQLXML 3.0