Similar to Java WS-*, different classes are exposed to multiple ports in an ASP. NET service.

Source: Internet
Author: User

below is an example of SSO in JBoss:

  • sso2.war # rolecomponent (WSDL)
    • getroles
    • gettherolefunctions
    • gettherolefunctionsbycode
    • getthesystemroles
    • getuserbysystemnameandroleid
    • isfunctioninrole
  • Sso2.war # usercomponent  (WSDL)
    • Login
    • Loginuser
    • Getfilternodes
    • Getfunctions
    • Gettheuserfunctions
    • Gettheusernodes
    • Gettheuserroles
    • Gettheuserroles2
    • Getuserbyid
    • Getusers
    • Isinfunction
    • Isinfunctionbycode
    • Isinrole
    • Isinrolebycode
    • Getusers
  • SSO. War # rolecomponent (WSDL)
    • Getroles
    • Gettherolefunctions
    • Gettherolefunctionsbycode
    • Getthesystemroles
    • Getuserbysystemnameandroleid
  • It is not hard to see that different classes and webmethods are provided in a service.
    However, if you register two in ASP. NET web services, the following error occurs:

    Parser Error

    Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific Parse error details and modify your source file appropriately.

    Parser error message:There can be only one 'webservice' direve ve.

    Source error:

     
    Line 1: <% @ WebService Language = "C #" codebehind = "userservice. asmx. cs" class = "inventory. userservice" %>
    Line 2: <% @ WebService Language = "C #" codebehind = "userservice. asmx. cs" class = "inventory. groupservice" %>


    Source file:/Userservice. asmxLine:2

    Therefore, if you want to remove Java Web Services in a similar way, and do not let the service customersProgramToo many modificationsCodeYou can use port to separate a Web Service:

    <Service name="Ssoservice">

    port binding =" TNS: nodeservicebinding " name =" nodeserviceport ">

    soap: address location =< span style =" Background: yellow ">" HTTP: // win2003/sso2/service/nodeservice " />

     </Port>

    < Port binding =" TNS: userservicebinding " Name =" Userserviceport ">

    soap: address location =< span style =" Background: yellow ">" HTTP: // win2003/sso2/service/userservice " />

     </Port>

    < Port binding =" TNS: roleservicebinding " Name =" Roleserviceport ">

    soap: address location =< span style =" Background: yellow ">" HTTP: // win2003/sso2/service/roleservice " />

    </Port>

     </Service>

    Transferred from: an email from Shen and Yuan.

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.