|
Home > Archive > SQL Anywhere database > December 2005 > Web Services are forever?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Web Services are forever?
|
|
| Justin Willey 2005-12-21, 1:23 pm |
| Hi
We have been experimenting with publishing web services and the XML
generation / handling in v9. The functionality seems great and performs
well.
We are concerned however over what take up there is of the functionality by
the user base and what the long term future of it in the product is. Some
years ago we made a major development commitment to the "java in the
database" functionality, which again we found very powerful, only to have
the rug pulled from under our feet when the capability was dumped because
"no-one was using it". It took a great deal of developer effort to reverse
out of java and we don't want to have to do the same again with web services
/ xml.
There only some ten threads this year on web services in this forum and a
good half of those are about consuming rather than publishing web services.
Is anyone using web services for a large scale project? Can anyone from
ianywhere explain how web services fit into the development road map for
ASA?
Justin Willey
IQX Limited
| |
| Paul Horan[TeamSybase] 2005-12-21, 1:23 pm |
| My 2 cents...
Exposing stored procedures as web services is cool on the surface, but I
would NEVER design or deploy a large-scale production system with the DBMS
engine exposed to the outside world... With robust, reliable
WebService/Container architectures like apache Tomcat/Axis, why would you
look anywhere else? Now, if your app will be completely within the
firewall, that might be another story, but I still go back to the tried and
true adage: Use the right tool for the job.
Paul Horan[TeamSybase]
"Justin Willey" <gjw@nospamatall.iqx.co.uk> wrote in message
news:43a992e1@forums
-2-dub...
> Hi
>
> We have been experimenting with publishing web services and the XML
> generation / handling in v9. The functionality seems great and performs
> well.
>
> We are concerned however over what take up there is of the functionality
> by
> the user base and what the long term future of it in the product is. Some
> years ago we made a major development commitment to the "java in the
> database" functionality, which again we found very powerful, only to have
> the rug pulled from under our feet when the capability was dumped because
> "no-one was using it". It took a great deal of developer effort to reverse
> out of java and we don't want to have to do the same again with web
> services
> / xml.
>
> There only some ten threads this year on web services in this forum and a
> good half of those are about consuming rather than publishing web
> services.
>
> Is anyone using web services for a large scale project? Can anyone from
> ianywhere explain how web services fit into the development road map for
> ASA?
>
> Justin Willey
> IQX Limited
>
>
| |
| Breck Carter [TeamSybase] 2005-12-21, 8:24 pm |
| Exposing a web service is not exactly "exposing the DBMS engine".
Breck
On 21 Dec 2005 10:34:33 -0800, "Paul Horan[TeamSybase]"
< paulhoran_nospam@ade
lphia.net> wrote:
>My 2 cents...
>
>Exposing stored procedures as web services is cool on the surface, but I
>would NEVER design or deploy a large-scale production system with the DBMS
>engine exposed to the outside world... With robust, reliable
>WebService/Container architectures like apache Tomcat/Axis, why would you
>look anywhere else? Now, if your app will be completely within the
>firewall, that might be another story, but I still go back to the tried and
>true adage: Use the right tool for the job.
>
>Paul Horan[TeamSybase]
>
>"Justin Willey" <gjw@nospamatall.iqx.co.uk> wrote in message
> news:43a992e1@forums
-2-dub...
>
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| Mark Culp 2005-12-21, 8:24 pm |
| There are going to be differences of opinion on how to best serve up
web pages, as Justin and Breck have pointed out.
Web Services in the engine is a new unique feature of SQLAnywhere,
and the up-take of using it appears to be slow
(I'm not sure that many developers know that the capability exists).
There are many reasons where/why using Web Services in SQLAnywhere
are beneficial (e.g. sharing of data, providing Web Apps on CE
devices or standalone on same-machine setups, and/or within internal
company networks, or ....).
There are also many situations where I may not use ASA's Web Services
directly (e.g. replacing Google apache servers :-), since
typical web servers today would scale better (to millions of users).
(Note we're not in the market to replace web servers, but rather to
provide an easy way to serve up content in a mobile and/or
workgroup environment. (But we have stress ASA HTTP server with
1000s of clients and have seen reasonable response.)
FWIW: Internally, we use Web Services for a number of applications
since its so easy to put an app together to gather/report information.
I have also developed an entire web site that is totally generated and
served up by a SQLAnywhere server. (When/if I'm ever "done" this app,
I'll likely make it available as a sample)
We also continue to make improvements to the HTTP server, and you
will see some of these changes in Jasper.
About Java:
SQLAnywhere still supports Java as a procedural languange, and we are
continuing that support in Jasper. What was dropped in a previous version
was support for being able to store Java objects in the database.
Support of this feature was constraining the ability to make other
neccessary improvements and affected performance significantly.
<disclaimer>
No one can give a definitive answer since no one can see the future,
but perhaps the above will shed some light on where we are today?
</disclaimer>
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
Justin Willey wrote:
>
> Hi
>
> We have been experimenting with publishing web services and the XML
> generation / handling in v9. The functionality seems great and performs
> well.
>
> We are concerned however over what take up there is of the functionality by
> the user base and what the long term future of it in the product is. Some
> years ago we made a major development commitment to the "java in the
> database" functionality, which again we found very powerful, only to have
> the rug pulled from under our feet when the capability was dumped because
> "no-one was using it". It took a great deal of developer effort to reverse
> out of java and we don't want to have to do the same again with web services
> / xml.
>
> There only some ten threads this year on web services in this forum and a
> good half of those are about consuming rather than publishing web services.
>
> Is anyone using web services for a large scale project? Can anyone from
> ianywhere explain how web services fit into the development road map for
> ASA?
>
> Justin Willey
> IQX Limited
| |
| Paul Horan[TeamSybase] 2005-12-21, 8:24 pm |
| But - in order for the machine hosting the webservice to be "seen" by the
outside world, don't you have to place it outside the firewall, at least in
the DMZ? That places your DBMS (and all that juicy corporate data) there as
well.
Unless - you have one server out there with nothing but web services and
procedures, which then connects to a DBMS server INSIDE the firewall that
houses the actual database...
Paul
"Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
message news:tccjq1ltjciqp0i
jou6rtsivn8rj7jq3ph@
4ax.com...
> Exposing a web service is not exactly "exposing the DBMS engine".
>
> Breck
>
> On 21 Dec 2005 10:34:33 -0800, "Paul Horan[TeamSybase]"
> < paulhoran_nospam@ade
lphia.net> wrote:
>
>
> --
> SQL Anywhere Studio 9 Developer's Guide
> Buy the book:
> http://www.amazon.com/exec/obidos/A...7/risingroad-20
> bcarter@risingroad.com
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com
| |
| Clive Collie 2005-12-22, 7:23 am |
| I looked at web services when they first appeared and dismised them as not
useful because it was not possible to move the database from one machine to
another after the web service was set up. Has this behaviour been changed in
ASA9?
"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
wrote in message news:43A9CF96.4CE73EB9@iAnywhere.com...[color=darkred]
> There are going to be differences of opinion on how to best serve up
> web pages, as Justin and Breck have pointed out.
>
> Web Services in the engine is a new unique feature of SQLAnywhere,
> and the up-take of using it appears to be slow
> (I'm not sure that many developers know that the capability exists).
>
> There are many reasons where/why using Web Services in SQLAnywhere
> are beneficial (e.g. sharing of data, providing Web Apps on CE
> devices or standalone on same-machine setups, and/or within internal
> company networks, or ....).
>
> There are also many situations where I may not use ASA's Web Services
> directly (e.g. replacing Google apache servers :-), since
> typical web servers today would scale better (to millions of users).
> (Note we're not in the market to replace web servers, but rather to
> provide an easy way to serve up content in a mobile and/or
> workgroup environment. (But we have stress ASA HTTP server with
> 1000s of clients and have seen reasonable response.)
>
> FWIW: Internally, we use Web Services for a number of applications
> since its so easy to put an app together to gather/report information.
> I have also developed an entire web site that is totally generated and
> served up by a SQLAnywhere server. (When/if I'm ever "done" this app,
> I'll likely make it available as a sample)
>
> We also continue to make improvements to the HTTP server, and you
> will see some of these changes in Jasper.
>
> About Java:
> SQLAnywhere still supports Java as a procedural languange, and we are
> continuing that support in Jasper. What was dropped in a previous version
> was support for being able to store Java objects in the database.
> Support of this feature was constraining the ability to make other
> neccessary improvements and affected performance significantly.
>
> <disclaimer>
> No one can give a definitive answer since no one can see the future,
> but perhaps the above will shed some light on where we are today?
> </disclaimer>
> --
> Mark Culp
> SQLAnywhere Research and Development
> -------------------------------------------------------------------------
> ** Whitepapers, TechDocs, bug fixes are all available through the **
> ** iAnywhere Developer Community at http://www.ianywhere.com/developer **
> -------------------------------------------------------------------------
> Justin Willey wrote:
| |
| Michael 2005-12-22, 7:23 am |
| Can't you just open the relevant port?
Michael Scott
Paul Horan[TeamSybase] wrote:
> But - in order for the machine hosting the webservice to be "seen" by the
> outside world, don't you have to place it outside the firewall, at least in
> the DMZ? That places your DBMS (and all that juicy corporate data) there as
> well.
>
| |
| Mark Culp 2005-12-22, 7:23 am |
| In what way is a database that has web services not portable?
I move my database (w/ the web site) between Windows and Linux boxes
all the time and don't have any problems.
- Mark
Clive Collie wrote:[color=darkred
]
>
> I looked at web services when they first appeared and dismised them as not
> useful because it was not possible to move the database from one machine to
> another after the web service was set up. Has this behaviour been changed in
> ASA9?
>
> "Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
> wrote in message news:43A9CF96.4CE73EB9@iAnywhere.com...
| |
| Mark Culp 2005-12-22, 7:23 am |
| You don't have to put the server outside the firewall in order to expose
the web service to the "world"... What I do is route the port from the
"world" side of the firewall through the firewall to the inside machine/port.
This can easily be done using most routers and firewall hardware/software.
With this setup, only the web service HTTP port (e.g. port 80) is exposed
to the world, and so you only need to concentrate on ensure that all of your
web services are "locked down" appropriately. All of the other standard
communication (dblib, odbc, etc) are not affected and are not exposed
outside the firewall.
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
"Paul Horan[TeamSybase]" wrote:[color=darkred
]
>
> But - in order for the machine hosting the webservice to be "seen" by the
> outside world, don't you have to place it outside the firewall, at least in
> the DMZ? That places your DBMS (and all that juicy corporate data) there as
> well.
>
> Unless - you have one server out there with nothing but web services and
> procedures, which then connects to a DBMS server INSIDE the firewall that
> houses the actual database...
>
> Paul
>
> "Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
> message news:tccjq1ltjciqp0i
jou6rtsivn8rj7jq3ph@
4ax.com...
| |
| Breck Carter [TeamSybase] 2005-12-22, 9:23 am |
| You have to open up a port... just one port, like 80. That puts the
builtin HTTP server outside the firewall, but not the database server
as a whole.
Breck
On 21 Dec 2005 15:06:43 -0800, "Paul Horan[TeamSybase]"
< paulhoran_nospam@ade
lphia.net> wrote:
>But - in order for the machine hosting the webservice to be "seen" by the
>outside world, don't you have to place it outside the firewall, at least in
>the DMZ? That places your DBMS (and all that juicy corporate data) there as
>well.
>
>Unless - you have one server out there with nothing but web services and
>procedures, which then connects to a DBMS server INSIDE the firewall that
>houses the actual database...
>
>Paul
>
>"Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
>message news:tccjq1ltjciqp0i
jou6rtsivn8rj7jq3ph@
4ax.com...
>
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| Breck Carter [TeamSybase] 2005-12-22, 9:23 am |
| On 22 Dec 2005 01:39:57 -0800, "Clive Collie"
<clive. doentdospam@dillisto
ne.com> wrote:
>it was not possible to move the database from one machine to
>another after the web service was set up.
Huh? AFAIK there has never been any such limitation.
Breck
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| David Kerber 2005-12-22, 9:23 am |
| In article <43a992e1@forums-2-dub>, gjw@nospamatall.iqx.co.uk says...
> Hi
>
> We have been experimenting with publishing web services and the XML
> generation / handling in v9. The functionality seems great and performs
> well.
>
> We are concerned however over what take up there is of the functionality by
> the user base and what the long term future of it in the product is. Some
> years ago we made a major development commitment to the "java in the
> database" functionality, which again we found very powerful, only to have
> the rug pulled from under our feet when the capability was dumped because
> "no-one was using it". It took a great deal of developer effort to reverse
> out of java and we don't want to have to do the same again with web services
> / xml.
The java-in-the-database functionality is still there, just in a
different form from what it was before: you can't store java objects in
tables, but can still have java classes stored and used in the database.
I am still using it in a 9.0.2 database.
.....
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
| |
| Clive Collie 2005-12-22, 11:23 am |
| I am talking SOAP using .NET rather than HTTP here.
I create a SOAP web service and DISH proc first in ASA9, then in VS2003
create an application in C#. Using the Add a Web Reference Wizard I can
connect and generate a Proxy. It may look something like this:
[System.Diagnostics. DebuggerStepThroughA
ttribute()]
[System.ComponentModel. DesignerCategoryAttr
ibute("code")]
[System.Web.Services. WebServiceBindingAtt
ribute(Name=" dish_stuffSoapBindin
g",
Namespace="http://localhost/webtest/dish_stuff")]
public class dish_stuff :
System.Web.Services.Protocols. SoapHttpClientProtoc
ol {
/// <remarks/>
public dish_stuff() {
this.Url = "http://localhost/webtest/dish_stuff";
}
/// <remarks/>
[System.Web.Services.Protocols. SoapDocumentMethodAt
tribute("http://localhost/webtest/hello_world",
RequestNamespace="http://localhost/webtest/dish_stuff",
ResponseNamespace="http://localhost/webtest/dish_stuff",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=Syste
m.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public System.Data.DataSet hello_world(out int sqlcode) {
object[] results = this.Invoke("hello_world", new object[0]);
sqlcode = ((int)(results[1]));
return ((System.Data.DataSet)(results[0]));
}
I can then test this and it all works fine. Now I move the database to
another PC or change the port it listens on. Lets say I change the Port to
8080. Now to connect to the service I can change the URL on line 8 to:
this.Url = http://localhost:8080/webtest/dish_stuff;
Now when I run this it seems to connect OK but no results come back. If I go
through the code and change EVERY INSTANCE of localhost to localhost:8080 I
can get it to work again. However most of those instances are hard coded
attributes (unlike the URL property which can be changed at run time).
This is what I mean when I say I can't move the database. Once the proxy is
generated it hardcodes the namespaces. Moving the DB seems to change the
namespace so nothing comes back in the results when the service is called
but no error is given.
It has always done this but I don't know how to resolve the issue. I assume
it must be either resolvable or that nobody out there is using the SOAP
stuff.
"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
wrote in message news:43AAA6EF.B92C21BF@iAnywhere.com...[color=darkred]
> In what way is a database that has web services not portable?
>
> I move my database (w/ the web site) between Windows and Linux boxes
> all the time and don't have any problems.
>
> - Mark
>
> Clive Collie wrote:
| |
| Breck Carter [TeamSybase] 2005-12-22, 8:24 pm |
| As far as I can tell, you're talking about problems with an URL that
is hard-coded on the client side. That's where the problem lies, not
with the ASA service... or am I missing something?
Breck
On 22 Dec 2005 08:10:47 -0800, "Clive Collie"
<clive. doentdospam@dillisto
ne.com> wrote:
>I am talking SOAP using .NET rather than HTTP here.
>
>I create a SOAP web service and DISH proc first in ASA9, then in VS2003
>create an application in C#. Using the Add a Web Reference Wizard I can
>connect and generate a Proxy. It may look something like this:
>
>
>[System.Diagnostics. DebuggerStepThroughA
ttribute()]
>[System.ComponentModel. DesignerCategoryAttr
ibute("code")]
>[System.Web.Services. WebServiceBindingAtt
ribute(Name=" dish_stuffSoapBindin
g",
>Namespace="http://localhost/webtest/dish_stuff")]
>
>public class dish_stuff :
>System.Web.Services.Protocols. SoapHttpClientProtoc
ol {
>/// <remarks/>
>public dish_stuff() {
>this.Url = "http://localhost/webtest/dish_stuff";
>}
>
>
>/// <remarks/>
>[System.Web.Services.Protocols. SoapDocumentMethodAt
tribute("http://localhost/webtest/hello_world",
>RequestNamespace="http://localhost/webtest/dish_stuff",
>ResponseNamespace="http://localhost/webtest/dish_stuff",
>Use=System.Web.Services.Description.SoapBindingUse.Literal,
> ParameterStyle=Syste
m.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
>public System.Data.DataSet hello_world(out int sqlcode) {
>object[] results = this.Invoke("hello_world", new object[0]);
>sqlcode = ((int)(results[1]));
>return ((System.Data.DataSet)(results[0]));
>}
>
>I can then test this and it all works fine. Now I move the database to
>another PC or change the port it listens on. Lets say I change the Port to
>8080. Now to connect to the service I can change the URL on line 8 to:
>
>this.Url = http://localhost:8080/webtest/dish_stuff;
>
>Now when I run this it seems to connect OK but no results come back. If I go
>through the code and change EVERY INSTANCE of localhost to localhost:8080 I
>can get it to work again. However most of those instances are hard coded
>attributes (unlike the URL property which can be changed at run time).
>
>This is what I mean when I say I can't move the database. Once the proxy is
>generated it hardcodes the namespaces. Moving the DB seems to change the
>namespace so nothing comes back in the results when the service is called
>but no error is given.
>
>It has always done this but I don't know how to resolve the issue. I assume
>it must be either resolvable or that nobody out there is using the SOAP
>stuff.
>
>
>"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
>wrote in message news:43AAA6EF.B92C21BF@iAnywhere.com...
>
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| Mark Culp 2005-12-22, 8:24 pm |
| This is actually a bug in the MS .Net runtime - when you write your SOAP
app and use the WSDL to generate your SOAP RPC calls (within your client
app), MS ends up hard-coding the host name in the compiled app.
Then when you run the app, the compiled code appears to check that the
result came back from the same host name as was originally used (when the
WSDL was generated), and if it is not the same you get nothing. Blah ! :-(
As a workaround to this issue, you can set the " webservice_namespace
_host"
database option in your database to force it to report in the SOAP
response that the SOAP database is coming from the specified "host"
rather than the default (which is the name of the engine's host machine).
See the doc section:
ASA Database Administration Guide
Database Options
Alphabetical list of options
WEBSERVICE_NAMESPACE
_HOST option [database]
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
Clive Collie wrote:[color=darkred
]
>
> I am talking SOAP using .NET rather than HTTP here.
>
> I create a SOAP web service and DISH proc first in ASA9, then in VS2003
> create an application in C#. Using the Add a Web Reference Wizard I can
> connect and generate a Proxy. It may look something like this:
>
> [System.Diagnostics. DebuggerStepThroughA
ttribute()]
> [System.ComponentModel. DesignerCategoryAttr
ibute("code")]
> [System.Web.Services. WebServiceBindingAtt
ribute(Name=" dish_stuffSoapBindin
g",
> Namespace="http://localhost/webtest/dish_stuff")]
>
> public class dish_stuff :
> System.Web.Services.Protocols. SoapHttpClientProtoc
ol {
> /// <remarks/>
> public dish_stuff() {
> this.Url = "http://localhost/webtest/dish_stuff";
> }
>
> /// <remarks/>
> [System.Web.Services.Protocols. SoapDocumentMethodAt
tribute("http://localhost/webtest/hello_world",
> RequestNamespace="http://localhost/webtest/dish_stuff",
> ResponseNamespace="http://localhost/webtest/dish_stuff",
> Use=System.Web.Services.Description.SoapBindingUse.Literal,
> ParameterStyle=Syste
m.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
> public System.Data.DataSet hello_world(out int sqlcode) {
> object[] results = this.Invoke("hello_world", new object[0]);
> sqlcode = ((int)(results[1]));
> return ((System.Data.DataSet)(results[0]));
> }
>
> I can then test this and it all works fine. Now I move the database to
> another PC or change the port it listens on. Lets say I change the Port to
> 8080. Now to connect to the service I can change the URL on line 8 to:
>
> this.Url = http://localhost:8080/webtest/dish_stuff;
>
> Now when I run this it seems to connect OK but no results come back. If I go
> through the code and change EVERY INSTANCE of localhost to localhost:8080 I
> can get it to work again. However most of those instances are hard coded
> attributes (unlike the URL property which can be changed at run time).
>
> This is what I mean when I say I can't move the database. Once the proxy is
> generated it hardcodes the namespaces. Moving the DB seems to change the
> namespace so nothing comes back in the results when the service is called
> but no error is given.
>
> It has always done this but I don't know how to resolve the issue. I assume
> it must be either resolvable or that nobody out there is using the SOAP
> stuff.
>
> "Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
> wrote in message news:43AAA6EF.B92C21BF@iAnywhere.com...
| |
| Clive Collie 2005-12-23, 7:23 am |
| I have added a WEBSERVICE_NAMESPACE
_HOST ='Dillistone' and regenerated the
proxy stub. Now I set the url of the proxy to the new location and end up
back where I started; still no results.
TCP Trace gives me:
OUT:
POST /webtest/dish_stuff HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.1.4322.2032)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://Dillistone/webtest/hello_world"
Content-Length: 317
Expect: 100-continue
Connection: Keep-Alive
Host: localhost:8080
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><hello_world
xmlns="http://Dillistone/webtest/dish_stuff" /></soap:Body></soap:Envelope>
IN:
HTTP/1.0 200 OK
Server: AdaptiveServerAnywhe
re/9.0.2.3044
Date: Fri, 23 Dec 2005 09:24:53 GMT
Expires: Fri, 23 Dec 2005 09:24:53 GMT
Content-Type: text/xml; charset=windows-1252
Connection: close
<?xml version="1.0"?><SOAP-ENV:Envelope
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:sqltypes='http
://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
xmlns:sqlmessage='ht
tp://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage'
xmlns:sqlresultstrea
m='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream'
xmlns:tns= 'http://localhost:8080/webtest/dish_stuff' >
<SOAP-ENV:Body>
< tns:hello_worldRespo
nse>
< tns:hello_worldResul
t xsi:type='sqlresults
tream:SqlRowSet'>
<xsd:schema id='Schema2' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:msdata='urn:sc
hemas-microsoft.com:xml-msdata'>
<xsd:element name='rowset' msdata:IsDataSet='tr
ue'>
<xsd:complexType>
<xsd:sequence>
<xsd:element name='row' minOccurs='0' maxOccurs='unbounded
'>
<xsd:complexType>
<xsd:sequence>
<xsd:element name='html_doc' minOccurs='0' type='xsd:string' />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<diffgr:diffgram xmlns:msdata='urn:sc
hemas-microsoft-com:xml-msdata'
xmlns:diffgr='urn:sc
hemas-microsoft-com:xml-diffgram-v1'>
<rowset>
<row>
<html_doc>hello DBA</html_doc>
</row>
</rowset>
</diffgr:diffgram>
</ tns:hello_worldResul
t>
<tns:sqlcode>0</tns:sqlcode>
</ tns:hello_worldRespo
nse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Is it the xmlns:tns='http://localhost:8080/webtest/dish_stuff' attribute in
the reply that is messing things up? Have I missed out something? I am using
version 9.0.2.3044 if that makes a difference and VS2003 and 2005.
"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
wrote in message news:43AB0FFB.34F55CE@iAnywhere.com...[color=darkred]
> This is actually a bug in the MS .Net runtime - when you write your SOAP
> app and use the WSDL to generate your SOAP RPC calls (within your client
> app), MS ends up hard-coding the host name in the compiled app.
> Then when you run the app, the compiled code appears to check that the
> result came back from the same host name as was originally used (when the
> WSDL was generated), and if it is not the same you get nothing. Blah !
> :-(
>
> As a workaround to this issue, you can set the " webservice_namespace
_host"
> database option in your database to force it to report in the SOAP
> response that the SOAP database is coming from the specified "host"
> rather than the default (which is the name of the engine's host machine).
>
> See the doc section:
> ASA Database Administration Guide
> Database Options
> Alphabetical list of options
> WEBSERVICE_NAMESPACE
_HOST option [database]
> --
> Mark Culp
> SQLAnywhere Research and Development
> -------------------------------------------------------------------------
> ** Whitepapers, TechDocs, bug fixes are all available through the **
> ** iAnywhere Developer Community at http://www.ianywhere.com/developer **
> -------------------------------------------------------------------------
> Clive Collie wrote:
| |
| Mark Culp 2005-12-23, 9:23 am |
| Sorry, I should have mentioned that you need to use 9.0.2 build 3175
(or higher). A fix for precisely the "localhost:8080" that you mentioned
was fixed back in August.
- Mark
Clive Collie wrote:[color=darkred
]
>
> I have added a WEBSERVICE_NAMESPACE
_HOST ='Dillistone' and regenerated the
> proxy stub. Now I set the url of the proxy to the new location and end up
> back where I started; still no results.
> TCP Trace gives me:
>
> OUT:
> POST /webtest/dish_stuff HTTP/1.1
> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
> Protocol 1.1.4322.2032)
> Content-Type: text/xml; charset=utf-8
> SOAPAction: "http://Dillistone/webtest/hello_world"
> Content-Length: 317
> Expect: 100-continue
> Connection: Keep-Alive
> Host: localhost:8080
>
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><hello_world
> xmlns="http://Dillistone/webtest/dish_stuff" /></soap:Body></soap:Envelope>
>
> IN:
> HTTP/1.0 200 OK
> Server: AdaptiveServerAnywhe
re/9.0.2.3044
> Date: Fri, 23 Dec 2005 09:24:53 GMT
> Expires: Fri, 23 Dec 2005 09:24:53 GMT
> Content-Type: text/xml; charset=windows-1252
> Connection: close
>
> <?xml version="1.0"?><SOAP-ENV:Envelope
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
> xmlns:sqltypes='http
://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
> xmlns:sqlmessage='ht
tp://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage'
> xmlns:sqlresultstrea
m='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream'
> xmlns:tns= 'http://localhost:8080/webtest/dish_stuff' >
> <SOAP-ENV:Body>
> < tns:hello_worldRespo
nse>
> < tns:hello_worldResul
t xsi:type='sqlresults
tream:SqlRowSet'>
> <xsd:schema id='Schema2' xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> xmlns:msdata='urn:sc
hemas-microsoft.com:xml-msdata'>
> <xsd:element name='rowset' msdata:IsDataSet='tr
ue'>
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name='row' minOccurs='0' maxOccurs='unbounded
'>
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name='html_doc' minOccurs='0' type='xsd:string' />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> <diffgr:diffgram xmlns:msdata='urn:sc
hemas-microsoft-com:xml-msdata'
> xmlns:diffgr='urn:sc
hemas-microsoft-com:xml-diffgram-v1'>
> <rowset>
> <row>
> <html_doc>hello DBA</html_doc>
> </row>
> </rowset>
> </diffgr:diffgram>
> </ tns:hello_worldResul
t>
> <tns:sqlcode>0</tns:sqlcode>
> </ tns:hello_worldRespo
nse>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Is it the xmlns:tns='http://localhost:8080/webtest/dish_stuff' attribute in
> the reply that is messing things up? Have I missed out something? I am using
> version 9.0.2.3044 if that makes a difference and VS2003 and 2005.
>
> "Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
> wrote in message news:43AB0FFB.34F55CE@iAnywhere.com...
| |
| Greg Fenton 2005-12-23, 11:23 am |
| Mark Culp wrote:
> You don't have to put the server outside the firewall in order to expose
> the web service to the "world"... What I do is route the port from the
> "world" side of the firewall through the firewall to the inside machine/port.
> This can easily be done using most routers and firewall hardware/software.
>
And this is identical to the configuration one uses to allow an app
server or webserver to serve information from an "internal system". You
open your internal firewall allowing only one specify type of connection
(e.g. an ODBC connection). Mark's suggested design is even more secure
as there is no "database connection" that could be hijacked...at worst
if someone gets control of your webserver, they can only fire HTTP
requests at your database's webservices.
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
|
|
|
|
|