How to write a VB2008 Web Service to accept text/data

R

Robert Paresi

Hello,

Can someone point me to an article or help me privately?

I want to create a VB2008 application which sits on an IIS server and
accepts an HTTPS POST. The data coming in will be text (XML) data. I then
want to simply call a PASCAL DLL passing this string, and then respond with
"OK".

Example:

myserver/receivedata.aspx

And the service will POST the data and wait for a response. I collect the
POST data, call a PASCAL DLL, it processes the data, it responds with OK and
my VB2008 application responds with "OK" and closes the connection.

I just need to know what is the code in VB 2008 to write (ASPX or a better
way??) to take the data from the post (Stream?) over the secure port
(HTTPS), collect it (it can be up to 4MB) and then call the DLL. The DLL
is responsible for processing the data, and then it will return a response
.... like "OK".

Any help wouldl be greatly appreciated. If someone wants to help with this
project via consulting, that would happy to pay a little fee.

Thank you very much.

** Responding privately will bouce-back ... just email me to my hotmail
account which is robertintpa @ my hotmail account . com

-Robert
 
R

rowe_newsgroups

Hello,

Can someone point me to an article or help me privately?

I want to create a VB2008 application which sits on an IIS server and
accepts an HTTPS POST. The data coming in will be text (XML) data.  I then
want to simply call a PASCAL DLL passing this string, and then respond with
"OK".

Example:

myserver/receivedata.aspx

And the service will POST the data and wait for a response.   I collect the
POST data, call a PASCAL DLL, it processes the data, it responds with OK and
my VB2008 application responds with "OK" and closes the connection.

I just need to know what is the code in VB 2008 to write (ASPX or a better
way??) to take the data from the post (Stream?) over the secure port
(HTTPS), collect it (it can be up to 4MB) and then call the DLL.   The DLL
is responsible for processing the data, and then it will return a response
... like "OK".

Any help wouldl be greatly appreciated.   If someone wants to help with this
project via consulting, that would happy to pay a little fee.

Thank you very much.

** Responding privately will bouce-back ... just email me to my hotmail
account which is robertintpa @  my hotmail account . com

-Robert

Create a web service project, it should generate the template for you.

Thanks,

Seth Rowe [MVP]
 
R

Robert Paresi

Hello,

Your one sentence answer really didn't help me much.

I have VB 2008 Express.

Can you give me a little more information?

-Robert

Hello,

Can someone point me to an article or help me privately?

I want to create a VB2008 application which sits on an IIS server and
accepts an HTTPS POST. The data coming in will be text (XML) data. I then
want to simply call a PASCAL DLL passing this string, and then respond
with
"OK".

Example:

myserver/receivedata.aspx

And the service will POST the data and wait for a response. I collect the
POST data, call a PASCAL DLL, it processes the data, it responds with OK
and
my VB2008 application responds with "OK" and closes the connection.

I just need to know what is the code in VB 2008 to write (ASPX or a better
way??) to take the data from the post (Stream?) over the secure port
(HTTPS), collect it (it can be up to 4MB) and then call the DLL. The DLL
is responsible for processing the data, and then it will return a response
... like "OK".

Any help wouldl be greatly appreciated. If someone wants to help with this
project via consulting, that would happy to pay a little fee.

Thank you very much.

** Responding privately will bouce-back ... just email me to my hotmail
account which is robertintpa @ my hotmail account . com

-Robert

Create a web service project, it should generate the template for you.

Thanks,

Seth Rowe [MVP]
 
R

rowe_newsgroups

Hello,

Your one sentence answer really didn't help me much.

I have VB 2008 Express.

Can you give me a little more information?

-Robert











Create a web service project, it should generate the template for you.

Thanks,

Seth Rowe [MVP]- Hide quoted text -

- Show quoted text -

You might need to download Visual Web Devoloper to get the template.
When you create a new project or website, there is a project type
called something like "ASP.NET Web Service". When you create it, it
will generate webservice class that should show you the jist of what
you need to do. For anything else on ASP.NET webservices, google is
your friend.

Thanks,

Seth Rowe [MVP]
 
R

Robert Paresi

Hello,

Thank you - I figured it out with a simple ASP.

Dim ReturnXML

Set objXMLDOM = Server.CreateObject("MSXML2.DOMDocument")

objXMLDOM.setProperty "ServerHTTPRequest", True
objXMLDOM.async = False
objXMLDOM.load(Request)

ReturnXML = myCOMobject(objXMLDOM.xml)

response.ContentType = "text/xml"
response.write ReturnXML

-Robert


Hello,

Your one sentence answer really didn't help me much.

I have VB 2008 Express.

Can you give me a little more information?

-Robert











Create a web service project, it should generate the template for you.

Thanks,

Seth Rowe [MVP]- Hide quoted text -

- Show quoted text -

You might need to download Visual Web Devoloper to get the template.
When you create a new project or website, there is a project type
called something like "ASP.NET Web Service". When you create it, it
will generate webservice class that should show you the jist of what
you need to do. For anything else on ASP.NET webservices, google is
your friend.

Thanks,

Seth Rowe [MVP]
 
R

rowe_newsgroups

Hello,

Thank you - I figured it out with a simple ASP.

Dim ReturnXML

 Set objXMLDOM = Server.CreateObject("MSXML2.DOMDocument")

 objXMLDOM.setProperty "ServerHTTPRequest", True
 objXMLDOM.async = False
 objXMLDOM.load(Request)

  ReturnXML = myCOMobject(objXMLDOM.xml)

  response.ContentType = "text/xml"
  response.write ReturnXML

-Robert









You might need to download Visual Web Devoloper to get the template.
When you create a new project or website, there is a project type
called something like "ASP.NET Web Service". When you create it, it
will generate webservice class that should show you the jist of what
you need to do. For anything else on ASP.NET webservices, google is
your friend.

Thanks,

Seth Rowe [MVP]- Hide quoted text -

- Show quoted text -

As Steve has mentioned, you haven't done a .NET webservice at all, but
if you are happy then that's what counts. I would highly recommend
that if a .NET component is going to consume this service that you
write it as a true service and not just a dynamic XML file. With a
webservice you will get full object based support (including
Intellisense) where otherwise you would have to manually parse the
XML.

Thanks,

Seth Rowe [MVP]
 
R

Robert Paresi

Hello,

I have a WIN32 DLL which has to process this XML message because it is part
of over 100 very large functions which do a tremendous amount of work. My
goal is just to pass the XML message to the WIN32 functions which are
already setup to handle this request.

My issue is just collecting the data and getting it into the WIN32 dll - and
what is the most efficient way to collect the HTTPS Post and pass that RAW
XML data over to the WIN32 C++ or PASCAL DLL. Once that WIN32 DLL
processes it, it will answer back and that answer just needs to get sent
back to the URL/Computer which has posted the message. The whole thing has
to happen in 16 seconds

Does that make sense? I am open to any idea (asp, asmx, aspx, cgi, php,
etc.) .... How would you do it?

I dont need to validate the XML data, I just want to pass it on RAW since
there are functions already setup which can validate the XML and parse it
quickly and do what it needs to do.

Thank you.

-Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top