Author: thomas.diesler(a)jboss.com
Date: 2006-11-19 07:42:26 -0500 (Sun, 19 Nov 2006)
New Revision: 1465
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java
Log:
layout code
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java 2006-11-19
12:41:46 UTC (rev 1464)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java 2006-11-19
12:42:26 UTC (rev 1465)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxrpc.samples.mtom;
import java.io.IOException;
@@ -42,8 +42,8 @@
*/
public class EmployeeRecordsImpl implements EmployeeRecords
{
- public Status updateEmployee(Employee employee) throws RemoteException {
-
+ public Status updateEmployee(Employee employee) throws RemoteException
+ {
try
{
DataHandler dataHandler = employee.getLegacyData();
@@ -54,12 +54,12 @@
// In that case you might receive an inlined request for
// an MTOM capable endpoint. The example below shows how deal with it.
- if("text/xml".equals(contentType))
+ if ("text/xml".equals(contentType))
{
StreamSource xmlStream = (StreamSource)dataHandler.getContent();
IOUtils.copyStream(System.out, xmlStream.getInputStream());
}
- else if("application/octet-stream".equals(contentType))
+ else if ("application/octet-stream".equals(contentType))
{
IOUtils.copyStream(System.out, dataHandler.getInputStream());
}
@@ -72,11 +72,12 @@
}
}
- public Employee queryEmployee(Query query) throws RemoteException {
+ public Employee queryEmployee(Query query) throws RemoteException
+ {
Employee employee = new Employee();
employee.setFirstname("Peter");
employee.setLastname("Pan");
- employee.setLegacyData( getLegacyData() );
+ employee.setLegacyData(getLegacyData());
return employee;
}
@@ -85,12 +86,7 @@
{
try
{
- return new DataHandler(
- new StreamSource(
- new
ByteArrayInputStream("<Payroll><Data/></Payroll>".getBytes())
- ),
- "application/xml"
- );
+ return new DataHandler(new StreamSource(new
ByteArrayInputStream("<Payroll><Data/></Payroll>".getBytes())),
"application/xml");
}
catch (Exception e)
{