Entries Tagged 'Glancer Project' ↓
November 7th, 2005 — Glancer Project, PHP
Most of the day went into debugging WSDL problems for Glancer. Returning complex data types can get tricky. Especially for me, since I don’t have the time to get into the details of WSDL/SOAP and XML specs right now. I have seen how quickly WSDL can be generated (well, actually automatically) on .Net and ColdFusion. So I think it’s a big bottleneck not to have it for PHP. Let me put it as the biggest problem!
So of course, there should be some solutions! The Zend Studio WSDL generator did not detect data types for me. And I found WSDL_Gen. Got that and figured that it requires PHP 5.1.0 to work! So searched for PHP 5.1.0 on PHP site. But well, it’s still not available to public looks like. Some more Googling got me to http://downloads.php.net/ilia/, from where I could download the latest PHP.
I am still to try WSDL_Gen, but then I found some more ways to generate WSDL on BrainBell. Will check some of that out.
And I found a good list of Common WSDL Errors. I think anybody jumping on to WSDL should read that.
So let me tell you how does Glancer look like now:

This is the registration screen, first tab open. Email is checked before form submission. There is a quick finder that tells you the number of people from the same city as you. Delegate registration form is divided into 4 tabs.
And here’s the login screen with Laszlo debugger window too visible:

BTW, to all people reading this, I invite you to try logging in with a wrong email / password when the app goes live. You will be happy to see what happens
Guess I should hit bed now!
November 7th, 2005 — Glancer Project
Finally! Got the login and registration processes done for Glancer. There is also a “quick finder” feature that tells people how many people have already registered from the same city as theirs or the same occupation as theirs.
Did the backend in PHP. Using Qcodo. Learnt a lot more about PHP’s SOAP implementation today. The only thing that bothers me is the lack of proper WSDL generation. Of course, primarily because of the loosely typed nature of the language itself.
But I am happy we reached this milestone. Want to do the Match Map part in the next few days quickly and then move on to buddy list.
We should have a live version of this up by Tuesday!
November 6th, 2005 — Glancer Project, PHP
I have been trying to work on the registration screen for Glancer today. Learnt a lot of things about web service integration, datasets, iteration and form submission. Haven’t been able to find a clean way to send the form data back to the server using a web service and processing the db insert there. The main problem is because of the checkboxes that allow the user to select areas of interest. All the form fields can be passed to the backend - but if I passed them to a web service, it would be long list of 80 arguments! Passing DataSet did not work - I must be missing something there.
And then I thought… It would be so easy if this was PHP. I could just process all the POST variables, check for the naming convention and insert values in the DB accordingly. Now I am “originally” a PHP guy. We chose Mono for Glancer because we had people who could do C#. I can hack C# code, but am at my best with PHP. So do we switch?
Another thing that fuelled this was Qcodo - a PHP development framework. I generally avoid using frameworks other than our internal code library, but this one looked interesting. Mike has also written a nice article about Code Generation vs. Meta Programming (aka Ruby on Rails, Hibernate, upcoming Zend PHP Framework etc). I also liked the demos they have put up. And especially that this is not a bloated framework.
I am confused right now! PHP or Mono! If I select PHP, it means more work for me! I have enough things to learn in Laszlo already, and we are very late in development! The manager mind says changing technology at this stage is very risky! But the programmer mind says PHP would be easier! And it’s also so easy to create Web services in PHP!
I guess I need to sleep over this! Hopefully the morning will clear the picture!
November 4th, 2005 — Glancer Project, OpenLaszlo
Have been working on web services with Laszlo and I am hitting on some errors! Guess they will be helpful for anybody who’s going to use this.
Background
We are using the SOAP methods for consuming web services. Also using the remotecall tags.
Error 1: ws1.lzx:108: reference to undefined property
WARNING: ws1.lzx:108: reference to undefined property 'checkEmailId'
WARNING: ws1.lzx:108: undefined object does not have a property ‘invoke’
«LzWarning#10| WARNING: ws1.lzx:108: reference to undefined property…» {
file: ws1.lzx
line: 108
message: «LzMessage(46)#12| “reference to undefined property \’checkEmailId\’…»
}
This error comes up when you do not have <remotecall>’s defined for your web service methods. Ensure you have these stubs defined for ALL methods in the web service AND that the parameter counts match. “checkEmailId” is the method I was trying to call here, but there was not remotecall stub defined for it.
Error 2: reference to undefined property ‘message’
WARNING: rpc/rpc.lzx:296: reference to undefined property 'message'
error: «undefined»
«LzWarning#10| WARNING: rpc/rpc.lzx:296: reference to undefined prop…» {
file: rpc/rpc.lzx
line: 296
message: «LzMessage(41)#11| “reference to undefined property \’message\’”»
}
This error occurs when you have a remotecall stub for the method, but the parameters do not match with the web service. Ensure the number of parameters match correctly with the web service.
Error 3: Object hasn’t property
error: SOAP-ERROR: Encoding: object hasn't 'xyz' property
This error occurs when your WSDL specifies a property to be there for the returning object, but the object actually does not have it. You may need to refresh your WSDL or check your webservice code.
Error 4: data source error for soap
error: data source error for soap://soap: SAXException: The markup in the document following the root element must be well-formed.
As the error suggests, the WSDL was not a valid XML document. Most probably this means there was an error in your code that prevented the WSDL from generating. E.g. a parse / syntax error in your webservice file.
Tip
If you have the Debug panel open while you are viewing your LZX file, you can enter some code in the small text box and hit “eval” to execute it. I have found it quite useful. When working with webservices, I use it to reinitialize my webservice after making a few changes on the backend. This way, I do not have to reload the whole LZX file. I do it like this:
canvas.glancerService.init()
I will add more things here as I hit upon more errors
October 24th, 2005 — Glancer Project
We have got the delegate registration process almost done up for Glancer. The things done so far are:
- DB Design
- Splash screen
- Login procedure
- Registration UI
- Webservices for Registration, Login etc
Need to integrate the stuff and push it on the server now!
I hope we get a direct link from Foss.In site for this. Ideally after the registration process, or even better, if Glancer could handle the whole delegate registration process.