unmarshalling - java unmarshall different types -
unmarshalling - java unmarshall different types -
i'm using unmarshall method in java, want utilize different types in method. how can prepare this. utilize url or local xml-file.
file:
public list<order> readorders() throws jaxbexception { jaxbcontext jc = jaxbcontext.newinstance(orderconfig.class); orderconfig orderconfig = (orderconfig) jc.createunmarshaller().unmarshal( orderconfigreader.class.getresource("//filename")); homecoming orderconfig.getitems(); }
url:
public list<order> readorders() throws jaxbexception { jaxbcontext jc = jaxbcontext.newinstance(orderconfig.class); orderconfig orderconfig = (orderconfig) jc.createunmarshaller().unmarshal( orderconfigreader.class.getresource(new url("http://link.here")); homecoming orderconfig.getitems(); }
java unmarshalling
Comments
Post a Comment