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

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -