[JBossWS] - Re: file transfer via SOAP and RPC
by mendret
ok, now I found a relativ good example at
http://jbossws.jboss.org/mediawiki/index.php?title=Security_and_attachmen...
and tried to convert it a bit into real file transfer and not only text, like it is in the example and I tried the following at server side:
| public EditionMTOM doSomething(EditionMTOM data)
| {
| try {
| System.out.println(data.getContent().getContentType());
| InputStream is = data.getContent().getInputStream();
| InputStreamReader isr = new InputStreamReader(is, "UTF-8");
| char[] buff = new char[10];
| isr.read(buff);
| isr.close();
| is.close();
| for (char b : buff) {
| System.out.print(b);
| }
| }
| catch (UnsupportedEncodingException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| catch (IOException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
| EditionMTOM edition = new EditionMTOM();
| edition.setContent(new DataHandler(new FileDataSource("/opt/test2.dat"), "application/octet-stream"));
| edition.setDate(new Date());
| edition.setId("test2.dat");
| return edition;
| }
|
I get some warnings but at all it works until the server tries to send back data, then i get the following exception:
| org.jboss.ws.WSException: No ByteArrayConverter for class: javax.activation.FileDataSource
|
My question is now what can I do to make this work?
I'm grateful for every advise you can give me
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203925#4203925
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203925
17 years, 3 months
[Installation, Configuration & DEPLOYMENT] - Re: both deployment methods fail - WAR and exploded in J5GA
by mattzyzy
Thanks for the quick response.
tried that , but still fails to deploy . and then , the computer freeze, forcing me to reboot , thus no server console log to look for . Afterwards , prior to starting the server script , I deleted the problematic appz.war directory in the deploy, then the server failed to start and crashed (default mode) , with many exceptions in the server console .
FYI, the war file contains all the needed libraries in WEB-INF/lib especially spring and hibernate . but where is the Spring2 and Hibernate3 deployer located by default in jboss? as i search for file name containing spring word in jboss-installation-directory nothing found, then searching after copying war directory to default/deploy only returned the spring jar files inside the appz.war/WEB-INF/lib only....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203924#4203924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203924
17 years, 3 months