Hi,
Following your WSDLDataBinding example in the ShowCase I'm trying to consume the web services in our wsdl.
the wsdl is loaded correctly with XMLTools.loadWSDL, but when I click on the button, trying to bind the datasource to the grid, I get a javascript null error.
In the code you'll see this line commented out:
// searchForm.fetchData();
When this line is active, I can see the data correctly fetched from the soap service! (see "searchForm fetch from Dev Console.txt")
Then the problem is the binding with the grid through resultDS. Here is a code excerpt (see attachments).
Thanks in advance.
=====
We are using smartgwt 3.0 power version
Following your WSDLDataBinding example in the ShowCase I'm trying to consume the web services in our wsdl.
the wsdl is loaded correctly with XMLTools.loadWSDL, but when I click on the button, trying to bind the datasource to the grid, I get a javascript null error.
In the code you'll see this line commented out:
// searchForm.fetchData();
When this line is active, I can see the data correctly fetched from the soap service! (see "searchForm fetch from Dev Console.txt")
Then the problem is the binding with the grid through resultDS. Here is a code excerpt (see attachments).
Code:
final String wsdlURL = "http://usdev-o03.dotomi.com:8080/axis2/services/CompanyAdministrationService?wsdl"; final String namespaceURL = "http://Objects.webservice.dotomi.com/xsd"; final String wsOperation = "listAllCompanies"; SC.showPrompt("Loading WSDL from: " + wsdlURL); XMLTools.loadWSDL(wsdlURL, new WSDLLoadCallback() { public void execute(WebService service) { if(service == null) { SC.warn("WSDL not currently available from DOTOMI (tried "+ wsdlURL+ ")", new BooleanCallback() { public void execute(Boolean value) { } }); return; } DataSource inputDS = service.getInputDS(wsOperation); XmlNamespaces ns = new XmlNamespaces(); ns.addNamespace("ax21", namespaceURL); DataSource resultDS = new DataSource(); resultDS.setServiceNamespace(namespaceURL); resultDS.setXmlNamespaces(ns); resultDS.setRecordName("companyList"); OperationBinding opb = new OperationBinding(DSOperationType.FETCH, wsdlURL); opb.setXmlNamespaces(ns); opb.setWsOperation(wsOperation); opb.setRecordName("companyList"); resultDS.setOperationBindings(opb); resultDS.setFields( new DataSourceField("companyID", FieldType.INTEGER), new DataSourceField("companyMagic", FieldType.TEXT), new DataSourceField("companyName", FieldType.TEXT), new DataSourceField("companyStatus", FieldType.INTEGER), new DataSourceField("companyURL", FieldType.TEXT), new DataSourceField("externalID", FieldType.TEXT), new DataSourceField("tier", FieldType.INTEGER) ); VLayout layout = new VLayout(20); layout.setWidth100(); layout.setHeight100(); layout.setLayoutMargin(40); final DynamicForm searchForm = new DynamicForm(); searchForm.setNumCols(7); searchForm.setWidth(500); searchForm.setDataSource(inputDS); // this shows that the data is fetched ok // searchForm.fetchData(); final ListGrid searchResults = new ListGrid(); searchResults.setWidth100(); searchResults.setDataSource(resultDS); IButton searchButton = new IButton("Search"); searchButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { searchResults.fetchData(searchForm.getValuesAsCriteria()); } });
=====
We are using smartgwt 3.0 power version
Comment