Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 90472 invoked from network); 17 Aug 2006 11:57:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Aug 2006 11:57:07 -0000 Received: (qmail 97283 invoked by uid 500); 17 Aug 2006 11:57:00 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 96345 invoked by uid 500); 17 Aug 2006 11:56:58 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 96334 invoked by uid 99); 17 Aug 2006 11:56:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Aug 2006 04:56:58 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=UNPARSEABLE_RELAY,X_PRIORITY_HIGH X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.42.11.6] (HELO hma-corp.com) (12.42.11.6) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Aug 2006 04:56:56 -0700 Received: from ([170.254.98.22]) by ironmail.hma-corp.com with ESMTP id KP-CAW86.61842519; Thu, 17 Aug 2006 07:56:15 -0400 Received: by hma-exch.hma.com with Internet Mail Service (5.5.2657.72) id ; Thu, 17 Aug 2006 07:55:22 -0400 Message-ID: From: "Pader, Erwin" To: "'axis-user@ws.apache.org'" Subject: RE: need help with service design issue (more info) Date: Thu, 17 Aug 2006 07:55:16 -0400 Importance: high X-Priority: 1 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thilina, thanks for the suggestion. i tried fireandforget (client code below) but it looks like it did not go over the wire. also, i changed the message receiver class to RawXMLINOnlyMessageReceiver for good measure. i checked to see the server log and nothing was out there. i am using the 8/16 nightly build btw. thanks. OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my"); OMElement method = fac.createOMElement("mtomService", omNs); OMElement coid = fac.createOMElement("coid", omNs); OMElement medRec = fac.createOMElement("medrec", omNs); OMElement patAcct = fac.createOMElement("patacct", omNs); coid.setText("803"); medRec.setText("0009039819"); patAcct.setText("4020233"); method.addChild(coid); method.addChild(medRec); method.addChild(patAcct); fileName = fac.createOMElement("fileName", omNs); file = fac.createOMElement("file", omNs); inputFile = new File("c:\\icd9.txt"); fileName.setText(inputFile.getName()); expectedDH = new DataHandler(new FileDataSource(inputFile)); textData = fac.createOMText(expectedDH, true); file.addChild(textData); method.addChild(fileName); method.addChild(file); Options options = new Options(); options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setTo(targetEPR); // enabling MTOM in the client side options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setAction("urn:mtomService"); ServiceClient sender = new ServiceClient(); sender.setOptions(options); sender.fireAndForget(method); -----Original Message----- From: Pader, Erwin Sent: Wednesday, August 16, 2006 12:49 PM To: 'axis-user@ws.apache.org' Subject: RE: need help with service design issue (more info) Importance: High i just modified the code (see below) so that instead of passing the OMElement to the ftp thread, i will just be passing the datahandler. however, it is precisely in the data handler where the bottleneck occurs which renders this solution useless. public OMElement mtomService(OMElement element) throws Exception { //ThreadedFTPService goFTP = new ThreadedFTPService(element); //goFTP.start(); OMElement _fileNameEle = null; OMElement _fileElement = null; for (Iterator _iterator = element.getChildElements(); _iterator.hasNext();) { OMElement _ele = (OMElement) _iterator.next(); System.out.println("element: " + _ele.getLocalName()); if (_ele.getLocalName().equalsIgnoreCase("fileName")) { _fileNameEle = _ele; continue; } if (_ele.getLocalName().equalsIgnoreCase("file")) { _fileElement = _ele; if (_fileNameEle == null || _fileElement == null ) { try { throw new AxisFault("Either Image or FileName is null"); } catch (AxisFault e) { e.printStackTrace(); } } String fileName = _fileNameEle.getText(); _fileElement.build(); _fileElement.buildNext(); _fileElement.detach(); OMText binaryNode = (OMText) _fileElement.getFirstOMChild(); SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss"); System.out.println("start time: " + timeFormat.format(new Date())); DataHandler actualDH = (DataHandler) binaryNode.getDataHandler(); System.out.println("end time: " + timeFormat.format(new Date())); ThreadedFTPService goFTP = new ThreadedFTPService(fileName, actualDH); goFTP.start(); } } OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns = fac.createOMNamespace("urn://fakenamespace", "ns"); OMElement ele = fac.createOMElement("response", ns); ele.setText("File Saved"); return ele; } -----Original Message----- From: Pader, Erwin [mailto:Erwin.Pader@hma.org] Sent: Wednesday, August 16, 2006 12:01 PM To: axis-user@ws.apache.org Subject: need help with service design issue Hi All, we are planning to use axis2 to send hospital patient info using mtom (including scanned images, pdf docs, etc) to a service. this service will then start a new thread whose only function is to ftp the binary attachment to an external system. the service passes the whole OMElement to the ftp thread. the problem is it looks like the new thread closes or resets the socket connection to the binary attachment causing an exception. if i do not start a new thread my service will be tied up as it tries to readin in the attachment (DataHandler actualDH = (DataHandler) binaryNode.getDataHandler();). a 10 mb files takes 20 secs for my service to get the data handler. i need all your help please for a better solution to this. thanks! Erwin Pader HMA, Inc. Naples FL --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org