Author: thomas.diesler(a)jboss.com
Date: 2006-11-19 07:41:46 -0500 (Sun, 19 Nov 2006)
New Revision: 1464
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
Log:
layout code
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2006-11-17
23:36:09 UTC (rev 1463)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2006-11-19
12:41:46 UTC (rev 1464)
@@ -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.BufferedReader;
@@ -89,7 +89,7 @@
Employee employee = new Employee();
employee.setFirstname("Peter");
employee.setLastname("Pan");
- employee.setLegacyData( getLegacyData() );
+ employee.setLegacyData(getLegacyData());
Status status = port.updateEmployee(employee);
assertEquals("OK", status.getCode());
@@ -110,29 +110,16 @@
StreamSource xmlStream = (StreamSource)employee.getLegacyData().getContent();
String content = new BufferedReader(new
InputStreamReader(xmlStream.getInputStream())).readLine();
- assertEquals("<Payroll><Data/></Payroll>", content);
+ assertEquals("<Payroll><Data/></Payroll>", content);
}
private DataHandler getLegacyData()
{
- try
- {
- return new DataHandler(
- new StreamSource(
- new
ByteArrayInputStream("<Payroll><Data/></Payroll>".getBytes())
- ),
- "application/xml"
- );
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
+ return new DataHandler(new StreamSource(new
ByteArrayInputStream("<Payroll><Data/></Payroll>".getBytes())),
"application/xml");
}
private void setMTOMEnabled(Boolean b)
{
((Stub)port)._setProperty(StubExt.PROPERTY_MTOM_ENABLED, b);
}
-
}