Hello I'm trying to load datasource from a webservice but without using server components. The error I get when try to fetch the data is
I've generated .JS file with the developer console and
here's how I'm loading the service:
And this is the .js file for the service.
I noticed that the generated soap messages have no correct namespaces but I don't know how to solve the problem.
This is the schema of the service
and the wsdl....
Code:
<?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns :xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="uiwebserviceapp"> <soapenv:Body> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <faultcode>soapenv:Client</faultcode> <faultstring>Cannot find the dispatch method</faultstring> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
here's how I'm loading the service:
Code:
<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/SmartClient/load_skin.js></SCRIPT> <SCRIPT SRC=uiwebserviceapp.js></SCRIPT> </HEAD><BODY BGCOLOR='#e0e0e0' MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0> <SCRIPT> isc.VLayout.create({ height: "90%", width: "100%", top: 40, membersMargin: 20, layoutMargin: 40, members:[ isc.SearchForm.create({ ID: "searchForm", numCols: 4, width: 500, useFlatFields:true }), isc.Button.create({ click: "searchResults.fetchData(searchForm.getValuesAsCriteria())", title: "Search" }) , isc.ListGrid.create({ ID:"searchResults", showAllRecords:true, useFlatFields:true }) ] }); wsdlLoaded(); function wsdlLoaded() { window.service = isc.WebService.get("uiwebserviceapp"); if (service == null) isc.warn("WSDL not currently available (tried "+wsdlURL+")"); var searchDS = service.getInputDS("getTestDummyData"); searchForm.setDataSource(searchDS); var results = isc.DataSource.create({ serviceNamespace : service.serviceNamespace, wsOperation : "getTestDummyData", recordName : "getTestDummyDataResponse", fields : [ { name:"return" } ] }); searchResults.setDataSource(results); } </SCRIPT> </BODY> </HTML>
Code:
isc.SchemaSet.create({ schemaNamespace:"uiwebserviceapp", qualifyAll:false, schema:[ isc.XSElement.create({ inheritsFrom:"getTestDummyData", fields:{}, ID:"getTestDummyData" }) , isc.XSComplexType.create({ fields:{ arg0:{name:"arg0", type:"int", xmlRequired:true} }, ID:"getTestDummyData" }) , isc.XSElement.create({ inheritsFrom:"getTestDummyDataResponse", fields:{}, ID:"getTestDummyDataResponse" }) , isc.XSComplexType.create({ fields:{ "return":{name:"return", type:"anyType", xmlRequired:false} }, ID:"getTestDummyDataResponse" }) ] }) isc.WebService.create({ dataURL:"http://10.0.0.5:80/uiwebserviceapp/uiwebserviceapp", serviceNamespace:"uiwebserviceapp", soapStyle:"document", operations:[ {inputEncoding:"literal", outputEncoding:"literal", inputMessage:"getTestDummyData", outputMessage:"getTestDummyDataResponse",name:"getTestDummyData", soapAction:""} ], messages:[ isc.WSDLMessage.create({ fields:{ getTestDummyData:{mustQualify:true, name:"getTestDummyData", type:"getTestDummyData", xmlRequired:true} }, ID:"message:getTestDummyData" }) , isc.WSDLMessage.create({ fields:{ getTestDummyDataResponse:{mustQualify:true, name:"getTestDummyDataResponse", type:"getTestDummyDataResponse", xmlRequired:true} }, ID:"message:getTestDummyDataResponse" }) ] })
This is the schema of the service
Code:
<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="uiwebserviceapp" version="1.0"> <xs:element xmlns:ns26="uiwebserviceapp" type="ns26:getTestDummyData" name="getTestDummyData"></xs:element> <xs:complexType name="getTestDummyData"> <xs:sequence> <xs:element type="xs:int" name="arg0"></xs:element> </xs:sequence> </xs:complexType> <xs:element xmlns:ns27="uiwebserviceapp" type="ns27:getTestDummyDataResponse" name="getTestDummyDataResponse"></xs:element> <xs:complexType name="getTestDummyDataResponse"> <xs:sequence> <xs:element type="xs:anyType" minOccurs="0" name="return" maxOccurs="unbounded"></xs:element> </xs:sequence> </xs:complexType> </xs:schema>
Code:
<?xml version="1.0" encoding="UTF-8"?><definitions xmlns:tns="uiwebserviceapp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="uiwebserviceapp" name="UIService"> <types> <xsd:schema> <xsd:import namespace="uiwebserviceapp" schemaLocation="http://10.0.0.5:80/uiwebserviceapp/uiwebserviceapp?xsd=1"></xsd:import> </xsd:schema> </types> <message name="getTestDummyData"> <part element="tns:getTestDummyData" name="parameters"></part> </message> <message name="getTestDummyDataResponse"> <part element="tns:getTestDummyDataResponse" name="parameters"></part> </message> <portType name="UIServiceWS"> <operation name="getTestDummyData"> <input message="tns:getTestDummyData"></input> <output message="tns:getTestDummyDataResponse"></output> </operation> </portType> <binding type="tns:UIServiceWS" name="UIServiceWSPortBinding"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding> <operation name="getTestDummyData"> <soap:operation soapAction=""></soap:operation> <input> <soap:body use="literal"></soap:body> </input> <output> <soap:body use="literal"></soap:body> </output> </operation> </binding> <service name="UIService"> <port binding="tns:UIServiceWSPortBinding" name="UIServiceWSPort"> <soap:address location="http://10.0.0.5:80/uiwebserviceapp/uiwebserviceapp"></soap:address> </port> </service> </definitions>
Comment