Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to build RPC BASED WEB SERVICE IN ASP.NET 2.0

How to build RPC BASED WEB SERVICE IN ASP.NET 2.0

Scheduled Pinned Locked Moved ASP.NET
csharptutorialasp-netvisual-studioxml
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yuwraj
    wrote on last edited by
    #1

    Hi All, I am developing webservice in asp.net 2.0 which must be RPC Style based which takes input as a xml file.I am just developing default webservice in Visual Studio 2005 which has webMethod.Is this is RPC STYLE OR Document style webservice? if No then how build RPC style one.........? Also How client then made request to this service which must be open on some port. Send me some example for RPC STyle Web Service if possible. Thanks in Advance.

    J 1 Reply Last reply
    0
    • Y Yuwraj

      Hi All, I am developing webservice in asp.net 2.0 which must be RPC Style based which takes input as a xml file.I am just developing default webservice in Visual Studio 2005 which has webMethod.Is this is RPC STYLE OR Document style webservice? if No then how build RPC style one.........? Also How client then made request to this service which must be open on some port. Send me some example for RPC STyle Web Service if possible. Thanks in Advance.

      J Offline
      J Offline
      Jim Conigliaro
      wrote on last edited by
      #2

      By default, Visual Studio creates document style web services. This can be a problem if you are calling the web service from a J2EE application becuase J2EE clients expect RPC style services by default. The good news is that it is easy to change the stype of your web service. 1. Add [SoapRpcService()] above your class declaration 2. Remove [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] from your web service class. Let's look at the default web service visual studio provides when you create a new web services project: /// DOCUMENT STYLE [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } } Here is the same web service implemented RPC style // RPC STYLE [WebService(Namespace = "http://tempuri.org/")] [ToolboxItem(false)] [SoapRpcService()] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } }

      Jim Conigliaro jconigliaro@ieee.org
      http://www.jimconigliaro.com

      Y 2 Replies Last reply
      0
      • J Jim Conigliaro

        By default, Visual Studio creates document style web services. This can be a problem if you are calling the web service from a J2EE application becuase J2EE clients expect RPC style services by default. The good news is that it is easy to change the stype of your web service. 1. Add [SoapRpcService()] above your class declaration 2. Remove [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] from your web service class. Let's look at the default web service visual studio provides when you create a new web services project: /// DOCUMENT STYLE [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } } Here is the same web service implemented RPC style // RPC STYLE [WebService(Namespace = "http://tempuri.org/")] [ToolboxItem(false)] [SoapRpcService()] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } }

        Jim Conigliaro jconigliaro@ieee.org
        http://www.jimconigliaro.com

        Y Offline
        Y Offline
        Yuwraj
        wrote on last edited by
        #3

        Thanks a lot............

        1 Reply Last reply
        0
        • J Jim Conigliaro

          By default, Visual Studio creates document style web services. This can be a problem if you are calling the web service from a J2EE application becuase J2EE clients expect RPC style services by default. The good news is that it is easy to change the stype of your web service. 1. Add [SoapRpcService()] above your class declaration 2. Remove [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] from your web service class. Let's look at the default web service visual studio provides when you create a new web services project: /// DOCUMENT STYLE [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } } Here is the same web service implemented RPC style // RPC STYLE [WebService(Namespace = "http://tempuri.org/")] [ToolboxItem(false)] [SoapRpcService()] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld() { return "Hello World"; } }

          Jim Conigliaro jconigliaro@ieee.org
          http://www.jimconigliaro.com

          Y Offline
          Y Offline
          Yuwraj
          wrote on last edited by
          #4

          Hi Jim, I have created one RPC Style WebService by including [SoapRpcService()]. Now after launching how to open that webService to particular port,so that it can able to listen the request from client. Actualy i have one code snippet [SoapRpcMethod()] public string GetData(string request) { data.XmlRequest = request; string response = data.GetData(); return response; } This take string as input which is in xml format.After parsing and performing calulation returns a string response which is in same format. so, my question is how this method listen the request from client? i.e J2EE Client. Or is there nessesary to open a partucular port for listening client request? What things I should do extra for converting it to RPC Based? Once again... Thanks in advance.

          J 1 Reply Last reply
          0
          • Y Yuwraj

            Hi Jim, I have created one RPC Style WebService by including [SoapRpcService()]. Now after launching how to open that webService to particular port,so that it can able to listen the request from client. Actualy i have one code snippet [SoapRpcMethod()] public string GetData(string request) { data.XmlRequest = request; string response = data.GetData(); return response; } This take string as input which is in xml format.After parsing and performing calulation returns a string response which is in same format. so, my question is how this method listen the request from client? i.e J2EE Client. Or is there nessesary to open a partucular port for listening client request? What things I should do extra for converting it to RPC Based? Once again... Thanks in advance.

            J Offline
            J Offline
            Jim Conigliaro
            wrote on last edited by
            #5

            Once a web service is deployed, it is always listening, but that is handled by IIS. Web services function very much like web pages. When you type a URL into your browser, a request is made the server for the specififed web page and the web page response with some content. A web service works very much the same way; when IIS receives a request from the client, it passes it on to your web service which then response with the appropriate SOAP response. By default, web services run over port 80, but you can configure IIS to use any port you wish without changing any code.

            Jim Conigliaro jconigliaro@ieee.org
            http://www.jimconigliaro.com

            Y 1 Reply Last reply
            0
            • J Jim Conigliaro

              Once a web service is deployed, it is always listening, but that is handled by IIS. Web services function very much like web pages. When you type a URL into your browser, a request is made the server for the specififed web page and the web page response with some content. A web service works very much the same way; when IIS receives a request from the client, it passes it on to your web service which then response with the appropriate SOAP response. By default, web services run over port 80, but you can configure IIS to use any port you wish without changing any code.

              Jim Conigliaro jconigliaro@ieee.org
              http://www.jimconigliaro.com

              Y Offline
              Y Offline
              Yuwraj
              wrote on last edited by
              #6

              Hi, Last but not list..................................... How to call RPC WebService through J2EE client through SOAP Request.

              J 1 Reply Last reply
              0
              • Y Yuwraj

                Hi, Last but not list..................................... How to call RPC WebService through J2EE client through SOAP Request.

                J Offline
                J Offline
                Jim Conigliaro
                wrote on last edited by
                #7

                It's been about five years since I've worked heavily in Java, so I don't think I could help you out, but this link may be helpful: https://bpcatalog.dev.java.net/nonav/soa/j2ee-client/index.html[^]

                Jim Conigliaro jconigliaro@ieee.org
                http://www.jimconigliaro.com

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups