Partial fix for XML references handling
fixed reference counting and memory leak
Fixed WSDL attibute parsing