Hi there,
I'm a newbie to SmartGWT and trying to get one of the example from showcase to work with my test web service hosted with Tomcat5 + Axis2. Browser is Firefox 18.0. The SmartGWT version is 3.1. Many thanks for all of you and any help would be very appreciated.
Pass value 1 into the getTreeChildren method should return a list of TreeNode objects. I've done a unit test in .net and it works ok. In the developer console, I can see smartgwt managed to call the service and get response xml file back ok. However, it find 0 TreeNode elements (found 10 objects in .net test). I've attached the console log at the end of this thread.
Also a warning has been displayed in the console as follows.
17:10:04.775 [ERROR] [connectonline] 17:10:04.758:XRP2:WARN:Log:'undefined' is not a valid JavaScript identifier. DataSource and DataBoundComponent field names are required to be valid JavaScript identifiers, the syntax for which is specified by ECMA-262 Section 7.6. Note: The String.isValidID(string) function can be used to test whether a string is a valid identifier. This field applied to [XSElement ID:getTreeChildrenResponse]. This will be the last warning.
I believe this might because there is name="return" field in my wsdl. The warning has gone away once I change the name to something else. However, the service seems been broken after I changed the name and I couldn't get objects in my .net unit test after I changed the wsdl.
The testing service wsdl is http://interconnecttestcloud.net:8080/axis2/services/IRRIADataProvider?wsdl
My source code is as follows.
final Canvas canvas = new Canvas();
canvas.setWidth100();
canvas.setHeight100();
final String wsdlURL = "http://interconnecttestcloud.net:8080/axis2/services/IRRIADataProvider?wsdl";
final String namespaceURL = "http://ria.service.dataexchange.model.simplypos.co";
SC.showPrompt("Loading WSDL from: " + wsdlURL);
final String wsOperation = "getTreeChildren";
XMLTools.loadWSDL(wsdlURL, new WSDLLoadCallback() {
public void execute(WebService service) {
if(service == null) {
SC.warn("WSDL not currently available", new BooleanCallback() {
public void execute(Boolean value) {
}
});
return;
}
DataSource inputDS = service.getInputDS(wsOperation);
XmlNamespaces ns = new XmlNamespaces();
ns.addNamespace("ns", namespaceURL);
DataSource resultDS = new DataSource();
resultDS.setID("TreeChildren");
resultDS.setServiceNamespace(namespaceURL);
resultDS.setXmlNamespaces(ns);
resultDS.setRecordName("TreeNode");
OperationBinding opb = new OperationBinding(DSOperationType.FETCH, wsdlURL);
opb.setXmlNamespaces(ns);
opb.setWsOperation(wsOperation);
opb.setRecordName("TreeNode");
resultDS.setOperationBindings(opb);
DataSourceField field=new DataSourceField("description", FieldType.TEXT);
DataSourceField field2=new DataSourceField("vendorArticleId", FieldType.INTEGER);
field2.setPrimaryKey(true);
resultDS.setFields(field,field2);
VLayout layout = new VLayout(20);
layout.setWidth100();
layout.setHeight100();
layout.setLayoutMargin(40);
final DynamicForm searchForm = new DynamicForm();
searchForm.setNumCols(4);
searchForm.setWidth(500);
searchForm.setDataSource(inputDS);
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());
}
});
layout.addMember(searchForm);
layout.addMember(searchButton);
layout.addMember(searchResults);
canvas.addChild(layout);
SC.clearPrompt();
}
});
canvas.draw();
And the console log is:
17:42:26.234:INFO:Log:initialized
17:42:26.532:WARN:Log:New Class ID: 'DataView' collides with ID of existing object with value 'function DataView() {
[native code]
}'. Existing object will be replaced.
This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
17:42:31.439:INFO:Log:isc.Page is loaded
17:42:31.680:XRP3:WARN:Log:'return' is not a valid JavaScript identifier. DataSource and DataBoundComponent field names are required to be valid JavaScript identifiers, the syntax for which is specified by ECMA-262 Section 7.6. Note: The String.isValidID(string) function can be used to test whether a string is a valid identifier. This field applied to [XSElement ID:getTreeChildrenResponse]. This will be the last warning.
Global Log Priorities updated: Logging messages at priority 'Debug' and above for category 'xmlBinding'.
Global Log Priorities updated: Logging messages at priority 'Debug' and above for category 'ResultSet'.
17:42:52.263:MUP3:INFO:ResultSet:isc_ListGrid_0:Creating new isc.ResultSet for operation 'TreeChildren_fetch' with filterValues: {
"vendorArticleId":"1"
}
17:42:52.268:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):setCriteria: filter criteria changed, invalidating cache
17:42:52.268:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):Invalidating cache
17:42:52.278:MUP3:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange(0,47), cache check: 0,60 firstMissingRow: 0 lastMissingRow: 60
17:42:52.278:MUP3:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange: guessing forward scrolling
17:42:52.278:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange(0, 47) will fetch from 0 to 75
17:42:52.278:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):fetching rows 0,75 from server
17:42:52.282:MUP3:INFO:xmlBinding:TreeChildren:web service: [WebService ns="http://ria.service.dataexchange.model.si..."[50] location=IRRIADataProvider?wsdl], wsOperation: Obj{name:getTreeChildren}
17:42:52.286:MUP3:DEBUG:xmlBinding:TreeChildren:XML post requestBody is: <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header></soap:Header>
<soap:Body
xmlns:ns="http://ria.service.dataexchange.model.simplypos.co">
<ns:getTreeChildren>
<ns:vendorArticleId>1</ns:vendorArticleId>
</ns:getTreeChildren>
</soap:Body>
</soap:Envelope>
17:42:52.286:MUP3:DEBUG:xmlBinding:TreeChildren:serviceInputs are: {actionURL: "http://interconnecttestcloud.net:8080/ax..."[75],
httpMethod: "POST",
data: "<soap:Envelope xmlns:soap='http://schema..."[469],
contentType: "text/xml",
httpHeaders: Obj}
17:42:52.305:TMR7:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange(0, 47) satisfied from cache
17:42:52.835:XRP2:DEBUG:xmlBinding:selecting type: '[XSComplexType ID:TreeNode]' within message 'getTreeChildrenResponse via XPath: //ns0:return using ns0: http://ria.service.dataexchange.model.simplypos.co/xsd got 0 elements
17:42:52.837:XRP2:INFO:xmlBinding:TreeChildren:dsResponse is: {data: Array[0],
startRow: 0,
status: 0,
endRow: 0,
totalRows: 0,
httpResponseCode: 200,
transactionNum: 2,
clientContext: Obj,
httpHeaders: Obj}
17:42:52.839:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):Received 0 records from server
17:42:52.839:XRP2:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):full length set to: 0
17:42:52.839:XRP2:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):integrating 0 rows into cache at position 0
17:42:52.839:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):cached 0 rows, from 0 to 0 (0 total rows, 0 cached)
17:42:52.839:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):Cache for current criteria complete
I'm a newbie to SmartGWT and trying to get one of the example from showcase to work with my test web service hosted with Tomcat5 + Axis2. Browser is Firefox 18.0. The SmartGWT version is 3.1. Many thanks for all of you and any help would be very appreciated.
Pass value 1 into the getTreeChildren method should return a list of TreeNode objects. I've done a unit test in .net and it works ok. In the developer console, I can see smartgwt managed to call the service and get response xml file back ok. However, it find 0 TreeNode elements (found 10 objects in .net test). I've attached the console log at the end of this thread.
Also a warning has been displayed in the console as follows.
17:10:04.775 [ERROR] [connectonline] 17:10:04.758:XRP2:WARN:Log:'undefined' is not a valid JavaScript identifier. DataSource and DataBoundComponent field names are required to be valid JavaScript identifiers, the syntax for which is specified by ECMA-262 Section 7.6. Note: The String.isValidID(string) function can be used to test whether a string is a valid identifier. This field applied to [XSElement ID:getTreeChildrenResponse]. This will be the last warning.
I believe this might because there is name="return" field in my wsdl. The warning has gone away once I change the name to something else. However, the service seems been broken after I changed the name and I couldn't get objects in my .net unit test after I changed the wsdl.
The testing service wsdl is http://interconnecttestcloud.net:8080/axis2/services/IRRIADataProvider?wsdl
My source code is as follows.
final Canvas canvas = new Canvas();
canvas.setWidth100();
canvas.setHeight100();
final String wsdlURL = "http://interconnecttestcloud.net:8080/axis2/services/IRRIADataProvider?wsdl";
final String namespaceURL = "http://ria.service.dataexchange.model.simplypos.co";
SC.showPrompt("Loading WSDL from: " + wsdlURL);
final String wsOperation = "getTreeChildren";
XMLTools.loadWSDL(wsdlURL, new WSDLLoadCallback() {
public void execute(WebService service) {
if(service == null) {
SC.warn("WSDL not currently available", new BooleanCallback() {
public void execute(Boolean value) {
}
});
return;
}
DataSource inputDS = service.getInputDS(wsOperation);
XmlNamespaces ns = new XmlNamespaces();
ns.addNamespace("ns", namespaceURL);
DataSource resultDS = new DataSource();
resultDS.setID("TreeChildren");
resultDS.setServiceNamespace(namespaceURL);
resultDS.setXmlNamespaces(ns);
resultDS.setRecordName("TreeNode");
OperationBinding opb = new OperationBinding(DSOperationType.FETCH, wsdlURL);
opb.setXmlNamespaces(ns);
opb.setWsOperation(wsOperation);
opb.setRecordName("TreeNode");
resultDS.setOperationBindings(opb);
DataSourceField field=new DataSourceField("description", FieldType.TEXT);
DataSourceField field2=new DataSourceField("vendorArticleId", FieldType.INTEGER);
field2.setPrimaryKey(true);
resultDS.setFields(field,field2);
VLayout layout = new VLayout(20);
layout.setWidth100();
layout.setHeight100();
layout.setLayoutMargin(40);
final DynamicForm searchForm = new DynamicForm();
searchForm.setNumCols(4);
searchForm.setWidth(500);
searchForm.setDataSource(inputDS);
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());
}
});
layout.addMember(searchForm);
layout.addMember(searchButton);
layout.addMember(searchResults);
canvas.addChild(layout);
SC.clearPrompt();
}
});
canvas.draw();
And the console log is:
17:42:26.234:INFO:Log:initialized
17:42:26.532:WARN:Log:New Class ID: 'DataView' collides with ID of existing object with value 'function DataView() {
[native code]
}'. Existing object will be replaced.
This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
17:42:31.439:INFO:Log:isc.Page is loaded
17:42:31.680:XRP3:WARN:Log:'return' is not a valid JavaScript identifier. DataSource and DataBoundComponent field names are required to be valid JavaScript identifiers, the syntax for which is specified by ECMA-262 Section 7.6. Note: The String.isValidID(string) function can be used to test whether a string is a valid identifier. This field applied to [XSElement ID:getTreeChildrenResponse]. This will be the last warning.
Global Log Priorities updated: Logging messages at priority 'Debug' and above for category 'xmlBinding'.
Global Log Priorities updated: Logging messages at priority 'Debug' and above for category 'ResultSet'.
17:42:52.263:MUP3:INFO:ResultSet:isc_ListGrid_0:Creating new isc.ResultSet for operation 'TreeChildren_fetch' with filterValues: {
"vendorArticleId":"1"
}
17:42:52.268:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):setCriteria: filter criteria changed, invalidating cache
17:42:52.268:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):Invalidating cache
17:42:52.278:MUP3:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange(0,47), cache check: 0,60 firstMissingRow: 0 lastMissingRow: 60
17:42:52.278:MUP3:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange: guessing forward scrolling
17:42:52.278:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange(0, 47) will fetch from 0 to 75
17:42:52.278:MUP3:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):fetching rows 0,75 from server
17:42:52.282:MUP3:INFO:xmlBinding:TreeChildren:web service: [WebService ns="http://ria.service.dataexchange.model.si..."[50] location=IRRIADataProvider?wsdl], wsOperation: Obj{name:getTreeChildren}
17:42:52.286:MUP3:DEBUG:xmlBinding:TreeChildren:XML post requestBody is: <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header></soap:Header>
<soap:Body
xmlns:ns="http://ria.service.dataexchange.model.simplypos.co">
<ns:getTreeChildren>
<ns:vendorArticleId>1</ns:vendorArticleId>
</ns:getTreeChildren>
</soap:Body>
</soap:Envelope>
17:42:52.286:MUP3:DEBUG:xmlBinding:TreeChildren:serviceInputs are: {actionURL: "http://interconnecttestcloud.net:8080/ax..."[75],
httpMethod: "POST",
data: "<soap:Envelope xmlns:soap='http://schema..."[469],
contentType: "text/xml",
httpHeaders: Obj}
17:42:52.305:TMR7:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):getRange(0, 47) satisfied from cache
17:42:52.835:XRP2:DEBUG:xmlBinding:selecting type: '[XSComplexType ID:TreeNode]' within message 'getTreeChildrenResponse via XPath: //ns0:return using ns0: http://ria.service.dataexchange.model.simplypos.co/xsd got 0 elements
17:42:52.837:XRP2:INFO:xmlBinding:TreeChildren:dsResponse is: {data: Array[0],
startRow: 0,
status: 0,
endRow: 0,
totalRows: 0,
httpResponseCode: 200,
transactionNum: 2,
clientContext: Obj,
httpHeaders: Obj}
17:42:52.839:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):Received 0 records from server
17:42:52.839:XRP2:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):full length set to: 0
17:42:52.839:XRP2:DEBUG:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):integrating 0 rows into cache at position 0
17:42:52.839:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):cached 0 rows, from 0 to 0 (0 total rows, 0 cached)
17:42:52.839:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: isc_ListGrid_0):Cache for current criteria complete
Comment