Author: thomas.diesler(a)jboss.com
Date: 2006-11-22 08:09:51 -0500 (Wed, 22 Nov 2006)
New Revision: 1499
Removed:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPElementRPCTestCase.java
Modified:
trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
trunk/src/test/resources/jaxrpc/marshall-rpclit/META-INF/jboss-client.xml
trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/web.xml
Log:
Log jbossws version
Modified: trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java 2006-11-22
12:42:47 UTC (rev 1498)
+++ trunk/src/main/java/org/jboss/ws/server/ServiceEndpointManager.java 2006-11-22
13:09:51 UTC (rev 1499)
@@ -611,7 +611,7 @@
public void create() throws Exception
{
- log.info("WebServices: " + UnifiedMetaData.getImplementationVersion());
+ log.info(UnifiedMetaData.getImplementationVersion());
MBeanServer server = getJMXServer();
if (server != null)
{
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java 2006-11-22
12:42:47 UTC (rev 1498)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java 2006-11-22
13:09:51 UTC (rev 1499)
@@ -303,8 +303,8 @@
{
Call call = service.createCall();
call.setOperationName(new QName(TARGET_NAMESPACE, "base64BinaryTest"));
- call.addParameter("arrayOfbyte_1", Constants.TYPE_LITERAL_BASE64BINARY,
primParams.getClass(), ParameterMode.IN);
- call.setReturnType(Constants.TYPE_LITERAL_BASE64BINARY, primParams.getClass());
+ call.addParameter("arrayOfbyte_1", Constants.TYPE_LITERAL_BASE64BINARY,
byte[].class, ParameterMode.IN);
+ call.setReturnType(Constants.TYPE_LITERAL_BASE64BINARY, byte[].class);
call.setTargetEndpointAddress(TARGET_ADDRESS);
primParams = (byte[])call.invoke(new Object[] { primParams });
return primParams;
@@ -314,8 +314,8 @@
{
Call call = service.createCall();
call.setOperationName(new QName(TARGET_NAMESPACE, "hexBinaryTest"));
- call.addParameter("arrayOfbyte_1", Constants.TYPE_LITERAL_HEXBINARY,
primParams.getClass(), ParameterMode.IN);
- call.setReturnType(Constants.TYPE_LITERAL_HEXBINARY, primParams.getClass());
+ call.addParameter("arrayOfbyte_1", Constants.TYPE_LITERAL_HEXBINARY,
byte[].class, ParameterMode.IN);
+ call.setReturnType(Constants.TYPE_LITERAL_HEXBINARY, byte[].class);
call.setTargetEndpointAddress(TARGET_ADDRESS);
primParams = (byte[])call.invoke(new Object[] { primParams });
return primParams;
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-11-22
12:42:47 UTC (rev 1498)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-11-22
13:09:51 UTC (rev 1499)
@@ -209,9 +209,8 @@
Object out = base64BinaryTest(in);
assertEquals(new String(in), new String((byte[])out));
- System.out.println("FIXME: [JBWS-1333] Fix marshalling of null values in
base64Binary, hexBinary");
- //out = base64BinaryTest(null);
- //assertNull(out);
+ out = base64BinaryTest(null);
+ assertNull(out);
}
public void testHexBinary() throws Exception
@@ -220,9 +219,8 @@
byte[] out = hexBinaryTest(in);
assertEquals(new String(in), new String((byte[])out));
- System.out.println("FIXME: [JBWS-1333] Fix marshalling of null values in
base64Binary, hexBinary");
- //out = hexBinaryTest(null);
- //assertNull(out);
+ out = hexBinaryTest(null);
+ assertNull(out);
}
public void testCalendar() throws Exception
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPElementRPCTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPElementRPCTestCase.java 2006-11-22
12:42:47 UTC (rev 1498)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPElementRPCTestCase.java 2006-11-22
13:09:51 UTC (rev 1499)
@@ -1,132 +0,0 @@
-/*
- * 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.xop;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-
-import javax.mail.internet.ContentType;
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPBodyElement;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPMessage;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.Constants;
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.jaxrpc.Style;
-import org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.metadata.OperationMetaData;
-import org.jboss.ws.metadata.ParameterMetaData;
-import org.jboss.ws.soap.MessageContextAssociation;
-import org.jboss.ws.soap.NameImpl;
-import org.jboss.ws.soap.SOAPBodyElementRpc;
-import org.jboss.ws.soap.SOAPContentElement;
-import org.jboss.ws.soap.attachment.MimeConstants;
-import org.jboss.ws.utils.DOMUtils;
-import org.jboss.ws.utils.DOMWriter;
-
-/**
- * Test the SOAPElement
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2006
- */
-public class XOPElementRPCTestCase extends JBossWSTest
-{
- private OperationMetaData opMetaData;
- private ParameterMetaData paramMetaData;
- private MessageFactory msgFactory;
- private SOAPMessage soapMessage;
- private SOAPContentElement xopElement;
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- // Setup the opMetaData
- opMetaData = new OperationMetaData(new QName("http://somens",
"myOperation", "ns1"), "myOperation");
- opMetaData.getEndpointMetaData().setStyle(Style.RPC);
- paramMetaData = new ParameterMetaData(opMetaData,
- new QName("xopParam"),
- new QName(Constants.NS_XML_MIME, "base64Binary",
Constants.PREFIX_XSD),
- "java.lang.String"
- );
- opMetaData.addParameter(paramMetaData);
-
- // Setup XOP element
- msgFactory = MessageFactory.newInstance();
- soapMessage = msgFactory.createMessage();
- SOAPBodyElement bodyElement = new SOAPBodyElementRpc(new
NameImpl(opMetaData.getQName()));
- soapMessage.getSOAPBody().addChildElement(bodyElement);
- xopElement = new SOAPContentElement(new NameImpl(paramMetaData.getXmlName()));
- xopElement.setParamMetaData(paramMetaData);
- bodyElement.addChildElement(xopElement);
-
- // Setup the message context
- CommonMessageContext msgContext = new SOAPMessageContextJAXRPC();
- MessageContextAssociation.pushMessageContext(msgContext);
- msgContext.setOperationMetaData(opMetaData);
- msgContext.setSOAPMessage(soapMessage);
-
- }
-
- public void testSOAPMessageRoundTrip() throws Exception
- {
- System.out.println("FIXME: [JBWS-1313] Fix XOP tests in trunk");
- if (true) return;
-
- String xopContent = "This is XOP content";
- //xopElement.setXMimeContentType("text/plain");
- xopElement.setObjectValue(xopContent);
-
- // Write SOAP message as multipart/related
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- soapMessage.writeTo(baos);
- byte[] bytes = baos.toByteArray();
-
- //System.out.println(new String(bytes));
-
- // Verify mime headers
- MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
- ContentType contentType = new
ContentType(mimeHeaders.getHeader(MimeConstants.CONTENT_TYPE)[0]);
- assertEquals(MimeConstants.TYPE_MULTIPART_RELATED, contentType.getBaseType());
-
- SOAPMessage soapMessage = msgFactory.createMessage(mimeHeaders, new
ByteArrayInputStream(bytes));
-
- SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
- System.out.println(DOMWriter.printNode(soapEnvelope, true));
-
- SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPElement rpcElement = (SOAPElement)DOMUtils.getFirstChildElement(soapBody);
- assertEquals(new NameImpl(opMetaData.getQName()), rpcElement.getElementName());
- SOAPContentElement xopElement =
(SOAPContentElement)DOMUtils.getFirstChildElement(rpcElement);
- assertEquals(new NameImpl(paramMetaData.getXmlName()),
xopElement.getElementName());
- xopElement.setParamMetaData(paramMetaData);
- Object retObj = xopElement.getObjectValue();
- assertEquals(xopContent, retObj);
- }
-}
\ No newline at end of file
Modified: trunk/src/test/resources/jaxrpc/marshall-rpclit/META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/marshall-rpclit/META-INF/jboss-client.xml 2006-11-22
12:42:47 UTC (rev 1498)
+++ trunk/src/test/resources/jaxrpc/marshall-rpclit/META-INF/jboss-client.xml 2006-11-22
13:09:51 UTC (rev 1499)
@@ -7,6 +7,7 @@
<service-ref>
<service-ref-name>service/StandardTypes</service-ref-name>
+ <config-name>Standard MTOM disabled client</config-name>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-marshall-rpclit?wsdl</wsdl-override>
</service-ref>
Modified: trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/web.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/web.xml 2006-11-22 12:42:47
UTC (rev 1498)
+++ trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/web.xml 2006-11-22 13:09:51
UTC (rev 1499)
@@ -5,7 +5,12 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
- <servlet>
+ <context-param>
+ <param-name>jbossws-config-name</param-name>
+ <param-value>Standard MTOM disabled endpoint</param-value>
+ </context-param>
+
+ <servlet>
<servlet-name>StandardTypes</servlet-name>
<servlet-class>org.jboss.test.ws.jaxrpc.marshall.StandardTypesBean</servlet-class>
</servlet>