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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -