public class RMSXmlUtility {
public interface ReferralDetailReaderWriter extends XmlReaderWriter {}
public static final ReferralDetailReaderWriter READER_WRITER_REFERRAL_DETAIL = GWT.create(ReferralDetailReaderWriter.class);
public interface ReferralLabelReaderWriter extends XmlReaderWriter<ReferralLabel> {}
public static final ReferralLabelReaderWriter READER_WRITER_REFERRAL_LABEL = GWT.create(ReferralLabelReaderWriter.class);
public static ReferralDetail getReferralDetail(String xml) {
ReferralDetail detail = null;
try {
Document doc = new XmlParser().parse(xml);
detail = READER_WRITER_REFERRAL_DETAIL.getXmlReader().read(doc);
doc = null;
}catch(Exception e) {
GWT.log(e.getLocalizedMessage());
}
return detail;
}
public static String toXmlFromReferralDetail(ReferralDetail detail) {
String data = null;
try {
data = READER_WRITER_REFERRAL_DETAIL.getXmlWriter().toXml(detail,"detail");
}catch(Exception e) {
GWT.log(e.getLocalizedMessage());
}
return data;
}
}
*/
When I run the GWT Compiler I ger the following
Here is the error
Compiling module x.x.x.x.RMS
Computing all possible rebind results for 'name.pehl.piriti.xml.client.XmlWriter'
Rebinding name.pehl.piriti.xml.client.XmlWriter
Invoking generator name.pehl.piriti.rebind.xml.XmlWriterGenerator
[ERROR] You must use a subtype of XmlWriter in GWT.create(). E.g.,
interface ModelReader extends XmlWriter {}
ModelReader reader = GWT.create(ModelReader.class);
[ERROR] Errors in 'gen/x/x/apps/rms/client/ui/utility/RMSXmlUtility_ReferralDetailReaderWriterImpl_RMSXmlUtility_ReferralDetailReaderWriterImplXmlWriterImpl.java'
[ERROR] Line 766: Failed to resolve 'name.pehl.piriti.xml.client.XmlWriter' via deferred binding
Computing all possible rebind results for 'name.pehl.piriti.xml.client.XmlWriter'
Rebinding name.pehl.piriti.xml.client.XmlWriter
Invoking generator name.pehl.piriti.rebind.xml.XmlWriterGenerator
[ERROR] You must use a subtype of XmlWriter in GWT.create(). E.g.,
interface ModelReader extends XmlWriter {}
ModelReader reader = GWT.create(ModelReader.class);
[ERROR] Errors in 'gen/x/x/apps/rms/client/ui/utility/RMSXmlUtility_ReferralDetailReaderWriterImpl_RMSXmlUtility_ReferralDetailReaderWriterImplXmlWriterImpl.java'
[ERROR] Line 818: Failed to resolve 'name.pehl.piriti.xml.client.XmlWriter' via deferred binding
Computing all possible rebind results for 'name.pehl.piriti.xml.client.XmlWriter'
Rebinding name.pehl.piriti.xml.client.XmlWriter
Invoking generator name.pehl.piriti.rebind.xml.XmlWriterGenerator
[ERROR] You must use a subtype of XmlWriter in GWT.create(). E.g.,
interface ModelReader extends XmlWriter {}
I have the following envrioment GWT 2.5.1 Piriti 0.10 GWT module has the configured
I have all required libs included on my classpath
I traced it down to when I call read or toXml. if i comment these lines, the program compiles..
data = READER_WRITER_REFERRAL_DETAIL.getXmlWriter().toXml(detail,"detail"); and detail = READER_WRITER_REFERRAL_DETAIL.getXmlReader().read(doc);
any ideas on how to correct this?
Here is the full source /**
import name.pehl.piriti.xml.client.XmlReaderWriter; import name.pehl.totoe.xml.client.Document; import name.pehl.totoe.xml.client.XmlParser;
import com.google.gwt.core.shared.GWT; import x.x.x.x.ReferralDetail; import x.x.x.x.ReferralLabel;
public class RMSXmlUtility { public interface ReferralDetailReaderWriter extends XmlReaderWriter {}
public static final ReferralDetailReaderWriter READER_WRITER_REFERRAL_DETAIL = GWT.create(ReferralDetailReaderWriter.class);
}
*/
When I run the GWT Compiler I ger the following
Here is the error
Compiling module x.x.x.x.RMS
Computing all possible rebind results for 'name.pehl.piriti.xml.client.XmlWriter' Rebinding name.pehl.piriti.xml.client.XmlWriter Invoking generator name.pehl.piriti.rebind.xml.XmlWriterGenerator [ERROR] You must use a subtype of XmlWriter in GWT.create(). E.g., interface ModelReader extends XmlWriter {}
ModelReader reader = GWT.create(ModelReader.class);
[ERROR] Errors in 'gen/x/x/apps/rms/client/ui/utility/RMSXmlUtility_ReferralDetailReaderWriterImpl_RMSXmlUtility_ReferralDetailReaderWriterImplXmlWriterImpl.java'
[ERROR] Line 766: Failed to resolve 'name.pehl.piriti.xml.client.XmlWriter' via deferred binding
Computing all possible rebind results for 'name.pehl.piriti.xml.client.XmlWriter'
Rebinding name.pehl.piriti.xml.client.XmlWriter
Invoking generator name.pehl.piriti.rebind.xml.XmlWriterGenerator
[ERROR] You must use a subtype of XmlWriter in GWT.create(). E.g.,
interface ModelReader extends XmlWriter {}
ModelReader reader = GWT.create(ModelReader.class);
[ERROR] Errors in 'gen/x/x/apps/rms/client/ui/utility/RMSXmlUtility_ReferralDetailReaderWriterImpl_RMSXmlUtility_ReferralDetailReaderWriterImplXmlWriterImpl.java'
[ERROR] Line 818: Failed to resolve 'name.pehl.piriti.xml.client.XmlWriter' via deferred binding
Computing all possible rebind results for 'name.pehl.piriti.xml.client.XmlWriter'
Rebinding name.pehl.piriti.xml.client.XmlWriter
Invoking generator name.pehl.piriti.rebind.xml.XmlWriterGenerator
[ERROR] You must use a subtype of XmlWriter in GWT.create(). E.g.,
interface ModelReader extends XmlWriter {}