Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    how to integrate smartclient in asp.net2.0

    iam trying to implement the asp.net2.0 as front end and smart client i want use as tool in this.please suggest how to do if you send some example for the same it will be a great
    Last edited by sabir; 26 Mar 2007, 22:21.

    #2
    Hi sabir,

    The best place to start is this this overview. Follow the provided links for more information.

    Be sure not to miss the WSDL binding overview.
    Last edited by Isomorphic; 26 Mar 2007, 23:25.

    Comment


      #3
      how to integrate asp.net 2.0

      i am not getting how to start with asp.net so please give send links for the same . and if send the demo example for the same it will be greate help

      Comment


        #4
        Sorry, the overview link in my previous post was broken. It's fixed now - here's that link again:

        http://www.smartclient.com/docs/5.6/...nonJavaBackend

        The above is the best place to start for an overview of SmartClient development with an ASP.NET or any other back-end.

        One important thing to understand is that SmartClient does all HTML generation client-side, so there is no ASP.NET-specific code to write. To create SmartClient components, you simply write Javascript code and load only data from the back-end. In your case, the data would probably be loaded via web service calls.

        Hope this helps!

        Comment


          #5
          Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

          Hi All,
          iam trying to call a web service a one application but it is giving this error can any one help in this
          the error is
          Error: uncaught exception: Permission denied to call method XMLHttpRequest.open
          and the code
          is
          isc.DynamicForm.create({
          ID:"zipForm",
          left:50, top:50, numCols:3, cellSpacing:5,
          items:[
          {name:"ZipCode", keyPress: "if(keyName == 'Enter') form.callService()"},
          {type:"button", startRow:false, title:"Find City", click:"form.callService()"},
          {name:"City", type:"staticText"}
          ],
          callService: function () {
          if (!this.sabir) {
          isc.say("Please try again in a moment - still loading web service descriptor");
          return;
          }
          this.setValue('City', 'Loading...');
          // call the web service

          this.sabir.callOperation(
          "GetDistrict_Verified", // operation name

          {Districtcode:zipForm.getValue("ZipCode")}, // inbound data for operation

          // "//CITY", // XPath, Type, or ElementName to extract result

          "zipForm.setValue('City', data[0])" // script to execute when operation returns

          );
          }
          });


          // load the zipcode-lookup web-service description

          isc.XMLTools.loadWSDL(
          "http://localhost:2381/WebSite7/Service.asmx?WSDL", // URL

          "zipForm.sabir = service" // script to execute when description is loaded

          );
          the web service i am will return a integer value
          the webservice web method is


          public int GetDistrict_Verified(string DistrictCode)
          {
          RenwebMainDL.Entities.TList<District> tl = RenwebMainDL.DAL.DataRepository.DistrictProvider.Find("DistrictCode='" + DistrictCode + "'");
          return tl.Count; //int return if founed it will return 1 or else it will return 0


          }
          Last edited by sabir; 27 Mar 2007, 10:51.

          Comment


            #6
            Hi Sabir,

            Are you running two different web servers on two different ports? If so, you may be running into a FireFox-specific bug where requests to the origin server are not allowed if a different port is used.

            You should configure your system to return both the .asp page and the WSDL file from the same port, since for production deployments, this will be required in order for users behind some firewalls to reach your application.

            Comment


              #7
              can u tell me how to do this

              Hi all,
              iam new user of Smart client and i think all the smart client application will run on the port no 8080 ang the .net will on the other ports so plz tell do integrate this two prot
              and how to get a value from database in textbox
              thanx
              for ur so early reply

              Comment


                #8
                Sabir -

                The web service end point exposed by .NET or any other mechanism must run on the same host and port as the web application. The reason is for this is that browsers consider connections to other hosts or even other ports on the same host via XMLHttpRequest to be a security violation.

                Comment


                  #9
                  can you show us how to make the webserveice and webapplication in the same host

                  HI ,
                  can plz suggest how to do the .net and the web ap[plication in the same port since the smart client will run prot no8080 and .net else so plz ,tell how make then in the same port
                  sabir






                  The web service end point exposed by .NET or any other mechanism must run on the same host and port as the web application. The reason is for this is that browsers consider connections to other hosts or even other ports on the same host via XMLHttpRequest to be a security violation.

                  Comment


                    #10
                    Hi Sabir,

                    SmartClient is only running on port 8080 because the SmartClient SDK starts a Tomcat-based Java server for testing and evaluation purposes. What you need to do is deploy SmartClient into your .NET server instead of running it separately with the included Java-based server. Instructions for doing so are here:


                    http://www.smartclient.com/docs/5.6/a/b/c/go.html#group..iscInstall


                    Since you aren't installing the SmartClient server, as explained in the documentation, it's just a matter of copying directories from the SmartClient SDK into the directory from which your .NET server serves ordinary web content.

                    Comment


                      #11
                      Need some help on Webservice calloperation usage.

                      Hi Isomorphic team,

                      I am an new user of Isomorphic, smartclient tool. As per the suggestion given by your team i tried to deploy the client-server integration. The steps i followed are as follows:

                      1. the root directory for the webservice is c:\inetpub\website7, the isomorphic directory of the smart client tool has been completely copied to c:\inetpub, i followed this since website7 is one of the service in my application.

                      2. the test.html file was placed in c:\inetpub\website7 which is our front end

                      3. after the above setting, (ASP.NET development)IIS server has been initiated. with root URL http://localhost:2933/Website7 (virtual path being /website7)

                      4. when we try to execute the test.html, we are facing the error in IE as
                      Transport error - Http Code: 12157 for URL
                      http://localhost:2933/Website7/service.asmx?WSDL

                      with Mozilla firefox :
                      Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

                      5. the contents of the test.html is as follows:

                      <HTML><HEAD>
                      <SCRIPT>var isomorphicDir="../isomorphic/";</SCRIPT>
                      <SCRIPT SRC=../isomorphic/system/modules/ISC_Core.js></SCRIPT>
                      <SCRIPT SRC=../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
                      <SCRIPT SRC=../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
                      <SCRIPT SRC=../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
                      <SCRIPT SRC=../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
                      <SCRIPT SRC=../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
                      <SCRIPT SRC=../isomorphic/skins/standard/load_skin.js></SCRIPT>
                      </HEAD>
                      <BODY>

                      <!--------------------------
                      Example code starts here
                      ---------------------------->

                      <SCRIPT>

                      // form to take user input of zipcode, and display city returned from web service
                      isc.DynamicForm.create({
                      ID:"zipForm",
                      left:50, top:50, numCols:3, cellSpacing:5,
                      items:[
                      {name:"ZipCode"},
                      {type:"button", startRow:false, title:"Submit", click:"callService()"},
                      {name:"City", type:"integer"}
                      ],
                      autoDraw:false
                      });


                      // load the zipcode-lookup web-service description
                      var zipCodeService;
                      isc.XMLTools.loadWSDL(
                      // "http://www.webservicex.net/uszip.asmx?WSDL", // URL

                      "https://localhost:2933/WebSite7/Service.asmx?WSDL",
                      "zipCodeService = service; zipForm.show();" // script to //
                      //execute whendescription is loaded
                      );


                      // call the web service
                      function callService() {
                      zipCodeService.callOperation(
                      // "GetInfoByZIP", // operation name
                      // {USZip:zipForm.getValue("ZipCode")}, // inbound data for operation
                      // "//CITY",// XPath, Type, or ElementName to extract result

                      "GetDistrict_Verified", // operation name
                      {DistrictCode:zipForm.getValue("ZipCode")},// inbound data for operation


                      // "zipForm.setValue('City', data[0])" // script to execute when operation returns
                      "zipForm.setValue('City',GetDistrict_VerifiedResult)" // script to execute when operation returns


                      );
                      }


                      </SCRIPT>
                      </BODY>
                      </HTML>


                      Any thoughts about the problem!!!

                      Comment


                        #12
                        Hi Arun,

                        It looks like you are trying to call an HTTPS service from a page loaded via HTTP. The browser security model does not allow this. You need to either load the page (and all it's media, etc) via HTTPS, or contact the service via HTTP instead.

                        Comment


                          #13
                          I have tried that method still facing problem!! HELP!!!!!

                          Hi,

                          Infact initially i had used http instead of https. which used to give me IDAcall error. the error was as follows:

                          Transport error -HTTP code:2 for URL:
                          file:///c:/inetpub/isomorphic/IDAcall


                          Please suggest us, how & where we need to organise all the services & paths.And also if any tips for us about the configuration settings.

                          Comment


                            #14
                            Hi Arun,

                            It is not possible to end up with a URL starting with "file:///" unless what you actually did is open the file from your own disk by double clicking on it, using neither HTTP nor HTTPS.

                            I suggest you make another attempt, ensuring that you consistently use either HTTP or HTTPS URLs for test.html, the WSDL file, and the service location embedded in the WSDL file (on the <soap:address> element).

                            If you run into trouble again, use the DeveloperConsole to set the RPCManager log to DEBUG, reload the page, and post the output here - that will show the actual URLs in use.

                            Comment


                              #15
                              Server Log as well as RPCManager with debug mode

                              Server Log from the Developer Console.


                              === 2007-03-29 15:27:13,015 [sor3] DEBUG XML - Parsed XML from (in memory stream): 0ms
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG RPCManager - Processing 1 requests.
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG RPCManager - Request #1 (RPCRequest) data: {
                              appID:"builtin",
                              className:"builtin",
                              methodName:"xmlToJS",
                              arguments:[
                              "<?xml version=\"1.0\" encoding=\"UTF-16\"?>\n<isomorphicXML xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:isc=\"http://smartclient.com/XSExtensions\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\">\n<SchemaSet schemaNamespace=\"http://localhost:2179/WebSite7/\" qualifyAll=\"true\" serviceNamespace=\"http://localhost:2179/WebSite7/\">\n<schema>\n<XSElement ID=\"HelloWorld\" mustQualify=\"true\">\n<fields>\n</fields>\n</XSElement>\n<XSElement ID=\"HelloWorldResponse\" mustQualify=\"true\">\n<fields>\n<field name=\"HelloWorldResult\" xmlRequired=\"false\" type=\"string\" />\n</fields>\n</XSElement>\n<XSElement ID=\"getdistname\" mustQualify=\"true\">\n<fields>\n</fields>\n</XSElement>\n<XSElement ID=\"getdistnameResponse\" mustQualify=\"true\">\n<fields>\n<field name=\"getdistnameResult\" xmlRequired=\"false\" type=\"getdistnameResult\" />\n</fields>\n</XSElement>\n<XSElement ID=\"getdistnameResult\" mustQualify=\"true\">\n<fields>\n<field name=\"schema\" type=\"schema\" mustQualify=\"true\" xmlRequired=\"true\" />\n</fields>\n</XSElement>\n<XSElement ID=\"GetDistrict_Verified\" mustQualify=\"true\">\n<fields>\n<field name=\"DistrictCode\" xmlRequired=\"false\" type=\"string\" />\n</fields>\n</XSElement>\n<XSElement ID=\"GetDistrict_VerifiedResponse\" mustQualify=\"true\">\n<fields>\n<field name=\"GetDistrict_VerifiedResult\" xmlRequired=\"true\" type=\"int\" />\n</fields>\n</XSElement>\n</schema>\n</SchemaSet>\n<WebService dataURL=\"http://localhost:2179/website7/service.asmx\" serviceNamespace=\"http://localhost:2179/WebSite7/\" soapStyle=\"\">\n<operations>\n<operation name=\"HelloWorld\" soapAction=\"http://localhost:2179/WebSite7/HelloWorld\" inputEncoding=\"literal\" outputEncoding=\"literal\" soapStyle=\"document\" inputMessage=\"HelloWorldSoapIn\" outputMessage=\"HelloWorldSoapOut\">\n</operation>\n<operation name=\"getdistname\" soapAction=\"http://localhost:2179/WebSite7/getdistname\" inputEncoding=\"literal\" outputEncoding=\"literal\" soapStyle=\"document\" inputMessage=\"getdistnameSoapIn\" outputMessage=\"getdistnameSoapOut\">\n</operation>\n<operation name=\"GetDistrict_Verified\" soapAction=\"http://localhost:2179/WebSite7/GetDistrict_Verified\" inputEncoding=\"literal\" outputEncoding=\"literal\" soapStyle=\"document\" inputMessage=\"GetDistrict_VerifiedSoapIn\" outputMessage=\"GetDistrict_VerifiedSoapOut\">\n</operation>\n</operations>\n<messages>\n<WSDLMessage ID=\"message:HelloWorldSoapIn\">\n<fields>\n<field name=\"HelloWorld\" type=\"HelloWorld\" xmlRequired=\"true\" />\n</fields>\n</WSDLMessage>\n<WSDLMessage ID=\"message:HelloWorldSoapOut\">\n<fields>\n<field name=\"HelloWorldResponse\" type=\"HelloWorldResponse\" xmlRequired=\"true\" />\n</fields>\n</WSDLMessage>\n<WSDLMessage ID=\"message:getdistnameSoapIn\">\n<fields>\n<field name=\"getdistname\" type=\"getdistname\" xmlRequired=\"true\" />\n</fields>\n</WSDLMessage>\n<WSDLMessage ID=\"message:getdistnameSoapOut\">\n<fields>\n<field name=\"getdistnameResponse\" type=\"getdistnameResponse\" xmlRequired=\"true\" />\n</fields>\n</WSDLMessage>\n<WSDLMessage ID=\"message:GetDistrict_VerifiedSoapIn\">\n<fields>\n<field name=\"GetDistrict_Verified\" type=\"GetDistrict_Verified\" xmlRequired=\"true\" />\n</fields>\n</WSDLMessage>\n<WSDLMessage ID=\"message:GetDistrict_VerifiedSoapOut\">\n<fields>\n<field name=\"GetDistrict_VerifiedResponse\" type=\"GetDistrict_VerifiedResponse\" xmlRequired=\"true\" />\n</fields>\n</WSDLMessage>\n</messages>\n</WebService>\n</isomorphicXML>\n"],
                              is_ISC_RPC_DMI:true
                              }
                              === 2007-03-29 15:27:13,015 [sor3] INFO IDACall - Performing 1 operation(s)
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG RPCDMI - appConfig: isc.Application.create({
                              rpcBindings:[
                              {
                              visibleMethods:[
                              {name:"getTimeStamp"}
                              ],
                              className:"com.isomorphic.examples.GetTimeStampDMI",
                              ID:"GetTimeStampDMI"
                              },
                              {
                              visibleMethods:[
                              {name:"downloadWSDL"},
                              {name:"xmlToJS"},
                              {name:"uploadProgressCheck"},
                              {name:"saveFile"},
                              {name:"loadFile"},
                              {name:"loadSharedXML"},
                              {name:"saveSharedXML"},
                              {name:"evalJava"},
                              {name:"getLogNames"},
                              {name:"getLogEntries"}
                              ],
                              className:"com.isomorphic.rpc.BuiltinRPC",
                              ID:"builtin"
                              }
                              ]
                              })

                              === 2007-03-29 15:27:13,015 [sor3] DEBUG Reflection - adaptArgsAndInvoke:

                              public static com.isomorphic.rpc.RPCResponse com.isomorphic.rpc.BuiltinRPC.xmlToJS(java.lang.String) throws java.lang.Exception

                              requiredArgs: [java.lang.String] optionalArgs: [com.isomorphic.servlet.RequestContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession, com.isomorphic.rpc.RPCManager, com.isomorphic.rpc.RPCRequest]
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG Reflection - Adapting type: java.lang.String to type: java.lang.String
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG Reflection - Successfully adapted required arg type: java.lang.String to type: java.lang.String
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG Reflection - method takes: 1 args. I've assembled: 1 args
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG Reflection - invoking method:
                              com.isomorphic.rpc.RPCResponse com.isomorphic.rpc.BuiltinRPC.xmlToJS(java.lang.String) throws java.lang.Exception

                              with arg types: java.lang.String
                              === 2007-03-29 15:27:13,015 [sor3] DEBUG XML - Parsed XML from (in memory stream): 0ms
                              === 2007-03-29 15:27:13,015 [sor3] WARN Validation - No such type 'url', not processing field value at /SchemaSet/schemaNamespace
                              === 2007-03-29 15:27:13,031 [sor3] DEBUG RPCDMI - rpc returned RPCResponse
                              === 2007-03-29 15:27:13,031 [sor3] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                              === 2007-03-29 15:27:19,484 [sor3] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)': MSIE with Accept-Encoding header, ready for compressed JS
                              === 2007-03-29 15:27:20,187 [sor3] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)': MSIE with Accept-Encoding header, ready for compressed JS


                              Please help us with the above problem!! URGENT!!!!!!

                              Comment

                              Working...
                              X