Announcement

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

    Code works in SC7.0, but not in SC8.0

    Can someone help me with the upgrade to the version of SmartClient 8.0? I experience problems with the code, which works for the SmartClient 7.0rc2.

    When calling the method get_vendor_list, there is the error message from smartclient 8.0:
    "headerData passed for SOAP header partName: auth_info, no schema available, not outputting"

    Code:
    <& /localz/localize.comp:.load, files=>['globals.xml', 'main.xml'], lang=>$ph->{language} &>
    <&| /localz/localize.comp &>
    <head>
    	<SCRIPT>var isomorphicDir="../isomorphic8/";</SCRIPT>
    	<SCRIPT SRC="../isomorphic8/system/modules/ISC_Core.js"></SCRIPT>
    	<SCRIPT SRC="../isomorphic8/system/modules/ISC_Foundation.js"></SCRIPT>
    	<SCRIPT SRC="../isomorphic8/system/modules/ISC_Containers.js"></SCRIPT>
    	<SCRIPT SRC="../isomorphic8/system/modules/ISC_Grids.js"></SCRIPT>
    	<SCRIPT SRC="../isomorphic8/system/modules/ISC_Forms.js"></SCRIPT>
    	<SCRIPT SRC="../isomorphic8/system/modules/ISC_DataBinding.js"></SCRIPT>
    	<SCRIPT SRC="../isomorphic8/skins/fleet/load_skin.js"></SCRIPT>
    	<SCRIPT SRC="../isomorphic8/system/development/ISC_FileLoader.js?isc_version=7.0RC.js"></SCRIPT>
    </head>
    <body>
    <& /top-table.html, ScreenName => 'Call Monitor', ph => $ph, ScreenNameParams => { name => $m->scomp('/core.mcomp:.longname') } &>
    <script>
    isc.RPCManager.useHttpProxy = false;
    isc.showPrompt("Loading Call Monitor...");
    isc.defineClass("CallMon").addProperties({
    	services: { Customer: null, Callmon: null }
    ,	detailGrids: []
    ,	session_id: undefined
    ,	init: function() {
    		isc.XMLTools.loadXMLSchema("<% $https_url %>wsdl/Types.xsd",{ target: this, methodName: "wsdlCB" });
    		isc.XMLTools.loadXMLSchema("<% $https_url %>wsdl/Types_ls.xsd");
    	}
    ,	wsdlCB: function() {
    		if (this.loading) {
    			this.services[this.loading] = isc.WebService.get("http://portaone.com/soap/"+this.loading);
    			if (this.services[this.loading] == null) {
    				isc.showPrompt("Failed to load service ("+this.loading+")!");
    				return;
    			}
    		}
    		for (this.loading in this.services) {
    			if (this.services[this.loading] == null) {
    				isc.XMLTools.loadWSDL("<% $https_url %>wsdl/"+this.loading+"AdminService.wsdl",{ target: this, methodName: "wsdlCB" });
    				return;
    			}
    		}
    		this.session_id = unescape(document.cookie.match("(^| )SID=([^;]*)")[2]);
    		this.console_show();
    		isc.clearPrompt();
    	}
    ,	console_show: function() {
    		var _this = this;
    		for (service in this.services) {
    			this.services[service].getHeaderData = function(_) { return { auth_info: { session_id: _this.session_id } }; };
    		};
    		isc.DataSource.create({
    			id: "vendorList",
    			serviceNamespace: "http://portaone.com/soap/Callmon",
    			dataURL: "<% $https_url %>soap/",
    			dataProtocol: "soap",
    			fields: [
    				{name: "i_vendor", primaryKey: true},
    				{name: "name"}
    			],
    			operationBindings: [
    				{ operationType: "fetch", wsOperation: "get_vendor_list", recordName: "VendorInfo", requestProperties: {httpMethod: "POST"}, recordXPath: "//srv:item", xmlNamespaces: {srv: "<% $http_url %>Porta/SOAP/Callmon"}}
    			]
    		});
    
    		isc.HLayout.create({
    			height: "100%"
    		,	width: "100%"
    		,	members: [
    				isc.VLayout.create({
    					width: "20%", height: "100%"
    				,	membersMargin: 20
    				,	members: [
    						isc.ListGrid.create({
    							canPickFields: false
    						,	showAllRecords: true
    						,	autoFetchData: true
    						,	dataProperties: { fetchMode:"local" }
    						,	selectionAppearance:"checkbox"
    						,	selectionType: "simple"
    						,	sortFieldNum: 0
    						,	dataSource: vendorList
    						,	fields: [
    								{name:"name", title:"Name"}
    							,	{name:"i_vendor", showIf:"false", width: 55}
    							]
    						})
    					]
    				})
    			]
    		});
    	}
    });
    
    var callmon = isc.CallMon.create();
    
    </script>
    </body>
    </&>
    <%args>
    	$ph
    	$no_pass_change_alert => undef
    </%args>
    <%init>
    	use CGI;
    	my $cgi = new CGI;
    	my $https_url = $cgi->url(-base => 1)."/";
    	my $http_url = $https_url;
    	$http_url =~ s/^https:/http:/;
    </%init>
    Here are the links to the files:
    CustomerAdminService.wsdl
    Types.xsd

    Please let me know if you need any additional information.

    #2
    Have you tried using the name of the type of the (HeaderRequest) rather than the name of the part as such?

    Comment


      #3
      Originally posted by Isomorphic
      Have you tried using the name of the type of the (HeaderRequest) rather than the name of the part as such?
      I do not fully understand what should I try. Can you give me a tip?

      Comment


        #4
        Use HeaderRequest in place of part_info where you are supplying SOAP header data.

        Comment


          #5
          I am sorry, but I haven't found any mention about 'HeaderRequest' in the documentation or on the forum. Where I can take a look on the example?

          Seems I'm totally misunderstanding you.

          Comment


            #6
            Originally posted by Isomorphic
            Use HeaderRequest in place of part_info where you are supplying SOAP header data.
            Any sample, please?

            Comment


              #7
              I still cannot get what should be done for tests.

              Comment

              Working...
              X