JBossWS SVN: r2549 - branches/tdiesler.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-08 06:22:03 -0500 (Thu, 08 Mar 2007)
New Revision: 2549
Added:
branches/tdiesler/trunk/
Log:
recreate userbranch
Copied: branches/tdiesler/trunk (from rev 2548, trunk)
17 years, 9 months
JBossWS SVN: r2548 - branches/tdiesler.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-08 06:21:29 -0500 (Thu, 08 Mar 2007)
New Revision: 2548
Removed:
branches/tdiesler/trunk/
Log:
recreate userbranch
17 years, 9 months
JBossWS SVN: r2547 - trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-08 06:06:49 -0500 (Thu, 08 Mar 2007)
New Revision: 2547
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
Log:
Fix security config handling
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-03-07 16:02:15 UTC (rev 2546)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-03-08 11:06:49 UTC (rev 2547)
@@ -162,7 +162,8 @@
URL securityConfigURL = null;
try
{
- vfsRoot.findChild("WEB-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ UnifiedVirtualFile vfConfig = vfsRoot.findChild("WEB-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ securityConfigURL = vfConfig.toURL();
}
catch (IOException ex)
{
@@ -170,7 +171,8 @@
}
try
{
- vfsRoot.findChild("META-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ UnifiedVirtualFile vfConfig = vfsRoot.findChild("META-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ securityConfigURL = vfConfig.toURL();
}
catch (IOException ex)
{
17 years, 9 months
JBossWS SVN: r2546 - in trunk: jbossws-core/src/java/org/jboss/ws/core/soap and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-03-07 11:02:15 -0500 (Wed, 07 Mar 2007)
New Revision: 2546
Added:
trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentScanResult.java
trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java
Removed:
trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveXOPScanner.java
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java
trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/XOPContext.java
trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java
Log:
Fix JBCTS-466. Fix JBWS-1564 (Support swaRef for JAX-WS)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -173,6 +173,7 @@
if (paramMetaData.isSwA())
{
+ // NOTE: swa:ref is handled by the AttachmentMarshaller callback
CIDGenerator cidGenerator = reqMessage.getCidGenerator();
AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
reqMessage.addAttachmentPart(part);
@@ -231,7 +232,7 @@
try
{
// Read the SOAPEnvelope from the reqMessage
- SOAPMessage reqMessage = (SOAPMessage)payload;
+ SOAPMessageImpl reqMessage = (SOAPMessageImpl)payload;
SOAPEnvelope soapEnvelope = reqMessage.getSOAPPart().getEnvelope();
SOAPHeader soapHeader = soapEnvelope.getHeader();
SOAPBody soapBody = soapEnvelope.getBody();
@@ -428,7 +429,7 @@
}
// WS-Addressing might redirect the response, which results in an empty envelope
- SOAPMessage resMessage = (SOAPMessage)payload;
+ SOAPMessageImpl resMessage = (SOAPMessageImpl)payload;
SOAPEnvelope soapEnvelope = resMessage.getSOAPPart().getEnvelope();
if (soapEnvelope == null)
{
@@ -684,6 +685,12 @@
SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
soapMessage.setXOPMessage(true);
}
+ else if(paramMetaData.isSwaRef())
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
+ soapMessage.setSWARefMessage(true);
+ }
contentElement.setObjectValue(value);
@@ -782,6 +789,12 @@
SOAPMessageImpl soapMessage = (SOAPMessageImpl)MessageContextAssociation.peekMessageContext().getSOAPMessage();
soapMessage.setXOPMessage(true);
}
+ else if(paramMetaData.isSwaRef())
+ {
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)MessageContextAssociation.peekMessageContext().getSOAPMessage();
+ soapMessage.setSWARefMessage(true);
+ }
+
return soapContentElement;
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -67,6 +67,7 @@
private List<AttachmentPart> attachments = new LinkedList<AttachmentPart>();
private CIDGenerator cidGenerator = new CIDGenerator();
private boolean isXOPMessage;
+ private boolean isSWARefMessage;
private SOAPPartImpl soapPart;
private MultipartRelatedEncoder multipartRelatedEncoder;
@@ -95,6 +96,16 @@
this.isXOPMessage = isXOPMessage;
}
+ public boolean isSWARefMessage()
+ {
+ return isSWARefMessage;
+ }
+
+ public void setSWARefMessage(boolean isSWAMessage)
+ {
+ this.isSWARefMessage = isSWAMessage;
+ }
+
public void setAttachments(Collection<AttachmentPart> parts) throws SOAPException
{
for (AttachmentPart part : parts)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -47,7 +47,7 @@
StringBuilder cid = new StringBuilder();
long time = System.currentTimeMillis();
- cid.append("cid:").append(count++).append("-").append(time).append("-")
+ cid.append(count++).append("-").append(time).append("-")
.append(cid.hashCode()).append("@").append(MimeConstants.CID_DOMAIN);
if(log.isDebugEnabled()) log.debug("generateFromCount: " + cid);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/XOPContext.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -88,6 +88,18 @@
return isXOP;
}
+ public static boolean isSWARefMessage()
+ {
+ boolean isSWARef = false;
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ if (msgContext != null)
+ {
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
+ isSWARef = (soapMessage != null && soapMessage.isSWARefMessage());
+ }
+ return isSWARef;
+ }
+
/**
* Check if the wire format is actually a xop encoded multipart message
*/
@@ -195,7 +207,7 @@
*/
public static void eagerlyCreateAttachments()
{
- if (!isXOPMessage())
+ if (!isXOPMessage() && !isSWARefMessage())
return;
try
Modified: trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -6,7 +6,6 @@
import javax.xml.soap.AttachmentPart;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPMessageImpl;
@@ -79,7 +78,17 @@
public String addSwaRefAttachment(DataHandler dataHandler)
{
- throw new WSException("Not yet implemented");
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
+
+ String cid = soapMessage.getCidGenerator().generateFromCount();
+ AttachmentPart swaRefPart = soapMessage.createAttachmentPart(dataHandler);
+ swaRefPart.addMimeHeader(MimeConstants.CONTENT_ID, '<' + cid + '>'); // RFC2392 requirement
+ soapMessage.addAttachmentPart(swaRefPart);
+
+ if(log.isDebugEnabled()) log.debug("Created attachment part " + cid + ", with content-type " + swaRefPart.getContentType());
+
+ return "cid:" + cid;
}
public boolean isXOPPackage()
Added: trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentScanResult.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentScanResult.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentScanResult.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -0,0 +1,51 @@
+/*
+ * 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.ws.extensions.xop.jaxws;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since Mar 7, 2007
+ */
+public final class AttachmentScanResult {
+
+ public enum Type {XOP, SWA_REF};
+
+ private String mimeType;
+ private Type type;
+
+ public AttachmentScanResult(String mimeType, Type type)
+ {
+ this.mimeType = mimeType;
+ this.type = type;
+ }
+
+ public String getMimeType()
+ {
+ return mimeType;
+ }
+
+ public Type getType()
+ {
+ return type;
+ }
+}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/AttachmentUnmarshallerImpl.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -10,6 +10,9 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.extensions.xop.XOPContext;
public class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller
@@ -28,7 +31,7 @@
public boolean isXOPPackage()
{
- return XOPContext.isXOPMessage();
+ return XOPContext.isXOPMessage();
}
public DataHandler getAttachmentAsDataHandler(String cid)
Added: trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -0,0 +1,176 @@
+/*
+* 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.ws.extensions.xop.jaxws;
+
+import java.awt.Image;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttachmentRef;
+import javax.xml.transform.Source;
+
+import org.jboss.ws.core.utils.JavaUtils;
+
+/**
+ * Scans data types for MTOM and swaRef declarations.
+ * It basically searches for
+ * <ul>
+ * <li><code>@XmlMimeType</code>
+ * <li><code>@XmlAttachmentRef</code>
+ * </ul>
+ * and returns the appropriate mimetype.
+ * In order to re-use an instance of this class you need to invoke <code>reset()</code>
+ * in between scans.
+ *
+ * @author Heiko Braun <heiko.braun(a)jboss.com>
+ * @version $Id$
+ * @since 04.12.2006
+ *
+ */
+public class ReflectiveAttachmentRefScanner {
+
+ private static List<Class> SUPPORTED_TYPES = new ArrayList<Class>(5);
+
+ public static enum ResultType {XOP, SWA_REF};
+
+ static {
+ SUPPORTED_TYPES.add(String.class);
+ SUPPORTED_TYPES.add(byte[].class);
+ SUPPORTED_TYPES.add(Image.class);
+ SUPPORTED_TYPES.add(Source.class);
+ SUPPORTED_TYPES.add(DataHandler.class);
+ }
+
+ private List<Field> scannedFields = new ArrayList<Field>();
+
+ /**
+ * Scan java types for MTOM declarations
+ *
+ * @param xmlRoot
+ * @return the first matching XmlMimeType#value() or <code>null</code> if none found
+ */
+ public AttachmentScanResult scan(Class xmlRoot)
+ {
+ if( isJDKType(xmlRoot) )
+ return null;
+
+ AttachmentScanResult result = null;
+
+ for(Field field : xmlRoot.getDeclaredFields())
+ {
+ Class<?> type = field.getType();
+
+ boolean exceptionToTheRule = isAttachmentDataType(type);
+
+ // only non JDK types are inspected except for byte[] and java.lang.String
+ if( !alreadyScanned(field) && (exceptionToTheRule || !isJDKType(type)) )
+ {
+
+ // Scan for swa:Ref type declarations first
+ if(field.isAnnotationPresent(XmlAttachmentRef.class))
+ {
+ // arbitrary, it's not used
+ result = new AttachmentScanResult("application/octet-stream", AttachmentScanResult.Type.SWA_REF);
+ }
+
+ // Scan for XOP field annotations
+ else if(field.isAnnotationPresent(XmlMimeType.class))
+ {
+ XmlMimeType mimeTypeDecl = field.getAnnotation(XmlMimeType.class);
+ result = new AttachmentScanResult(mimeTypeDecl.value(), AttachmentScanResult.Type.XOP);
+ }
+
+ if(null == result) // try getter methods
+ {
+ String mimeType = scanGetterAnnotation(xmlRoot, field);
+ if(mimeType!=null)
+ result = new AttachmentScanResult(mimeType, AttachmentScanResult.Type.XOP);
+ }
+
+ // avoid recursive loops
+ if(!isAttachmentDataType(type))
+ scannedFields.add(field);
+
+ // drill down if none found so far
+ if(null == result)
+ result = scan(type);
+
+ }
+
+ }
+
+ return result;
+ }
+
+ private boolean alreadyScanned(Field field)
+ {
+
+ for(Field f : scannedFields)
+ {
+ if(f.equals(field))
+ return true;
+ }
+
+ return false;
+ }
+
+ public void reset()
+ {
+ scannedFields.clear();
+ }
+
+ private static boolean isAttachmentDataType(Class clazz) {
+ for(Class cl : SUPPORTED_TYPES)
+ {
+ if(JavaUtils.isAssignableFrom(cl, clazz))
+ return true;
+ }
+
+ return false;
+ }
+
+ private static boolean isJDKType(Class clazz)
+ {
+ return clazz.getPackage()!= null ? clazz.getPackage().getName().startsWith("java") : true;
+ }
+
+ private static String scanGetterAnnotation(Class owner, Field field)
+ {
+ String getterMethodName = "get"+field.getName();
+ for(Method method : owner.getDeclaredMethods())
+ {
+ if(method.getName().equalsIgnoreCase(getterMethodName)
+ && method.isAnnotationPresent(XmlMimeType.class))
+ {
+ XmlMimeType mimeTypeDecl = method.getAnnotation(XmlMimeType.class);
+ return mimeTypeDecl.value();
+ }
+ }
+
+ return null;
+ }
+}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveXOPScanner.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveXOPScanner.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveXOPScanner.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -1,156 +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.ws.extensions.xop.jaxws;
-
-import java.awt.Image;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.transform.Source;
-
-import org.jboss.ws.core.utils.JavaUtils;
-
-/**
- * Scans data types for MTOM declarations.
- * In order to re-use an instance of this class you need to invoke <code>reset()</code>
- * in between scans.
- *
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- * @version $Id$
- * @since 04.12.2006
- *
- */
-public class ReflectiveXOPScanner {
-
- private static List<Class> SUPPORTED_TYPES = new ArrayList<Class>(5);
-
- static {
- SUPPORTED_TYPES.add(String.class);
- SUPPORTED_TYPES.add(byte[].class);
- SUPPORTED_TYPES.add(Image.class);
- SUPPORTED_TYPES.add(Source.class);
- SUPPORTED_TYPES.add(DataHandler.class);
- }
-
- private List<Field> scannedFields = new ArrayList<Field>();
-
- /**
- * Scan java types for MTOM declarations
- *
- * @param xmlRoot
- * @return the first matching XmlMimeType#value() or <code>null</code> if none found
- */
- public String scan(Class xmlRoot)
- {
-
- if( isJDKType(xmlRoot) )
- return null;
-
- String mimeType = null;
-
- for(Field field : xmlRoot.getDeclaredFields())
- {
- Class<?> type = field.getType();
-
- boolean exceptionToTheRule = isMTOMDataType(type);
-
- // only non JDK types are inspected except for byte[] and java.lang.String
- if( !alreadyScanned(field) && (exceptionToTheRule || !isJDKType(type)) )
- {
- if(field.isAnnotationPresent(XmlMimeType.class))
- {
- XmlMimeType mimeTypeDecl = field.getAnnotation(XmlMimeType.class);
- mimeType = mimeTypeDecl.value();
- }
-
- if(null == mimeType) // try getter methods
- {
- mimeType = scanGetterAnnotation(xmlRoot, field);
- }
-
- // avoid recursive loops
- if(!isMTOMDataType(type))
- scannedFields.add(field);
-
- // drill down if none found so far
- if(null == mimeType)
- mimeType = scan(type);
-
- }
-
- }
-
- return mimeType;
- }
-
- private boolean alreadyScanned(Field field)
- {
-
- for(Field f : scannedFields)
- {
- if(f.equals(field))
- return true;
- }
-
- return false;
- }
-
- public void reset()
- {
- scannedFields.clear();
- }
-
- private static boolean isMTOMDataType(Class clazz) {
- for(Class cl : SUPPORTED_TYPES)
- {
- if(JavaUtils.isAssignableFrom(cl, clazz))
- return true;
- }
-
- return false;
- }
-
- private static boolean isJDKType(Class clazz)
- {
- return clazz.getPackage()!= null ? clazz.getPackage().getName().startsWith("java") : true;
- }
-
- private static String scanGetterAnnotation(Class owner, Field field)
- {
- String getterMethodName = "get"+field.getName();
- for(Method method : owner.getDeclaredMethods())
- {
- if(method.getName().equalsIgnoreCase(getterMethodName)
- && method.isAnnotationPresent(XmlMimeType.class))
- {
- XmlMimeType mimeTypeDecl = method.getAnnotation(XmlMimeType.class);
- return mimeTypeDecl.value();
- }
- }
-
- return null;
- }
-}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -758,7 +758,7 @@
if (!RemoteException.class.isAssignableFrom(exClass))
addFault(opMetaData, exClass);
- // process op meta data extension
+ // process operation meta data extension
processMetaExtensions(method, epMetaData, opMetaData);
}
@@ -788,9 +788,10 @@
String partName = mimePart.getPartName();
if(paramMetaData.getPartName().equals(partName))
{
- log.debug("Identified SWA parameter: " + partName + ", mimeTypes=" +mimePart.getMimeTypes());
+ log.debug("Identified 'mime:content' binding: " + partName + ", mimeTypes=" +mimePart.getMimeTypes());
paramMetaData.setSwA(true);
paramMetaData.setMimeTypes(mimePart.getMimeTypes());
+ break;
}
}
}
@@ -798,6 +799,7 @@
}
}
}
+
}
protected void processWebMethods(EndpointMetaData epMetaData, Class wsClass)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -40,7 +40,8 @@
import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.extensions.xop.jaxws.ReflectiveXOPScanner;
+import org.jboss.ws.extensions.xop.jaxws.ReflectiveAttachmentRefScanner;
+import org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult;
import org.jboss.ws.metadata.acessor.ReflectiveMethodAccessor;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
@@ -69,6 +70,7 @@
private boolean inHeader;
private boolean isSwA;
private boolean isXOP;
+ private boolean isSwaRef;
private List<WrappedParameter> wrappedParameters;
private int index;
@@ -330,6 +332,16 @@
this.isSwA = isSwA;
}
+ public boolean isSwaRef()
+ {
+ return isSwaRef;
+ }
+
+ public void setSwaRef(boolean swaRef)
+ {
+ isSwaRef = swaRef;
+ }
+
public boolean isXOP()
{
return isXOP;
@@ -458,15 +470,27 @@
if (javaType == null)
throw new WSException("Cannot load java type: " + javaTypeName);
- // check if the JavaType is an mtom parameter
- if (epType == EndpointMetaData.Type.JAXWS)
+ initializeAttachmentParameter(epType);
+ }
+
+ /**
+ * Identify MTOM and SWA:Ref parameter as these require special treatment.
+ * This only affects JAX-WS endpoints
+ * @param epType
+ */
+ private void initializeAttachmentParameter(Type epType)
+ {
+ if (epType == Type.JAXWS)
{
- ReflectiveXOPScanner scanner = new ReflectiveXOPScanner();
- String mimeType = scanner.scan(javaType);
- if (mimeType != null)
+ ReflectiveAttachmentRefScanner scanner = new ReflectiveAttachmentRefScanner();
+ AttachmentScanResult scanResult = scanner.scan(javaType);
+ if (scanResult != null)
{
- if(log.isDebugEnabled()) log.debug("MTOM parameter found: " + xmlName);
- setXOP(true);
+ if(log.isDebugEnabled()) log.debug("Identified attachment reference: " + xmlName + ", type="+scanResult.getType());
+ if(scanResult.getType() == AttachmentScanResult.Type.XOP)
+ setXOP(true);
+ else
+ setSwaRef(true);
}
}
}
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java 2007-03-07 15:59:41 UTC (rev 2545)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java 2007-03-07 16:02:15 UTC (rev 2546)
@@ -25,7 +25,8 @@
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.extensions.xop.jaxws.ReflectiveXOPScanner;
+import org.jboss.ws.extensions.xop.jaxws.ReflectiveAttachmentRefScanner;
+import org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult;
import javax.xml.bind.annotation.XmlMimeType;
import java.awt.*;
@@ -40,7 +41,7 @@
*/
public class MimeDeclarationTestCase extends TestCase {
- static ReflectiveXOPScanner SCANNER = new ReflectiveXOPScanner();
+ static ReflectiveAttachmentRefScanner SCANNER = new ReflectiveAttachmentRefScanner();
protected void setUp() throws Exception
@@ -50,20 +51,20 @@
public void testFieldAnnotation() throws Exception
{
- String mimeType = SCANNER.scan(FieldAnnotation.class);
+ AttachmentScanResult mimeType = SCANNER.scan(FieldAnnotation.class);
assertNotNull("Unable to find xop declaration", mimeType);
- assertEquals("text/xml", mimeType);
+ assertEquals("text/xml", mimeType.getMimeType());
}
public void testMethodAnnotation() throws Exception
{
- String mimeType = SCANNER.scan(MethodAnnotation.class);
+ AttachmentScanResult mimeType = SCANNER.scan(MethodAnnotation.class);
assertNotNull("Unable to find xop declaration", mimeType);
}
public void testAnnotationMissing() throws Exception
{
- String mimeType = SCANNER.scan(NoAnnotation.class);
+ AttachmentScanResult mimeType = SCANNER.scan(NoAnnotation.class);
assertNull("There should be no mimeType available", mimeType);
}
@@ -81,22 +82,22 @@
System.out.println(m.getParameterAnnotations().length);
- String mimeType = SCANNER.scan( m.getParameterTypes()[0]);
+ AttachmentScanResult mimeType = SCANNER.scan( m.getParameterTypes()[0]);
assertNotNull("Unable to find xop declaration", mimeType);
- assertEquals("text/xml", mimeType);
+ assertEquals("text/xml", mimeType.getMimeType());
}
public void testSimpleRecursion() throws Exception
{
- String mimeType = SCANNER.scan(SimpleRecursion.class);
+ AttachmentScanResult mimeType = SCANNER.scan(SimpleRecursion.class);
assertNull(mimeType);
}
public void testComplexRecursion() throws Exception
{
- String mimeType = SCANNER.scan(ComplexRecursion.class);
+ AttachmentScanResult mimeType = SCANNER.scan(ComplexRecursion.class);
assertNotNull("Unable to find xop declaration", mimeType);
- assertEquals("text/plain", mimeType);
+ assertEquals("text/plain", mimeType.getMimeType());
}
public void testXOPContext()
17 years, 9 months
JBossWS SVN: r2545 - trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-03-07 10:59:41 -0500 (Wed, 07 Mar 2007)
New Revision: 2545
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java
Log:
Fix broken build
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java 2007-03-07 14:53:59 UTC (rev 2544)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java 2007-03-07 15:59:41 UTC (rev 2545)
@@ -50,7 +50,7 @@
// The required <handler-class> element
private String handlerClass;
// The optional <init-param> elements
- private List<InitParamMetaData> initParams = new ArrayList<InitParamMetaData>();
+ private List<UnifiedInitParamMetaData> initParams = new ArrayList<UnifiedInitParamMetaData>();
// The optional <soap-header> elements
private Set<QName> soapHeaders = new HashSet<QName>();
// The optional <soap-role> elements
@@ -79,12 +79,12 @@
return handlerClass;
}
- public void addInitParam(InitParamMetaData param)
+ public void addInitParam(UnifiedInitParamMetaData param)
{
initParams.add(param);
}
- public List<InitParamMetaData> getInitParams()
+ public List<UnifiedInitParamMetaData> getInitParams()
{
return initParams;
}
17 years, 9 months
JBossWS SVN: r2544 - trunk/build/etc.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-07 09:53:59 -0500 (Wed, 07 Mar 2007)
New Revision: 2544
Modified:
trunk/build/etc/jbossws-component-info.xml
Log:
remove unwanted artifacts
Modified: trunk/build/etc/jbossws-component-info.xml
===================================================================
--- trunk/build/etc/jbossws-component-info.xml 2007-03-07 14:30:03 UTC (rev 2543)
+++ trunk/build/etc/jbossws-component-info.xml 2007-03-07 14:53:59 UTC (rev 2544)
@@ -7,9 +7,11 @@
<artifact id="jboss-jaxrpc.jar"/>
<artifact id="jboss-jaxws.jar"/>
<artifact id="jboss-saaj.jar"/>
-
+
+ <!--
<artifact id="jbossws40.sar"/>
<artifact id="jbossws42.sar"/>
+ -->
<artifact id="jbossws50.sar"/>
<artifact id="jbossws50-deployer.zip"/>
17 years, 9 months
JBossWS SVN: r2543 - trunk/build/etc.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-07 09:30:03 -0500 (Wed, 07 Mar 2007)
New Revision: 2543
Modified:
trunk/build/etc/jbossws-component-info.xml
Log:
remove not trunk dependencies
Modified: trunk/build/etc/jbossws-component-info.xml
===================================================================
--- trunk/build/etc/jbossws-component-info.xml 2007-03-07 14:24:46 UTC (rev 2542)
+++ trunk/build/etc/jbossws-component-info.xml 2007-03-07 14:30:03 UTC (rev 2543)
@@ -31,11 +31,9 @@
<compatible version="@jboss-jbossxb@"/>
</import>
<import componentref="jboss/microcontainer">
- <compatible version="snapshot"/>
<compatible version="@jboss-microcontainer@"/>
</import>
<import componentref="jboss/remoting">
- <compatible version="1.4.3.GA"/>
<compatible version="@jboss-remoting@"/>
</import>
<import componentref="sun-jaxb">
17 years, 9 months
JBossWS SVN: r2542 - trunk/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-07 09:24:46 -0500 (Wed, 07 Mar 2007)
New Revision: 2542
Modified:
trunk/build/version.properties
Log:
microcontainer 2.0.0.Beta3
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-03-07 14:01:37 UTC (rev 2541)
+++ trunk/build/version.properties 2007-03-07 14:24:46 UTC (rev 2542)
@@ -18,7 +18,7 @@
ibm-wsdl4j=1.5.2jboss
javassist=3.5.0.CR1
jboss-jbossxb=1.0.0.CR9
-jboss-microcontainer=1.0.2
+jboss-microcontainer=2.0.0.Beta3
jboss-remoting=2.2.0.Alpha7
sun-jaxb=2.0.3
17 years, 9 months
JBossWS SVN: r2541 - in trunk: build/ant-import and 26 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-07 09:01:37 -0500 (Wed, 07 Mar 2007)
New Revision: 2541
Added:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java
trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml
Removed:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/jsr181/
trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml
Modified:
trunk/build/ant-import/build-hudson.xml
trunk/build/ant-import/build-release.xml
trunk/build/ant-import/build-thirdparty.xml
trunk/build/build.xml
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebServiceRefHandler.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxrpc/CommonConfigJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/CommonConfigJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/HandlerChainsConfigJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/PortComponentMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java
trunk/jbossws-tests/ant-import/build-samples-jaxws.xml
trunk/jbossws-tests/src/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java
trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml
trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml
trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
Log:
consolidate <service-ref> meta data
Modified: trunk/build/ant-import/build-hudson.xml
===================================================================
--- trunk/build/ant-import/build-hudson.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/build/ant-import/build-hudson.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -81,7 +81,12 @@
<!-- Configure Hudson -->
<copy todir="${hudson.home}" overwrite="true">
<fileset dir="${build.dir}/hudson/hudson-home">
- <include name="**/*.xml"/>
+ <include name="jobs/AS-5.0/**"/>
+ <include name="jobs/AS-4.2/**"/>
+ <include name="jobs/JBWS-Tests-AS-5.0/**"/>
+ <include name="jobs/JBWS-Tests-AS-4.2/**"/>
+ <include name="users/**"/>
+ <include name="*.xml"/>
</fileset>
<filterset>
<filter token="version.id" value="${version.id}"/>
Modified: trunk/build/ant-import/build-release.xml
===================================================================
--- trunk/build/ant-import/build-release.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/build/ant-import/build-release.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -60,12 +60,14 @@
<include name="jbossws50.sar"/>
<include name="jbossws50-deployer.zip"/>
</fileset>
+ <!--
<fileset dir="${jboss42.output.lib.dir}">
<include name="jbossws42.sar"/>
</fileset>
<fileset dir="${jboss40.output.lib.dir}">
<include name="jbossws40.sar"/>
</fileset>
+ -->
</copy>
<copy tofile="${jbossws.repository.dir}/component-info.xml" file="${etc.dir}/jbossws-component-info.xml" filtering="true" overwrite="true">
<filterset>
@@ -73,7 +75,7 @@
</filterset>
</copy>
- <!-- jbossws14 -->
+ <!-- jbossws14
<property name="jbossws14.repository.dir" value="${jboss.local.repository}/jboss/jbossws14/${repository.id}"/>
<mkdir dir="${jbossws14.repository.dir}/lib"/>
<delete>
@@ -95,6 +97,7 @@
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
</copy>
+ -->
</target>
Modified: trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- trunk/build/ant-import/build-thirdparty.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/build/ant-import/build-thirdparty.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -93,6 +93,7 @@
<pathelement location="${thirdparty.dir}/activation.jar"/>
<pathelement location="${thirdparty.dir}/javassist.jar"/>
<pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
<pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
<pathelement location="${thirdparty.dir}/jboss-common.jar"/>
<pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/build/build.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -48,7 +48,7 @@
<ant antfile="${integration.jboss42.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${integration.jboss50.dir}/build.xml" target="clean" inheritall="false"/>
<ant antfile="${integration.tomcat.dir}/build.xml" target="clean" inheritall="false"/>
- <ant antfile="${tests.dir}/build.xml" target="clean" inheritall="false"/>
+ <!--ant antfile="${tests.dir}/build.xml" target="clean" inheritall="false"/-->
</target>
<target name="main" description="Executes the default target (most)." depends="most">
Modified: trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
===================================================================
--- trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -24,8 +24,9 @@
// $Id$
import java.io.IOException;
-import java.util.ArrayList;
+import java.util.Enumeration;
import java.util.LinkedHashMap;
+import java.util.Properties;
import javax.xml.namespace.QName;
@@ -34,10 +35,11 @@
import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
/**
* Build container independent service ref meta data
@@ -47,27 +49,36 @@
*/
public class ServiceRefMetaDataAdaptor
{
- public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws IOException
+ public static UnifiedServiceRefMetaData buildServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws IOException
{
- UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
+ UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData(udi.vfRoot);
usrmd.setServiceRefName(srmd.getServiceRefName());
usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlLocation(srmd.getWsdlURL());
- usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getJaxrpcMappingFile()));
+ usrmd.setWsdlFile(srmd.getWsdlFile());
+ usrmd.setMappingFile(srmd.getJaxrpcMappingFile());
usrmd.setServiceQName(srmd.getServiceQName());
LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
{
- UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData();
+ UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData(usrmd);
upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
upcmd.setPortComponentLink(pcmd.getPortComponentLink());
- upcmd.setCallProperties(pcmd.getCallProperties());
+ Properties callProps = pcmd.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<Object> keys = callProps.keys();
+ while(keys.hasMoreElements())
+ {
+ String name = (String)keys.nextElement();
+ String value = callProps.getProperty(name);
+ upcmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
+ usrmd.addPortComponentRef(upcmd);
}
- usrmd.setPortComponentRefs(pcrefs);
- ArrayList<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
for (HandlerMetaData hmd : srmd.getHandlers())
{
UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
@@ -80,7 +91,7 @@
}
for (InitParamMetaData ipmd : hmd.getInitParams())
{
- HandlerInitParam ip = new HandlerInitParam();
+ UnifiedInitParamMetaData ip = new UnifiedInitParamMetaData();
ip.setParamName(ipmd.getParamName());
ip.setParamValue(ipmd.getParamValue());
uhmd.addInitParam(ip);
@@ -93,15 +104,25 @@
{
uhmd.addSoapRole(soapRole);
}
- handlers.add(uhmd);
+ usrmd.addHandler(uhmd);
}
- usrmd.setHandlers(handlers);
usrmd.setConfigName(srmd.getConfigName());
usrmd.setConfigFile(srmd.getConfigFile());
- usrmd.setWsdlOverride(srmd.getWsdlOverride());
- usrmd.setCallProperties(srmd.getCallProperties());
+ usrmd.setWsdlOverride(srmd.getWsdlOverride().toExternalForm());
+ Properties callProps = srmd.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<Object> keys = callProps.keys();
+ while(keys.hasMoreElements())
+ {
+ String name = (String)keys.nextElement();
+ String value = callProps.getProperty(name);
+ usrmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
+
return usrmd;
}
}
Modified: trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
===================================================================
--- trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -23,28 +23,19 @@
// $Id$
-import java.net.URL;
import java.util.Iterator;
import javax.naming.Context;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.xml.rpc.JAXRPCException;
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.util.naming.Util;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.integration.jboss40.DeploymentInfoAdaptor;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
/**
* Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
@@ -76,18 +67,12 @@
UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
- UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
+ UnifiedServiceRefMetaData usr = ServiceRefMetaDataAdaptor.buildServiceRefMetaData(udi, serviceRef);
- JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
- wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
-
- Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
- wsServiceRef.setWsdlDefinition(wsdlDefinition);
-
- ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
+ ServiceReferenceable ref = new ServiceReferenceable(usr);
Util.bind(envCtx, serviceRefName, ref);
- log.debug("Webservice binding: java:comp/env/" + serviceRefName);
+ log.debug("<service-ref> bound to: java:comp/env/" + serviceRefName);
}
}
catch (Exception e)
@@ -95,46 +80,4 @@
throw new DeploymentException("Cannot bind webservice to client environment", e);
}
}
-
- private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
- {
- JavaWsdlMapping javaWsdlMapping = null;
- URL mappingURL = serviceRef.getMappingLocation();
- if (mappingURL != null)
- {
- try
- {
- // setup the XML binding Unmarshaller
- JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
- javaWsdlMapping = mappingFactory.parse(mappingURL);
- }
- catch (Exception e)
- {
- throw new JAXRPCException("Cannot unmarshal jaxrpc-mapping-file: " + mappingURL, e);
- }
- }
- return javaWsdlMapping;
- }
-
- private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
- {
- Definition wsdlDefinition = null;
- {
- URL wsdlOverride = serviceRef.getWsdlOverride();
- URL wsdlURL = serviceRef.getWsdlLocation();
- if (wsdlOverride == null && wsdlURL != null)
- {
- try
- {
- WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
- wsdlDefinition = factory.parse(wsdlURL);
- }
- catch (WSDLException e)
- {
- throw new WSException("Cannot unmarshall wsdl, cause: " + e.toString());
- }
- }
- }
- return wsdlDefinition;
- }
}
Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -23,27 +23,19 @@
// $Id$
-import java.net.URL;
import java.util.Iterator;
import javax.naming.Context;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.xml.rpc.JAXRPCException;
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.serviceref.ServiceRefMetaData;
import org.jboss.system.ServiceMBeanSupport;
import org.jboss.util.naming.Util;
-import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
/**
* Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
@@ -75,18 +67,12 @@
UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
- UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
+ UnifiedServiceRefMetaData usr = ServiceRefMetaDataAdaptor.buildServiceRefMetaData(udi, serviceRef);
- JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
- wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
-
- Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
- wsServiceRef.setWsdlDefinition(wsdlDefinition);
-
- ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
+ ServiceReferenceable ref = new ServiceReferenceable(usr);
Util.bind(envCtx, serviceRefName, ref);
- log.debug("Webservice binding: java:comp/env/" + serviceRefName);
+ log.debug("<service-ref> bound to: java:comp/env/" + serviceRefName);
}
}
catch (Exception e)
@@ -94,46 +80,4 @@
throw new DeploymentException("Cannot bind webservice to client environment", e);
}
}
-
- private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
- {
- JavaWsdlMapping javaWsdlMapping = null;
- URL mappingURL = serviceRef.getMappingLocation();
- if (mappingURL != null)
- {
- try
- {
- // setup the XML binding Unmarshaller
- JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
- javaWsdlMapping = mappingFactory.parse(mappingURL);
- }
- catch (Exception e)
- {
- throw new JAXRPCException("Cannot unmarshal jaxrpc-mapping-file: " + mappingURL, e);
- }
- }
- return javaWsdlMapping;
- }
-
- private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
- {
- Definition wsdlDefinition = null;
- {
- URL wsdlOverride = serviceRef.getWsdlOverride();
- URL wsdlURL = serviceRef.getWsdlLocation();
- if (wsdlOverride == null && wsdlURL != null)
- {
- try
- {
- WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
- wsdlDefinition = factory.parse(wsdlURL);
- }
- catch (WSDLException e)
- {
- throw new WSException("Cannot unmarshall wsdl, cause: " + e.toString());
- }
- }
- }
- return wsdlDefinition;
- }
}
Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -24,8 +24,9 @@
// $Id$
import java.io.IOException;
-import java.util.ArrayList;
+import java.util.Enumeration;
import java.util.LinkedHashMap;
+import java.util.Properties;
import javax.xml.namespace.QName;
@@ -34,10 +35,11 @@
import org.jboss.metadata.serviceref.PortComponentRefMetaData;
import org.jboss.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
/**
* Build container independent service ref meta data
@@ -47,27 +49,36 @@
*/
public class ServiceRefMetaDataAdaptor
{
- public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws IOException
+ public static UnifiedServiceRefMetaData buildServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws IOException
{
- UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
+ UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData(udi.vfRoot);
usrmd.setServiceRefName(srmd.getServiceRefName());
usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlLocation(srmd.getWsdlURL());
- usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getJaxrpcMappingFile()));
+ usrmd.setWsdlFile(srmd.getWsdlFile());
+ usrmd.setMappingFile(srmd.getJaxrpcMappingFile());
usrmd.setServiceQName(srmd.getServiceQName());
LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
{
- UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData();
+ UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData(usrmd);
upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
upcmd.setPortComponentLink(pcmd.getPortComponentLink());
- upcmd.setCallProperties(pcmd.getCallProperties());
+ Properties callProps = pcmd.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<Object> keys = callProps.keys();
+ while(keys.hasMoreElements())
+ {
+ String name = (String)keys.nextElement();
+ String value = callProps.getProperty(name);
+ upcmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
+ usrmd.addPortComponentRef(upcmd);
}
- usrmd.setPortComponentRefs(pcrefs);
- ArrayList<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
for (HandlerMetaData hmd : srmd.getHandlers())
{
UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
@@ -80,7 +91,7 @@
}
for (InitParamMetaData ipmd : hmd.getInitParams())
{
- HandlerInitParam ip = new HandlerInitParam();
+ UnifiedInitParamMetaData ip = new UnifiedInitParamMetaData();
ip.setParamName(ipmd.getParamName());
ip.setParamValue(ipmd.getParamValue());
uhmd.addInitParam(ip);
@@ -93,15 +104,25 @@
{
uhmd.addSoapRole(soapRole);
}
- handlers.add(uhmd);
+ usrmd.addHandler(uhmd);
}
- usrmd.setHandlers(handlers);
usrmd.setConfigName(srmd.getConfigName());
usrmd.setConfigFile(srmd.getConfigFile());
- usrmd.setWsdlOverride(srmd.getWsdlOverride());
- usrmd.setCallProperties(srmd.getCallProperties());
+ usrmd.setWsdlOverride(srmd.getWsdlOverride().toExternalForm());
+ Properties callProps = srmd.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<Object> keys = callProps.keys();
+ while(keys.hasMoreElements())
+ {
+ String name = (String)keys.nextElement();
+ String value = callProps.getProperty(name);
+ usrmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
+
return usrmd;
}
}
Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebServiceRefHandler.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebServiceRefHandler.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebServiceRefHandler.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -23,6 +23,7 @@
// $Id$
+import java.io.ByteArrayOutputStream;
import java.lang.reflect.AnnotatedElement;
import java.net.URL;
@@ -30,9 +31,13 @@
import javax.naming.Context;
import javax.naming.NamingException;
import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.ws.core.jaxws.UnifiedWebServiceRefHandler;
+import org.jboss.ws.core.jaxws.client.ServiceRefHandlerJAXWS;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefObjectFactory;
/**
* Binds a JAXWS @WebServiceRef object in the client's ENC
@@ -40,13 +45,32 @@
* @author Thomas.Diesler(a)jboss.org
* @since 17-Jan-2007
*/
-public class WebServiceRefHandler extends UnifiedWebServiceRefHandler implements WebServiceRefHandlerMBean
+public class WebServiceRefHandler implements WebServiceRefHandlerMBean
{
public void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement anElement, URL rootURL, Source metadata) throws NamingException
{
- setupWebServiceRef(encCtx, encName, anElement, new URLLoaderAdapter(rootURL), metadata);
+ String xmlFragment = null;
+ try
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ StreamResult result = new StreamResult(baos);
+ TransformerFactory tf = TransformerFactory.newInstance();
+ tf.newTransformer().transform(metadata, result);
+ xmlFragment = new String(baos.toByteArray());
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Cannot transform <service-ref> metadata", ex);
+ }
+
+ ServiceRefObjectFactory factory = ServiceRefObjectFactory.newInstance();
+ UnifiedServiceRefMetaData serviceRef = factory.parse(xmlFragment);
+ serviceRef.setVfsRoot(new URLLoaderAdapter(rootURL));
+
+ ServiceRefHandlerJAXWS handler = new ServiceRefHandlerJAXWS();
+ handler.setupServiceRef(encCtx, encName, anElement, serviceRef);
}
-
+
public void create() throws Exception
{
MBeanServer server = MBeanServerLocator.locateJBoss();
Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -23,28 +23,23 @@
// $Id$
-import java.net.URL;
-import java.util.Iterator;
+import java.io.IOException;
+import java.lang.reflect.AnnotatedElement;
import javax.management.MBeanServer;
import javax.naming.Context;
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.xml.rpc.JAXRPCException;
+import javax.naming.NamingException;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.util.naming.Util;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.core.jaxrpc.client.ServiceRefHandlerJAXRPC;
+import org.jboss.ws.core.jaxws.client.ServiceRefHandlerJAXWS;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefObjectFactory;
+import org.w3c.dom.Element;
/**
* Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
@@ -59,90 +54,42 @@
private static Logger log = Logger.getLogger(ServiceRefHandler.class);
/**
- * This binds a jaxrpc Service into the callers ENC for every service-ref element
- *
- * @param envCtx ENC to bind the javax.rpc.xml.Service object to
- * @param serviceRefs An iterator of the service-ref elements in the client deployment descriptor
- * @param unit The client deployment
+ * Binds a Service into the callers ENC for every service-ref element
*/
- public void bindServiceRefs(Context envCtx, Iterator serviceRefs, DeploymentUnit unit)
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, VirtualFile vfsRoot, String xmlFragment) throws NamingException
{
try
{
- while (serviceRefs.hasNext())
- {
- ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
- String serviceRefName = serviceRef.getServiceRefName();
-
- // Build the container independent deployment info
- UnifiedDeploymentInfo udi = new JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
-
- UnifiedServiceRefMetaData wsServiceRef = ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
-
- JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
- wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
-
- Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
- wsServiceRef.setWsdlDefinition(wsdlDefinition);
-
- ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
-
- // Do not use rebind, the binding should be unique
- Util.bind(envCtx, serviceRefName, ref);
-
- log.debug("<service-ref> bound to: java:comp/env/" + serviceRefName);
- }
+ Element root = DOMUtils.parse(xmlFragment);
+ if (log.isDebugEnabled())
+ log.debug("setupServiceRef\n" + DOMWriter.printNode(root, true));
}
- catch (RuntimeException rte)
+ catch (IOException e)
{
- throw rte;
+ log.error("Invalid service-ref: " + xmlFragment);
}
- catch (Exception ex)
+
+ ServiceRefObjectFactory factory = ServiceRefObjectFactory.newInstance();
+ UnifiedServiceRefMetaData serviceRef = factory.parse(xmlFragment);
+ serviceRef.setVfsRoot(new VirtualFileAdaptor(vfsRoot));
+
+ if (isServiceRefJaxRpc(serviceRef))
{
- throw new WSException("Cannot bind webservice to client environment", ex);
+ ServiceRefHandlerJAXRPC handler = new ServiceRefHandlerJAXRPC();
+ handler.setupServiceRef(encCtx, encName, serviceRef);
}
- }
-
- private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
- {
- JavaWsdlMapping javaWsdlMapping = null;
- URL mappingURL = serviceRef.getMappingLocation();
- if (mappingURL != null)
+ else
{
- try
- {
- JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
- javaWsdlMapping = mappingFactory.parse(mappingURL);
- }
- catch (Exception e)
- {
- throw new JAXRPCException("Cannot unmarshal jaxrpc-mapping-file: " + mappingURL, e);
- }
+ ServiceRefHandlerJAXWS handler = new ServiceRefHandlerJAXWS();
+ handler.setupServiceRef(encCtx, encName, anElement, serviceRef);
}
- return javaWsdlMapping;
}
- private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
+ private boolean isServiceRefJaxRpc(UnifiedServiceRefMetaData serviceRef)
{
- Definition wsdlDefinition = null;
- {
- URL wsdlOverride = serviceRef.getWsdlOverride();
- URL wsdlURL = serviceRef.getWsdlLocation();
- if (wsdlOverride == null && wsdlURL != null)
- {
- try
- {
- WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
- wsdlDefinition = factory.parse(wsdlURL);
- }
- catch (WSDLException e)
- {
- throw new WSException("Cannot unmarshall wsdl, cause: " + e.toString());
- }
- }
- }
- return wsdlDefinition;
+ // The <service-interface> is a required element
+ // for JAXRPC and not defined for JAXWS
+ return serviceRef.getServiceInterface() != null;
}
public void create() throws Exception
Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -21,13 +21,13 @@
*/
package org.jboss.ws.integration.jboss50;
-import java.util.Iterator;
+import java.lang.reflect.AnnotatedElement;
import javax.management.ObjectName;
import javax.naming.Context;
+import javax.naming.NamingException;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.ObjectNameFactory;
/**
@@ -39,12 +39,7 @@
public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
/**
- * Binds a JAXRPC Service into the callers ENC for every service-ref element
- *
- * @param envCtx ENC to bind the javax.rpc.xml.Service object to
- * @param serviceRefs An iterator of the service-ref elements in the client deployment descriptor
- * @param unit The client's deployment unit
- * @throws DeploymentException if it goes wrong
+ * Binds a Service into the callers ENC for every service-ref element
*/
- void bindServiceRefs(Context envCtx, Iterator serviceRefs, DeploymentUnit unit);
+ void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, VirtualFile vfsRoot, String xmlFragment) throws NamingException;
}
Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,112 +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.ws.integration.jboss50;
-
-// $Id$
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.metadata.serviceref.HandlerMetaData;
-import org.jboss.metadata.serviceref.InitParamMetaData;
-import org.jboss.metadata.serviceref.PortComponentRefMetaData;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
-
-/**
- * Build container independent service ref meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ServiceRefMetaDataAdaptor
-{
- public static UnifiedServiceRefMetaData buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws Exception
- {
- UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
- usrmd.setServiceRefName(srmd.getServiceRefName());
- usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlLocation(getWsdlLocation(udi, srmd));
- usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getMappingFile()));
- usrmd.setServiceQName(srmd.getServiceQName());
-
- LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
- for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
- {
- UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData();
- upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
- upcmd.setPortComponentLink(pcmd.getPortComponentLink());
- upcmd.setCallProperties(pcmd.getCallProperties());
- pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
- }
- usrmd.setPortComponentRefs(pcrefs);
-
- ArrayList<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
- for (HandlerMetaData hmd : srmd.getHandlers())
- {
- UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
- uhmd.setHandlerName(hmd.getHandlerName());
- uhmd.setHandlerClass(hmd.getHandlerClass());
- for(QName soapHeader : hmd.getSoapHeaders())
- {
- uhmd.addSoapHeader(soapHeader);
- }
- for(String portname : hmd.getPortNames())
- {
- uhmd.addPortName(portname);
- }
- for (InitParamMetaData ipmd : hmd.getInitParams())
- {
- HandlerInitParam ip = new HandlerInitParam();
- ip.setParamName(ipmd.getParamName());
- ip.setParamValue(ipmd.getParamValue());
- uhmd.addInitParam(ip);
- }
- handlers.add(uhmd);
- }
- usrmd.setHandlers(handlers);
-
- usrmd.setConfigName(srmd.getConfigName());
- usrmd.setConfigFile(srmd.getConfigFile());
- usrmd.setWsdlOverride(srmd.getWsdlOverride());
- usrmd.setCallProperties(srmd.getCallProperties());
-
- return usrmd;
- }
-
- private static URL getWsdlLocation(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws Exception
- {
- URL wsdlLocation = srmd.getWsdlOverride();
- if (wsdlLocation == null && srmd.getWsdlFile() != null)
- {
- wsdlLocation = udi.getMetaDataFileURL(srmd.getWsdlFile());
- }
- return wsdlLocation;
- }
-}
Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,63 +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.ws.integration.jboss50;
-
-// $Id$
-
-import java.lang.reflect.AnnotatedElement;
-
-import javax.management.MBeanServer;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.transform.Source;
-
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.core.jaxws.UnifiedWebServiceRefHandler;
-
-/**
- * Binds a JAXWS @WebServiceRef object in the client's ENC
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2007
- */
-public class WebServiceRefHandler extends UnifiedWebServiceRefHandler implements WebServiceRefHandlerMBean
-{
- public void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement anElement, VirtualFile vfsRoot, Source metadata) throws NamingException
- {
- setupWebServiceRef(encCtx, encName, anElement, new VirtualFileAdaptor(vfsRoot), metadata);
- }
-
- public void create() throws Exception
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- if (server != null)
- server.registerMBean(this, OBJECT_NAME);
- }
-
- public void destroy() throws Exception
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- if (server != null)
- server.unregisterMBean(OBJECT_NAME);
- }
-}
Deleted: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,46 +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.ws.integration.jboss50;
-
-
-import java.lang.reflect.AnnotatedElement;
-
-import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.transform.Source;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.core.utils.ObjectNameFactory;
-
-/**
- * MBean interface.
- */
-public interface WebServiceRefHandlerMBean
-{
- // default object name
- public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceRefHandler");
-
- /** Binds a JAXWS WebServiceRef into the callers ENC
- */
- void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement enElement, VirtualFile vfsRoot, Source metadata) throws NamingException;
-}
Modified: trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -47,12 +47,9 @@
<property name="serviceEndpointServlet">org.jboss.ws.integration.jboss50.JBossServiceEndpointServlet</property>
</bean>
- <!-- Bind JAXRPC Service objects in client environment context -->
+ <!-- Bind Service objects in client environment context -->
<bean name="ServiceRefHandler" class="org.jboss.ws.integration.jboss50.ServiceRefHandler"/>
- <!-- Bind JAXWS Service objects in client environment context -->
- <bean name="WebServiceRefHandler" class="org.jboss.ws.integration.jboss50.WebServiceRefHandler"/>
-
<!-- A subscription manager for WS-Eventing -->
<bean name="SubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -27,12 +27,10 @@
import java.net.URL;
import java.rmi.Remote;
import java.util.ArrayList;
-import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Properties;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -47,8 +45,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
@@ -57,7 +57,6 @@
import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
@@ -122,7 +121,7 @@
JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
-
+
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityConfig, usrMetaData, ctxClassLoader);
handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
@@ -419,37 +418,19 @@
// nothing to do
if (usrMetaData == null)
return;
-
+
// General properties
- Properties callProps = usrMetaData.getCallProperties();
- if (callProps != null)
- {
- Enumeration<?> names = callProps.propertyNames();
- while (names.hasMoreElements())
- {
- String name = (String)names.nextElement();
- String value = callProps.getProperty(name);
- call.setProperty(name, value);
- }
- }
-
+ for (UnifiedCallPropertyMetaData prop : usrMetaData.getCallProperties())
+ call.setProperty(prop.getPropName(), prop.getPropValue());
+
if (seiName != null)
{
for (UnifiedPortComponentRefMetaData upcRef : usrMetaData.getPortComponentRefs())
{
if (seiName.equals(upcRef.getServiceEndpointInterface()))
{
- callProps = upcRef.getCallProperties();
- if (callProps != null)
- {
- Enumeration<?> names = callProps.propertyNames();
- while (names.hasMoreElements())
- {
- String name = (String)names.nextElement();
- String value = callProps.getProperty(name);
- call.setProperty(name, value);
- }
- }
+ for (UnifiedCallPropertyMetaData prop : upcRef.getCallProperties())
+ call.setProperty(prop.getPropName(), prop.getPropValue());
}
}
}
@@ -482,7 +463,7 @@
handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
HashMap hConfig = new HashMap();
- for (HandlerInitParam param : jaxrpcMetaData.getInitParams())
+ for (UnifiedInitParamMetaData param : jaxrpcMetaData.getInitParams())
{
hConfig.put(param.getParamName(), param.getParamValue());
}
@@ -495,7 +476,8 @@
hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
- if(log.isDebugEnabled()) log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
+ if (log.isDebugEnabled())
+ log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
handlerInfos.add(info);
// register the handlers with the client engine
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -37,6 +37,7 @@
import java.rmi.Remote;
import java.util.Hashtable;
import java.util.List;
+import java.util.Properties;
import javax.naming.Context;
import javax.naming.Name;
@@ -44,6 +45,7 @@
import javax.naming.RefAddr;
import javax.naming.Reference;
import javax.naming.spi.ObjectFactory;
+import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.Service;
@@ -54,12 +56,15 @@
import org.jboss.ws.core.server.ServiceEndpoint;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
/**
* This ServiceObjectFactory reconstructs a javax.xml.rpc.Service
@@ -102,13 +107,13 @@
Reference ref = (Reference)obj;
// Unmarshall the ServiceRefMetaData
- UnifiedServiceRefMetaData usrMetaData = null;
+ UnifiedServiceRefMetaData serviceRef = null;
RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
try
{
ObjectInputStream ois = new ObjectInputStream(bais);
- usrMetaData = (UnifiedServiceRefMetaData)ois.readObject();
+ serviceRef = (UnifiedServiceRefMetaData)ois.readObject();
ois.close();
}
catch (IOException ex)
@@ -137,15 +142,15 @@
}
ServiceImpl jaxrpcService = null;
- URL wsdlLocation = usrMetaData.getWsdlLocation();
+ URL wsdlLocation = serviceRef.getWsdlLocation();
if (wsdlLocation != null)
{
if(log.isDebugEnabled()) log.debug("Create jaxrpc service from wsdl");
// Create the actual service object
- QName serviceName = usrMetaData.getServiceQName();
- JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)usrMetaData.getJavaWsdlMapping();
- jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, usrMetaData);
+ QName serviceName = serviceRef.getServiceQName();
+ JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(serviceRef);
+ jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRef);
}
else
{
@@ -153,9 +158,16 @@
jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
}
+ ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
+
// Set any service level properties
- ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
- serviceMetaData.setProperties(usrMetaData.getCallProperties());
+ if (serviceRef.getCallProperties().size() > 0)
+ {
+ Properties callProps = new Properties();
+ serviceMetaData.setProperties(callProps);
+ for (UnifiedCallPropertyMetaData prop : serviceRef.getCallProperties())
+ callProps.setProperty(prop.getPropName(), prop.getPropValue());
+ }
// The web service client using a port-component-link, the contet is the URL to
// the PortComponentLinkServlet that will return the actual endpoint address
@@ -211,15 +223,13 @@
// load the service interface class
ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
- Class siClass = contextCL.loadClass(usrMetaData.getServiceInterface());
+ Class siClass = contextCL.loadClass(serviceRef.getServiceInterface());
if (Service.class.isAssignableFrom(siClass) == false)
throw new JAXRPCException("The service interface does not implement javax.xml.rpc.Service: " + siClass.getName());
// load all service endpoint interface classes
- UnifiedPortComponentRefMetaData[] pcrArray = usrMetaData.getPortComponentRefs();
- for (int i = 0; i < pcrArray.length; i++)
+ for (UnifiedPortComponentRefMetaData pcr : serviceRef.getPortComponentRefs())
{
- UnifiedPortComponentRefMetaData pcr = pcrArray[i];
Class seiClass = contextCL.loadClass(pcr.getServiceEndpointInterface());
if (Remote.class.isAssignableFrom(seiClass) == false)
throw new IllegalArgumentException("The SEI does not implement java.rmi.Remote: " + seiClass.getName());
@@ -249,4 +259,45 @@
jaxrpcService.setupHandlerChain(epMetaData);
}
}
+
+ private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
+ {
+ JavaWsdlMapping javaWsdlMapping = null;
+ if (serviceRef.getMappingFile() != null)
+ {
+ String mappingFile = serviceRef.getMappingFile();
+ try
+ {
+ JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
+ URL mappingURL = serviceRef.getVfsRoot().findChild(mappingFile).toURL();
+ javaWsdlMapping = mappingFactory.parse(mappingURL);
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot unmarshal jaxrpc-mapping-file: " + mappingFile, e);
+ }
+ }
+ return javaWsdlMapping;
+ }
+
+ private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
+ {
+ Definition wsdlDefinition = null;
+ {
+ URL wsdlLocation = serviceRef.getWsdlLocation();
+ if (wsdlLocation != null)
+ {
+ try
+ {
+ WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
+ wsdlDefinition = factory.parse(wsdlLocation);
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot unmarshall wsdl-file: " + wsdlLocation, e);
+ }
+ }
+ }
+ return wsdlDefinition;
+ }
}
Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java (from rev 2540, branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,58 @@
+/*
+ * 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.ws.core.jaxrpc.client;
+
+// $Id$
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
+ * deployment descriptor.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Nov-2006
+ */
+public class ServiceRefHandlerJAXRPC
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ServiceRefHandlerJAXRPC.class);
+
+ /**
+ * Binds a Service into the callers ENC for every service-ref element
+ */
+ public void setupServiceRef(Context encCtx, String encName, UnifiedServiceRefMetaData serviceRef) throws NamingException
+ {
+ String serviceRefName = serviceRef.getServiceRefName();
+ ServiceReferenceable ref = new ServiceReferenceable(serviceRef);
+
+ // Do not use rebind, the binding should be unique
+ Util.bind(encCtx, encName, ref);
+
+ log.debug("<service-ref> bound to: java:comp/env/" + serviceRefName);
+ }
+}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -26,7 +26,6 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.io.ObjectOutputStream;
import java.net.URL;
@@ -37,12 +36,11 @@
import javax.naming.StringRefAddr;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.UnifiedVirtualFile;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
@@ -61,25 +59,20 @@
private static Logger log = Logger.getLogger(ServiceReferenceable.class);
public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
- public static final String DEPLOYMENT_URL = "DEPLOYMENT_URL";
public static final String SECURITY_CONFIG = "SECURITY_CONFIG";
- public static final String DESCRIPTOR_LOC = "DESCRIPTOR_LOC";
public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
public static final String PORT_COMPONENT_LINK_SERVLET = "PORT_COMPONENT_LINK_SERVLET";
private UnifiedServiceRefMetaData refMetaData;
- private UnifiedDeploymentInfo udi;
+ private UnifiedVirtualFile vfsRoot;
/**
* A service referenceable for a WSDL document that is part of the deployment
- *
- * @param refMetaData The service-ref meta data
- * @param udi The client DeploymentInfo
*/
- public ServiceReferenceable(UnifiedServiceRefMetaData refMetaData, UnifiedDeploymentInfo udi)
+ public ServiceReferenceable(UnifiedServiceRefMetaData refMetaData)
{
this.refMetaData = refMetaData;
- this.udi = udi;
+ this.vfsRoot = refMetaData.getVfsRoot();
}
/**
@@ -92,11 +85,6 @@
{
Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
- // The deployment URL of the web service client deployment
- // Add a reference to the client deployment URL
- String deploymentID = udi.name;
- myRef.add(new StringRefAddr(DEPLOYMENT_URL, deploymentID));
-
// Add a reference to the ServiceRefMetaData and WSDLDefinitions
myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
@@ -105,10 +93,8 @@
myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
// Add references to port component links
- UnifiedPortComponentRefMetaData[] pcrArr = refMetaData.getPortComponentRefs();
- for (int i = 0; i < pcrArr.length; i++)
+ for (UnifiedPortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
{
- UnifiedPortComponentRefMetaData pcr = pcrArr[i];
String pcLink = pcr.getPortComponentLink();
if (pcLink != null)
{
@@ -137,8 +123,6 @@
*/
private byte[] marshallServiceRef() throws NamingException
{
- refMetaData.getJavaWsdlMapping();
-
ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
try
{
@@ -161,8 +145,8 @@
try
{
ObjectOutputStream oos = new ObjectOutputStream(baos);
- URL vfConfig = getSecurityConfig();
- WSSecurityConfiguration securityConfig = WSSecurityOMFactory.newInstance().parse(vfConfig);
+ WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
+ WSSecurityConfiguration securityConfig = factory.parse(getSecurityConfig());
oos.writeObject(securityConfig);
oos.close();
}
@@ -175,19 +159,23 @@
private URL getSecurityConfig()
{
- String descriptorPath = udi.metaData instanceof UnifiedWebMetaData ? "WEB-INF" : "META-INF";
- descriptorPath = descriptorPath + "/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
+ URL securityConfigURL = null;
try
{
- URL vfConfig = udi.getMetaDataFileURL(descriptorPath);
- InputStream inputStream = vfConfig.openStream();
- inputStream.close();
- return vfConfig;
+ vfsRoot.findChild("WEB-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
}
catch (IOException ex)
{
- if(log.isDebugEnabled()) log.debug("Cannot find security config: " + descriptorPath);
- return null;
+ // ignore
}
+ try
+ {
+ vfsRoot.findChild("META-INF/" + WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ }
+ catch (IOException ex)
+ {
+ // ignore
+ }
+ return securityConfigURL;
}
}
\ No newline at end of file
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -38,10 +38,10 @@
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
/** Delegates to JAXRPC handlers
@@ -158,7 +158,7 @@
handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
HashMap<String, Object> hConfig = new HashMap<String, Object>();
- for (HandlerInitParam param : jaxrpcMetaData.getInitParams())
+ for (UnifiedInitParamMetaData param : jaxrpcMetaData.getInitParams())
{
hConfig.put(param.getParamName(), param.getParamValue());
}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,187 +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.ws.core.jaxws;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxws.client.NameValuePair;
-import org.jboss.ws.core.jaxws.client.PortInfo;
-import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * An ObjectModelFactory for UnifiedServiceRef
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2007
- */
-public class UnifiedServiceRefObjectFactory implements ObjectModelFactory
-{
- // Hide constructor
- private UnifiedServiceRefObjectFactory()
- {
- }
-
- public static UnifiedServiceRefObjectFactory newInstance()
- {
- return new UnifiedServiceRefObjectFactory();
- }
-
- public UnifiedServiceRef parse(Source source)
- {
- // setup the XML binding Unmarshaller
- try
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- StreamResult result = new StreamResult(baos);
- TransformerFactory tf = TransformerFactory.newInstance();
- tf.newTransformer().transform(source, result);
-
- InputStream is = new ByteArrayInputStream(baos.toByteArray());
-
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- return (UnifiedServiceRef)unmarshaller.unmarshal(is, this, null);
- }
- catch (Exception ex)
- {
- WSException.rethrow(ex);
- return null;
- }
- }
-
- /**
- * This method is called on the factory by the object model builder when the parsing starts.
- */
- public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- return new UnifiedServiceRef();
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
- {
- return root;
- }
-
- public void setValue(UnifiedServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-ref-name"))
- {
- ref.setServiceRefName(value);
- }
- else if (localName.equals("service-class-name"))
- {
- ref.setServiceClassName(value);
- }
- else if (localName.equals("service-qname"))
- {
- ref.setServiceQName(QName.valueOf(value));
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- else if (localName.equals("handler-chain"))
- {
- ref.setHandlerChain(value);
- }
- else if (localName.equals("wsdl-override"))
- {
- ref.setWsdlLocation(value);
- }
- }
-
- public Object newChild(UnifiedServiceRef parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
-
- if (localName.equals("port-info"))
- child = new PortInfo(parent);
-
- return child;
- }
-
- public void addChild(UnifiedServiceRef parent, PortInfo portInfo, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.getPortInfos().add(portInfo);
- }
-
- public void setValue(PortInfo portInfo, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-endpoint-interface"))
- {
- portInfo.setServiceEndpointInterface(value);
- }
- else if (localName.equals("port-qname"))
- {
- portInfo.setPortQName(QName.valueOf(value));
- }
- else if (localName.equals("config-name"))
- {
- portInfo.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- portInfo.setConfigFile(value);
- }
- }
-
- public Object newChild(PortInfo portInfo, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("stub-property"))
- child = new NameValuePair();
- return child;
- }
-
- public void addChild(PortInfo parent, NameValuePair stubProp, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.getStubProperties().add(stubProp);
- }
-
- public void setValue(NameValuePair nvPair, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("name"))
- {
- nvPair.setName(value);
- }
- else if (localName.equals("value"))
- {
- nvPair.setValue(value);
- }
- }
-}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,200 +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.ws.core.jaxws;
-
-// $Id$
-
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jws.HandlerChain;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.transform.Source;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.UnifiedVirtualFile;
-import org.jboss.ws.core.jaxws.client.ServiceReferenceable;
-import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
-
-/**
- * Binds a JAXWS Service object in the client's ENC
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2007
- */
-public class UnifiedWebServiceRefHandler
-{
- // logging support
- private static Logger log = Logger.getLogger(UnifiedWebServiceRefHandler.class);
-
- protected void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedVirtualFile vfsRoot, Source metadata) throws NamingException
- {
- WebServiceRef wsref = null;
-
- // Build the list of @WebServiceRef relevant annotations
- List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
- for (Annotation an : anElement.getAnnotations())
- {
- if (an instanceof WebServiceRef)
- wsrefList.add((WebServiceRef)an);
-
- if (an instanceof WebServiceRefs)
- {
- WebServiceRefs wsrefs = (WebServiceRefs)an;
- for (WebServiceRef aux : wsrefs.value())
- wsrefList.add(aux);
- }
- }
-
- // Use the single @WebServiceRef
- if (wsrefList.size() == 1)
- {
- wsref = wsrefList.get(0);
- }
- else
- {
- for (WebServiceRef aux : wsrefList)
- {
- if (encName.endsWith("/" + aux.name()))
- {
- wsref = aux;
- break;
- }
- }
- }
-
- if (wsref == null)
- throw new IllegalArgumentException("@WebServiceRef must be present on: " + anElement);
-
- Class targetClass = null;
- if (anElement instanceof Field)
- targetClass = ((Field)anElement).getType();
- else if (anElement instanceof Method)
- targetClass = ((Method)anElement).getParameterTypes()[0];
-
- String externalName = encCtx.getNameInNamespace() + "/" + encName;
- String targetClassName = (targetClass != null ? targetClass.getName() : null);
- log.debug("setupWebServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
-
- String serviceClassName = null;
-
- // #1 Use the explicit @WebServiceRef.value
- if (wsref.value() != Object.class)
- serviceClassName = wsref.value().getName();
-
- // #2 Use the target ref type
- if (serviceClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
- serviceClassName = targetClass.getName();
-
- // #3 Use javax.xml.ws.Service
- if (serviceClassName == null)
- serviceClassName = Service.class.getName();
-
- // #1 Use the explicit @WebServiceRef.type
- if (wsref.type() != Object.class)
- targetClassName = wsref.type().getName();
-
- // #2 Use the target ref type
- if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
- targetClassName = targetClass.getName();
-
- try
- {
- UnifiedServiceRefObjectFactory factory = UnifiedServiceRefObjectFactory.newInstance();
- UnifiedServiceRef usRef = factory.parse(metadata);
- usRef.setRootFile(vfsRoot);
-
- // Set the wsdlLocation if there is no override already
- if (usRef.getWsdlLocation() == null && wsref.wsdlLocation().length() > 0)
- usRef.setWsdlLocation(wsref.wsdlLocation());
-
- // Set the handlerChain from @HandlerChain on the annotated element
- String handlerChain = usRef.getHandlerChain();
- HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
- if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
- handlerChain = anHandlerChain.file();
-
- // Resolve path to handler chain
- if (handlerChain != null)
- {
- try
- {
- new URL(handlerChain);
- }
- catch (MalformedURLException ex)
- {
- Class declaringClass = null;
- if (anElement instanceof Field)
- declaringClass = ((Field)anElement).getDeclaringClass();
- else if (anElement instanceof Method)
- declaringClass = ((Method)anElement).getDeclaringClass();
- else if (anElement instanceof Class)
- declaringClass = (Class)anElement;
-
- handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
- }
-
- usRef.setHandlerChain(handlerChain);
- }
-
- // Do not use rebind, the binding should be unique
- // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
- Util.rebind(encCtx, encName, new ServiceReferenceable(serviceClassName, targetClassName, usRef));
-
- log.debug("<service-ref> bound to: java:comp/env/" + encName);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot bind web service ref: " + encName, ex);
- }
- }
-
- private boolean findHandlerChain(UnifiedVirtualFile vfsRoot, String handlerChain)
- {
- try
- {
- vfsRoot.findChild(handlerChain);
- return true;
- }
- catch (IOException io)
- {
- return false;
- }
- }
-}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,102 +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.ws.core.jaxws.client;
-
-//$Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-/**
- * Represents a <port-info> element in <service-ref>
- *
- * @author Thomas.Diesler(a)jboss.com
- */
-public class PortInfo implements Serializable
-{
- private static final long serialVersionUID = -5517739021682888778L;
-
- private UnifiedServiceRef serviceRef;
- private String serviceEndpointInterface;
- private QName portQName;
- private String configName;
- private String configFile;
- private List<NameValuePair> stubProperties = new ArrayList<NameValuePair>();
-
- public PortInfo(UnifiedServiceRef serviceRef)
- {
- this.serviceRef = serviceRef;
- }
-
- public UnifiedServiceRef getServiceRef()
- {
- return serviceRef;
- }
-
- public QName getPortQName()
- {
- return portQName;
- }
-
- public void setPortQName(QName portName)
- {
- this.portQName = portName;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public void setServiceEndpointInterface(String serviceEndpointInterface)
- {
- this.serviceEndpointInterface = serviceEndpointInterface;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public List<NameValuePair> getStubProperties()
- {
- return stubProperties;
- }
-}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -25,13 +25,11 @@
// $Id$
import java.io.ByteArrayInputStream;
-import java.io.File;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.Hashtable;
@@ -47,7 +45,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.ConfigProvider;
-import org.jboss.ws.core.UnifiedVirtualFile;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
/**
* This ServiceObjectFactory reconstructs a javax.xml.ws.Service
@@ -61,8 +59,8 @@
// provide logging
private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
- // The UnifiedServiceRef association
- private static ThreadLocal serviceRefAssociation = new ThreadLocal();
+ // The ServiceRefMetaData association
+ private static ThreadLocal<UnifiedServiceRefMetaData> serviceRefAssociation = new ThreadLocal<UnifiedServiceRefMetaData>();
/**
* Creates an object using the location or reference information specified.
@@ -94,23 +92,23 @@
String targetClassName = (String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
// Unmarshall the UnifiedServiceRef
- UnifiedServiceRef usRef = unmarshallServiceRef(ref);
- String serviceRefName = usRef.getServiceRefName();
- QName serviceQName = usRef.getServiceQName();
+ UnifiedServiceRefMetaData serviceRef = unmarshallServiceRef(ref);
+ String serviceRefName = serviceRef.getServiceRefName();
+ QName serviceQName = serviceRef.getServiceQName();
- String serviceClassName = usRef.getServiceClassName();
- if (serviceClassName == null)
- serviceClassName = (String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
+ String serviceImplClass = serviceRef.getServiceImplClass();
+ if (serviceImplClass == null)
+ serviceImplClass = (String)ref.get(ServiceReferenceable.SERVICE_IMPL_CLASS).getContent();
// If the target defaults to javax.xml.ws.Service, user the service as the target
if (Service.class.getName().equals(targetClassName))
- targetClassName = serviceClassName;
+ targetClassName = serviceImplClass;
- if(log.isDebugEnabled()) log.debug("[name=" + serviceRefName + ",service=" + serviceClassName + ",target=" + targetClassName + "]");
+ if(log.isDebugEnabled()) log.debug("[name=" + serviceRefName + ",service=" + serviceImplClass + ",target=" + targetClassName + "]");
// Load the service class
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- Class serviceClass = ctxLoader.loadClass(serviceClassName);
+ Class serviceClass = ctxLoader.loadClass(serviceImplClass);
Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
if (Service.class.isAssignableFrom(serviceClass) == false)
@@ -120,12 +118,11 @@
Object target;
// Get the URL to the wsdl
- URL wsdlURL = getWsdlLocationURL(targetClass != null ? targetClass : serviceClass, usRef);
-
+ URL wsdlURL = serviceRef.getWsdlLocation();
try
{
- // Associate the UnifiedServiceRef with this thread
- serviceRefAssociation.set(usRef);
+ // Associate the ServiceRefMetaData with this thread
+ serviceRefAssociation.set(serviceRef);
// Generic javax.xml.ws.Service
if (serviceClass == Service.class)
@@ -159,9 +156,9 @@
}
// Configure the service
- configureService((Service)target, usRef);
+ configureService((Service)target, serviceRef);
- if (targetClassName != null && targetClassName.equals(serviceClassName) == false)
+ if (targetClassName != null && targetClassName.equals(serviceImplClass) == false)
{
try
{
@@ -203,16 +200,16 @@
}
}
- public static UnifiedServiceRef getUnifiedServiceRefAssociation()
+ public static UnifiedServiceRefMetaData getServiceRefAssociation()
{
// The ServiceDelegateImpl get the usRef at ctor time
- return (UnifiedServiceRef)serviceRefAssociation.get();
+ return (UnifiedServiceRefMetaData)serviceRefAssociation.get();
}
- private void configureService(Service service, UnifiedServiceRef usRef)
+ private void configureService(Service service, UnifiedServiceRefMetaData serviceRef)
{
- String configFile = usRef.getConfigFile();
- String configName = usRef.getConfigName();
+ String configFile = serviceRef.getConfigFile();
+ String configName = serviceRef.getConfigName();
if (service instanceof ConfigProvider)
{
if(log.isDebugEnabled()) log.debug("Configure Service: [configName=" + configName + ",configFile=" + configFile + "]");
@@ -223,15 +220,15 @@
}
}
- private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
+ private UnifiedServiceRefMetaData unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
{
- UnifiedServiceRef sref;
- RefAddr refAddr = ref.get(ServiceReferenceable.UNIFIED_SERVICE_REF);
+ UnifiedServiceRefMetaData sref;
+ RefAddr refAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
ByteArrayInputStream bais = new ByteArrayInputStream((byte[])refAddr.getContent());
try
{
ObjectInputStream ois = new ObjectInputStream(bais);
- sref = (UnifiedServiceRef)ois.readObject();
+ sref = (UnifiedServiceRefMetaData)ois.readObject();
ois.close();
}
catch (IOException e)
@@ -240,71 +237,4 @@
}
return sref;
}
-
- private URL getWsdlLocationURL(Class userClass, UnifiedServiceRef usRef)
- {
- UnifiedVirtualFile vfsRoot = usRef.getRootFile();
- String wsdlLocation = usRef.getWsdlLocation();
-
- URL wsdlURL = null;
- if (wsdlLocation != null)
- {
- // Try the wsdlLocation as URL
- try
- {
- wsdlURL = new URL(wsdlLocation);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (wsdlURL == null)
- {
- try
- {
- File file = new File(wsdlLocation);
- if (file.exists())
- wsdlURL = file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (wsdlURL == null)
- {
- try
- {
- wsdlURL = vfsRoot.findChild(wsdlLocation).toURL();
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
-
- // Try the filename relative to class
- if (wsdlURL == null)
- {
- String packagePath = userClass.getPackage().getName().replace('.', '/');
- String wsdlPath = packagePath + "/" + wsdlLocation;
- try
- {
- wsdlURL = vfsRoot.findChild(wsdlPath).toURL();
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
-
- if (wsdlURL == null)
- throw new IllegalArgumentException("Cannot get URL for: " + wsdlLocation);
- }
- return wsdlURL;
- }
}
Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java (from rev 2540, branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,170 @@
+/*
+ * 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.ws.core.jaxws.client;
+
+// $Id$
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jws.HandlerChain;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * Binds a JAXWS Service object in the client's ENC
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public class ServiceRefHandlerJAXWS
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ServiceRefHandlerJAXWS.class);
+
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
+ {
+ WebServiceRef wsref = null;
+
+ // Build the list of @WebServiceRef relevant annotations
+ List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
+ if (anElement != null)
+ {
+ for (Annotation an : anElement.getAnnotations())
+ {
+ if (an instanceof WebServiceRef)
+ wsrefList.add((WebServiceRef)an);
+
+ if (an instanceof WebServiceRefs)
+ {
+ WebServiceRefs wsrefs = (WebServiceRefs)an;
+ for (WebServiceRef aux : wsrefs.value())
+ wsrefList.add(aux);
+ }
+ }
+ }
+
+ // Use the single @WebServiceRef
+ if (wsrefList.size() == 1)
+ {
+ wsref = wsrefList.get(0);
+ }
+ else
+ {
+ for (WebServiceRef aux : wsrefList)
+ {
+ if (encName.endsWith("/" + aux.name()))
+ {
+ wsref = aux;
+ break;
+ }
+ }
+ }
+
+ Class targetClass = null;
+ if (anElement instanceof Field)
+ targetClass = ((Field)anElement).getType();
+ else if (anElement instanceof Method)
+ targetClass = ((Method)anElement).getParameterTypes()[0];
+
+ String externalName = encCtx.getNameInNamespace() + "/" + encName;
+ String targetClassName = (targetClass != null ? targetClass.getName() : null);
+ log.debug("setupWebServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
+
+ String serviceImplClass = null;
+
+ // #1 Use the explicit @WebServiceRef.value
+ if (wsref != null && wsref.value() != Object.class)
+ serviceImplClass = wsref.value().getName();
+
+ // #2 Use the target ref type
+ if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
+ serviceImplClass = targetClass.getName();
+
+ // #3 Use javax.xml.ws.Service
+ if (serviceImplClass == null)
+ serviceImplClass = Service.class.getName();
+
+ // #1 Use the explicit @WebServiceRef.type
+ if (wsref != null && wsref.type() != Object.class)
+ targetClassName = wsref.type().getName();
+
+ // #2 Use the target ref type
+ if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
+ targetClassName = targetClass.getName();
+
+ // Set the wsdlLocation if there is no override already
+ if (serviceRef.getWsdlOverride() == null && wsref != null && wsref.wsdlLocation().length() > 0)
+ serviceRef.setWsdlOverride(wsref.wsdlLocation());
+
+ // Set the handlerChain from @HandlerChain on the annotated element
+ String handlerChain = serviceRef.getHandlerChain();
+ if (anElement != null)
+ {
+ HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
+ if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
+ handlerChain = anHandlerChain.file();
+ }
+
+ // Resolve path to handler chain
+ if (handlerChain != null)
+ {
+ try
+ {
+ new URL(handlerChain);
+ }
+ catch (MalformedURLException ex)
+ {
+ Class declaringClass = null;
+ if (anElement instanceof Field)
+ declaringClass = ((Field)anElement).getDeclaringClass();
+ else if (anElement instanceof Method)
+ declaringClass = ((Method)anElement).getDeclaringClass();
+ else if (anElement instanceof Class)
+ declaringClass = (Class)anElement;
+
+ handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
+ }
+
+ serviceRef.setHandlerChain(handlerChain);
+ }
+
+ // Do not use rebind, the binding should be unique
+ // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
+ Util.rebind(encCtx, encName, new ServiceReferenceable(serviceImplClass, targetClassName, serviceRef));
+
+ log.debug("<service-ref> bound to: java:comp/env/" + encName);
+ }
+}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -34,7 +34,9 @@
import javax.naming.Referenceable;
import javax.naming.StringRefAddr;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
/**
* A JNDI reference to a javax.xml.ws.Service
*
@@ -46,19 +48,19 @@
*/
public class ServiceReferenceable implements Referenceable
{
- public static final String UNIFIED_SERVICE_REF = "UNIFIED_SERVICE_REF";
- public static final String SERVICE_CLASS_NAME = "SERVICE_CLASS_NAME";
+ public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
+ public static final String SERVICE_IMPL_CLASS = "SERVICE_CLASS_NAME";
public static final String TARGET_CLASS_NAME = "TARGET_CLASS_NAME";
- private String serviceClassName;
+ private String serviceImplClass;
private String targetClassName;
- private UnifiedServiceRef usRef;
+ private UnifiedServiceRefMetaData serviceRef;
- public ServiceReferenceable(String serviceClassName, String targetClassName, UnifiedServiceRef usRef)
+ public ServiceReferenceable(String serviceImplClass, String targetClassName, UnifiedServiceRefMetaData serviceRef)
{
- this.serviceClassName = serviceClassName;
+ this.serviceImplClass = serviceImplClass;
this.targetClassName = targetClassName;
- this.usRef = usRef;
+ this.serviceRef = serviceRef;
}
/**
@@ -71,9 +73,9 @@
{
Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
- myRef.add(new StringRefAddr(SERVICE_CLASS_NAME, serviceClassName));
+ myRef.add(new StringRefAddr(SERVICE_IMPL_CLASS, serviceImplClass));
myRef.add(new StringRefAddr(TARGET_CLASS_NAME, targetClassName));
- myRef.add(new BinaryRefAddr(UNIFIED_SERVICE_REF, marshall(usRef)));
+ myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshall(serviceRef)));
return myRef;
}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,147 +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.ws.core.jaxws.client;
-
-//$Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.core.UnifiedVirtualFile;
-
-/**
- * Represents a <service-ref> element of the jboss.xml, jboss-web.xml, jboss-client.xml
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 16-Dec-2006
- */
-public class UnifiedServiceRef implements Serializable
-{
- private static final long serialVersionUID = -6242639118713373752L;
-
- private UnifiedVirtualFile vfsRoot;
- private String serviceRefName;
- private String serviceClassName;
- private QName serviceQName;
- private String configName;
- private String configFile;
- private String handlerChain;
- private List<PortInfo> portInfos = new ArrayList<PortInfo>();
- private String wsdlLocation;
-
- public UnifiedVirtualFile getRootFile()
- {
- return vfsRoot;
- }
-
- public void setRootFile(UnifiedVirtualFile vfsRoot)
- {
- this.vfsRoot = vfsRoot;
- }
-
- public String getServiceRefName()
- {
- return serviceRefName;
- }
-
- public void setServiceRefName(String name)
- {
- this.serviceRefName = name;
- }
-
- public String getServiceClassName()
- {
- return serviceClassName;
- }
-
- public void setServiceClassName(String serviceClassName)
- {
- this.serviceClassName = serviceClassName;
- }
-
- public QName getServiceQName()
- {
- return serviceQName;
- }
-
- public void setServiceQName(QName serviceQName)
- {
- this.serviceQName = serviceQName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public String getHandlerChain()
- {
- return handlerChain;
- }
-
- public void setHandlerChain(String handlerChain)
- {
- this.handlerChain = handlerChain;
- }
-
- public List<PortInfo> getPortInfos()
- {
- return portInfos;
- }
-
- public String getWsdlLocation()
- {
- return wsdlLocation;
- }
-
- public void setWsdlLocation(String wsdlLocation)
- {
- this.wsdlLocation = wsdlLocation;
- }
-
- public String toString()
- {
- StringBuffer sb = new StringBuffer(100);
- sb.append("[");
- sb.append("name=").append(serviceRefName);
- sb.append("]");
- return sb.toString();
- }
-}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -52,12 +52,12 @@
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
import org.jboss.ws.core.jaxws.client.DispatchImpl;
-import org.jboss.ws.core.jaxws.client.NameValuePair;
-import org.jboss.ws.core.jaxws.client.PortInfo;
import org.jboss.ws.core.jaxws.client.ServiceObjectFactory;
-import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
import org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
@@ -83,8 +83,8 @@
private static ExecutorService defaultExecutor = Executors.newCachedThreadPool();
// The service meta data that is associated with this JAXWS Service
private ServiceMetaData serviceMetaData;
- // The UnifiedServiceRef supplied by the ServiceObjectFactory
- private UnifiedServiceRef usRef;
+ // The ServiceRefMetaData supplied by the ServiceObjectFactory
+ private UnifiedServiceRefMetaData usRef;
// The handler resolver
private HandlerResolver handlerResolver = new HandlerResolverImpl();
// The executor service
@@ -95,11 +95,11 @@
public ServiceDelegateImpl(URL wsdlURL, QName serviceName)
{
- usRef = ServiceObjectFactory.getUnifiedServiceRefAssociation();
+ usRef = ServiceObjectFactory.getServiceRefAssociation();
UnifiedVirtualFile vfsRoot;
if(usRef!=null)
- vfsRoot = usRef.getRootFile();
+ vfsRoot = usRef.getVfsRoot();
else
vfsRoot = new ResourceLoaderAdapter();
@@ -351,7 +351,7 @@
String seiName = epMetaData.getServiceEndpointInterfaceName();
QName portName = epMetaData.getPortName();
- if(usRef == null || usRef.getPortInfos().size() == 0)
+ if(usRef == null || usRef.getPortComponentRefs().size() == 0)
{
if(log.isDebugEnabled()) log.debug("No port configuration for: " + portName);
return;
@@ -361,7 +361,7 @@
String configName = usRef.getConfigName();
boolean match = false;
- for (PortInfo pi : usRef.getPortInfos())
+ for (UnifiedPortComponentRefMetaData pi : usRef.getPortComponentRefs())
{
String piSEI = pi.getServiceEndpointInterface();
QName piPort = pi.getPortQName();
@@ -382,10 +382,10 @@
BindingProvider bp = (BindingProvider)stub;
Map<String, Object> reqCtx = bp.getRequestContext();
- for (NameValuePair nvp : pi.getStubProperties())
+ for (UnifiedStubPropertyMetaData prop : pi.getStubProperties())
{
- if(log.isDebugEnabled()) log.debug("Set stub property: " + nvp);
- reqCtx.put(nvp.getName(), nvp.getValue());
+ log.debug("Set stub property: " + prop);
+ reqCtx.put(prop.getPropName(), prop.getPropValue());
}
break;
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -33,8 +33,8 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.UnifiedVirtualFile;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -32,7 +32,7 @@
import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -23,8 +23,38 @@
// $Id$
-import com.sun.xml.bind.api.JAXBRIContext;
-import com.sun.xml.bind.api.TypeReference;
+import java.io.File;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import javax.jws.HandlerChain;
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPMessageHandlers;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.bind.JAXBException;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+import javax.xml.ws.WebFault;
+import javax.xml.ws.addressing.Action;
+import javax.xml.ws.addressing.AddressingProperties;
+
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -39,43 +69,29 @@
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.metadata.acessor.JAXBAccessor;
import org.jboss.ws.metadata.builder.MetaDataBuilder;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.jsr181.HandlerChainFactory;
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.metadata.jsr181.HandlerChainsMetaData;
-import org.jboss.ws.metadata.umdm.*;
+import org.jboss.ws.metadata.j2ee.serviceref.HandlerChainsObjectFactory;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.FaultMetaData;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.metadata.umdm.TypeMappingMetaData;
+import org.jboss.ws.metadata.umdm.TypesMetaData;
+import org.jboss.ws.metadata.umdm.WrappedParameter;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.metadata.wsdl.*;
+import org.jboss.ws.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.metadata.wsdl.WSDLBindingMessageReference;
+import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLMIMEPart;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
-import javax.jws.*;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.jws.soap.SOAPMessageHandlers;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.ws.BindingType;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-import javax.xml.ws.WebFault;
-import javax.xml.ws.addressing.Action;
-import javax.xml.ws.addressing.AddressingProperties;
-import java.io.File;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
+import com.sun.xml.bind.api.JAXBRIContext;
+import com.sun.xml.bind.api.TypeReference;
/**
* Abstract class that represents a JAX-WS metadata builder.
@@ -198,7 +214,7 @@
try
{
- HandlerChainsMetaData handlerChainsMetaData = null;
+ UnifiedHandlerChainsMetaData UnifiedHandlerChainsMetaData = null;
InputStream is = fileURL.openStream();
try
{
@@ -206,8 +222,8 @@
unmarshaller.setValidation(true);
unmarshaller.setSchemaValidation(true);
unmarshaller.setEntityResolver(new JBossWSEntityResolver());
- ObjectModelFactory factory = new HandlerChainFactory();
- handlerChainsMetaData = (HandlerChainsMetaData)unmarshaller.unmarshal(is, factory, null);
+ ObjectModelFactory factory = new HandlerChainsObjectFactory();
+ UnifiedHandlerChainsMetaData = (UnifiedHandlerChainsMetaData)unmarshaller.unmarshal(is, factory, null);
}
finally
{
@@ -215,9 +231,9 @@
}
// Setup the endpoint handlers
- for (HandlerChainMetaData handlerChainMetaData : handlerChainsMetaData.getHandlerChains())
+ for (UnifiedHandlerChainMetaData UnifiedHandlerChainMetaData : UnifiedHandlerChainsMetaData.getHandlerChains())
{
- for (UnifiedHandlerMetaData uhmd : handlerChainMetaData.getHandlers())
+ for (UnifiedHandlerMetaData uhmd : UnifiedHandlerChainMetaData.getHandlers())
{
epMetaData.addHandler(uhmd.getHandlerMetaDataJAXWS(epMetaData, HandlerType.ENDPOINT));
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -31,9 +31,9 @@
import org.jboss.ws.metadata.config.jaxrpc.CommonConfigJAXRPC;
import org.jboss.ws.metadata.config.jaxrpc.ConfigRootJAXRPC;
import org.jboss.ws.metadata.config.jaxrpc.EndpointConfigJAXRPC;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
@@ -115,13 +115,13 @@
if ("pre-handler-chain".equals(localName))
{
- HandlerChainMetaData preHandlerChain = new HandlerChainMetaData(null);
+ UnifiedHandlerChainMetaData preHandlerChain = new UnifiedHandlerChainMetaData(null);
commonConfig.setPreHandlerChain(preHandlerChain);
return preHandlerChain;
}
if ("post-handler-chain".equals(localName))
{
- HandlerChainMetaData postHandlerChain = new HandlerChainMetaData(null);
+ UnifiedHandlerChainMetaData postHandlerChain = new UnifiedHandlerChainMetaData(null);
commonConfig.setPostHandlerChain(postHandlerChain);
return postHandlerChain;
}
@@ -131,13 +131,13 @@
/**
* Called when parsing of a new element started.
*/
- public Object newChild(HandlerChainMetaData handlerChainMetaData, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ public Object newChild(UnifiedHandlerChainMetaData UnifiedHandlerChainMetaData, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
log.trace("WSHandlerChainConfig newChild: " + localName);
if ("handler".equals(localName))
{
- UnifiedHandlerMetaData handler = new UnifiedHandlerMetaData(handlerChainMetaData);
- List<UnifiedHandlerMetaData> handlers = handlerChainMetaData.getHandlers();
+ UnifiedHandlerMetaData handler = new UnifiedHandlerMetaData(UnifiedHandlerChainMetaData);
+ List<UnifiedHandlerMetaData> handlers = UnifiedHandlerChainMetaData.getHandlers();
handlers.add(handler);
return handler;
}
@@ -167,7 +167,7 @@
/**
* Called when a new simple child element with text value was read from the XML content.
*/
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ public void setValue(UnifiedInitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
if (log.isTraceEnabled())
log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI + " localName=" + localName + " value=" + value);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXWS.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -30,8 +30,8 @@
import org.jboss.ws.metadata.config.jaxws.ConfigRootJAXWS;
import org.jboss.ws.metadata.config.jaxws.EndpointConfigJAXWS;
import org.jboss.ws.metadata.config.jaxws.HandlerChainsConfigJAXWS;
-import org.jboss.ws.metadata.jsr181.HandlerChainFactory;
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.HandlerChainsObjectFactory;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
@@ -42,7 +42,7 @@
* @author Heiko.Braun(a)jboss.org
* @since 18-Dec-2005
*/
-public class OMFactoryJAXWS extends HandlerChainFactory
+public class OMFactoryJAXWS extends HandlerChainsObjectFactory
{
// provide logging
private final Logger log = Logger.getLogger(OMFactoryJAXWS.class);
@@ -135,7 +135,7 @@
if ("handler-chain".equals(localName))
{
- HandlerChainMetaData handlerChain = new HandlerChainMetaData(null);
+ UnifiedHandlerChainMetaData handlerChain = new UnifiedHandlerChainMetaData(null);
handlerChains.getHandlerChains().add(handlerChain);
return handlerChain;
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxrpc/CommonConfigJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxrpc/CommonConfigJAXRPC.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxrpc/CommonConfigJAXRPC.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -25,8 +25,8 @@
import java.util.List;
import org.jboss.ws.metadata.config.CommonConfig;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
@@ -42,25 +42,25 @@
*/
public abstract class CommonConfigJAXRPC extends CommonConfig
{
- private HandlerChainMetaData preHandlerChain;
- private HandlerChainMetaData postHandlerChain;
+ private UnifiedHandlerChainMetaData preHandlerChain;
+ private UnifiedHandlerChainMetaData postHandlerChain;
- public HandlerChainMetaData getPostHandlerChain()
+ public UnifiedHandlerChainMetaData getPostHandlerChain()
{
return postHandlerChain;
}
- public void setPostHandlerChain(HandlerChainMetaData postHandlerChain)
+ public void setPostHandlerChain(UnifiedHandlerChainMetaData postHandlerChain)
{
this.postHandlerChain = postHandlerChain;
}
- public HandlerChainMetaData getPreHandlerChain()
+ public UnifiedHandlerChainMetaData getPreHandlerChain()
{
return preHandlerChain;
}
- public void setPreHandlerChain(HandlerChainMetaData preHandlerChain)
+ public void setPreHandlerChain(UnifiedHandlerChainMetaData preHandlerChain)
{
this.preHandlerChain = preHandlerChain;
}
@@ -70,7 +70,7 @@
{
List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
- HandlerChainMetaData handlerChain;
+ UnifiedHandlerChainMetaData handlerChain;
if (type == HandlerType.PRE)
handlerChain = getPreHandlerChain();
else if (type == HandlerType.POST)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/CommonConfigJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/CommonConfigJAXWS.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/CommonConfigJAXWS.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -25,8 +25,8 @@
import java.util.List;
import org.jboss.ws.metadata.config.CommonConfig;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
@@ -77,9 +77,9 @@
if (handlerChains != null)
{
- for (HandlerChainMetaData handlerChainMetaData : handlerChains.getHandlerChains())
+ for (UnifiedHandlerChainMetaData handlerChain : handlerChains.getHandlerChains())
{
- for (UnifiedHandlerMetaData uhmd : handlerChainMetaData.getHandlers())
+ for (UnifiedHandlerMetaData uhmd : handlerChain.getHandlers())
{
handlers.add(uhmd.getHandlerMetaDataJAXWS(epMetaData, type));
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/HandlerChainsConfigJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/HandlerChainsConfigJAXWS.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/jaxws/HandlerChainsConfigJAXWS.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -24,9 +24,8 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
-
/**
* A JBossWS handler chains configuration
*
@@ -35,13 +34,13 @@
*/
public class HandlerChainsConfigJAXWS
{
- private List<HandlerChainMetaData> chains = new ArrayList<HandlerChainMetaData>();
+ private List<UnifiedHandlerChainMetaData> chains = new ArrayList<UnifiedHandlerChainMetaData>();
public HandlerChainsConfigJAXWS()
{
}
- public List<HandlerChainMetaData> getHandlerChains()
+ public List<UnifiedHandlerChainMetaData> getHandlerChains()
{
return chains;
}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,183 +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.ws.metadata.j2ee;
-
-//$Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-
-/**
- * The container independent metdata data for a handler element
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedHandlerMetaData implements Serializable
-{
- private static final long serialVersionUID = -3019416564080333900L;
-
- private HandlerChainMetaData chainConfig;
-
- // The required <handler-name> element
- private String handlerName;
- // The required <handler-class> element
- private String handlerClass;
- // The optional <init-param> elements
- private ArrayList<HandlerInitParam> initParams = new ArrayList<HandlerInitParam>();
- // The optional <soap-header> elements
- private Set<QName> soapHeaders = new HashSet<QName>();
- // The optional <soap-role> elements
- private Set<String> soapRoles = new HashSet<String>();
- // The optional <port-name> elements
- private Set<String> portNames = new HashSet<String>();
-
- public UnifiedHandlerMetaData(HandlerChainMetaData handlerChainMetaData)
- {
- this.chainConfig = handlerChainMetaData;
- }
-
- public void setHandlerName(String value)
- {
- this.handlerName = value;
- }
-
- public String getHandlerName()
- {
- return handlerName;
- }
-
- public void setHandlerClass(String handlerClass)
- {
- this.handlerClass = handlerClass;
- }
-
- public String getHandlerClass()
- {
- return handlerClass;
- }
-
- public void addInitParam(HandlerInitParam param)
- {
- initParams.add(param);
- }
-
- public List<HandlerInitParam> getInitParams()
- {
- return initParams;
- }
-
- public void addSoapRole(String value)
- {
- soapRoles.add(value);
- }
-
- public Set<String> getSoapRoles()
- {
- return soapRoles;
- }
-
- public void addSoapHeader(QName qName)
- {
- soapHeaders.add(qName);
- }
-
- public Set<QName> getSoapHeaders()
- {
- return soapHeaders;
- }
-
- public String getProtocolBindings()
- {
- return (chainConfig != null ? chainConfig.getProtocolBindings() : null);
- }
-
- public QName getServiceNamePattern()
- {
- return (chainConfig != null ? chainConfig.getServiceNamePattern() : null);
- }
-
- public QName getPortNamePattern()
- {
- return (chainConfig != null ? chainConfig.getPortNamePattern() : null);
- }
-
- public void addPortName(String portName)
- {
- portNames.add(portName);
- }
-
- public Set<String> getPortNames()
- {
- return portNames;
- }
-
- public HandlerMetaDataJAXRPC getHandlerMetaDataJAXRPC (EndpointMetaData epMetaData, HandlerType type)
- {
- HandlerMetaDataJAXRPC hmd = new HandlerMetaDataJAXRPC(epMetaData, type);
- hmd.setHandlerName(getHandlerName());
- hmd.setHandlerClassName(getHandlerClass());
- hmd.seiInitParams(getInitParams());
- hmd.setSoapHeaders(getSoapHeaders());
- hmd.setSoapRoles(getSoapRoles());
- hmd.setPortNames(getPortNames());
- return hmd;
- }
-
- public HandlerMetaDataJAXWS getHandlerMetaDataJAXWS (EndpointMetaData epMetaData, HandlerType type)
- {
- HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(epMetaData, type);
- hmd.setHandlerName(getHandlerName());
- hmd.setHandlerClassName(getHandlerClass());
- hmd.seiInitParams(getInitParams());
- hmd.setProtocolBindings(getProtocolBindings());
- hmd.setServiceNamePattern(getServiceNamePattern());
- hmd.setPortNamePattern(getPortNamePattern());
- return hmd;
- }
-
- public String toString()
- {
- StringBuffer buffer = new StringBuffer("\nUnifiedHandlerMetaData:");
- buffer.append("\n name=" + getHandlerName());
- buffer.append("\n class=" + getHandlerClass());
- buffer.append("\n params=" + getInitParams());
- buffer.append("\n headers=" + getSoapHeaders());
- buffer.append("\n roles=" + getSoapRoles());
- buffer.append("\n protocols=" + getProtocolBindings());
- buffer.append("\n services=" + getServiceNamePattern());
- buffer.append("\n ports=" + (getPortNamePattern() != null ? getPortNamePattern() : portNames));
- return buffer.toString();
- }
-}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,76 +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.ws.metadata.j2ee;
-
-import java.io.Serializable;
-import java.util.Properties;
-
-//$Id$
-
-/**
- * The container independent metdata data from handler init params
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedPortComponentRefMetaData implements Serializable
-{
- private static final long serialVersionUID = -7030007637678646740L;
-
- // The required <service-endpoint-interface> element
- private String serviceEndpointInterface;
- // The optional <port-component-link> element
- private String portComponentLink;
- // Arbitrary proxy properties given by <call-property>
- private Properties callProperties;
-
- public String getPortComponentLink()
- {
- return portComponentLink;
- }
-
- public void setPortComponentLink(String portComponentLink)
- {
- this.portComponentLink = portComponentLink;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public void setServiceEndpointInterface(String serviceEndpointInterface)
- {
- this.serviceEndpointInterface = serviceEndpointInterface;
- }
-
- public Properties getCallProperties()
- {
- return callProperties;
- }
-
- public void setCallProperties(Properties callProperties)
- {
- this.callProperties = callProperties;
- }
-
-}
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedServiceRefMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,210 +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.ws.metadata.j2ee;
-
-//$Id$
-
-import java.io.Serializable;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * The container independent metdata data from service-ref element in web.xml, ejb-jar.xml, and
- * application-client.xml.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedServiceRefMetaData implements Serializable
-{
- private static final long serialVersionUID = -6845188004746036291L;
-
- // The required <service-ref-name> element
- private String serviceRefName;
- // The required <service-interface> element
- private String serviceInterface;
- // The optional <wsdl-file> element
- private URL wsdlLocation;
- // The optional <jaxrpc-mapping-file> element
- private URL mappingLocation;
- // The optional <service-qname> element
- private QName serviceQName;
- // The LinkedHashMap<String, UnifiedPortComponentRefMetaData> for <port-component-ref> elements
- private Map<String, UnifiedPortComponentRefMetaData> portComponentRefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
- // The optional <handler> elements
- private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
-
- // The optional JBossWS config-name
- private String configName;
- // The optional JBossWS config-file
- private String configFile;
- /** The URL of the actual WSDL to use, <wsdl-override> */
- private URL wsdlOverride;
- /** Arbitrary proxy properties given by <call-property> */
- private Properties callProperties;
-
- // The wsdl definition, if we have one
- private Object wsdlDefinition;
- // The java/wsdl mapping, if we have one
- private Object javaWsdlMapping;
-
- public URL getMappingLocation()
- {
- return mappingLocation;
- }
-
- public void setMappingLocation(URL mappingLocation)
- {
- this.mappingLocation = mappingLocation;
- }
-
- public Object getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public void setJavaWsdlMapping(Object javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public UnifiedPortComponentRefMetaData[] getPortComponentRefs()
- {
- UnifiedPortComponentRefMetaData[] array = new UnifiedPortComponentRefMetaData[portComponentRefs.size()];
- portComponentRefs.values().toArray(array);
- return array;
- }
-
- public void setPortComponentRefs(LinkedHashMap<String, UnifiedPortComponentRefMetaData> portComponentRefs)
- {
- this.portComponentRefs = portComponentRefs;
- }
-
- public UnifiedHandlerMetaData[] getHandlers()
- {
- UnifiedHandlerMetaData[] array = new UnifiedHandlerMetaData[handlers.size()];
- handlers.toArray(array);
- return array;
- }
-
- public void setHandlers(ArrayList<UnifiedHandlerMetaData> handlers)
- {
- this.handlers = handlers;
- }
-
- public String getServiceInterface()
- {
- return serviceInterface;
- }
-
- public void setServiceInterface(String serviceInterface)
- {
- this.serviceInterface = serviceInterface;
- }
-
- public QName getServiceQName()
- {
- return serviceQName;
- }
-
- public void setServiceQName(QName serviceQName)
- {
- this.serviceQName = serviceQName;
- }
-
- public String getServiceRefName()
- {
- return serviceRefName;
- }
-
- public void setServiceRefName(String serviceRefName)
- {
- this.serviceRefName = serviceRefName;
- }
-
- public URL getWsdlLocation()
- {
- return wsdlLocation;
- }
-
- public void setWsdlLocation(URL wsdlLocation)
- {
- this.wsdlLocation = wsdlLocation;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public URL getWsdlOverride()
- {
- return wsdlOverride;
- }
-
- public void setWsdlOverride(URL wsdlOverride)
- {
- this.wsdlOverride = wsdlOverride;
- }
-
- public Properties getCallProperties()
- {
- return callProperties;
- }
-
- public void setCallProperties(Properties callProperties)
- {
- this.callProperties = callProperties;
- }
-
- public Object getWsdlDefinition()
- {
- return wsdlDefinition;
- }
-
- public void setWsdlDefinition(Object wsdlDefinition)
- {
- this.wsdlDefinition = wsdlDefinition;
- }
-}
Copied: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref (from rev 2540, branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref)
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,162 @@
+/*
+* 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A JBossXB factory for jsr181 the HandlerChain annotation
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Oct-2005
+ */
+public class HandlerChainsObjectFactory implements ObjectModelFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HandlerChainsObjectFactory.class);
+
+ public HandlerChainsObjectFactory()
+ {
+ }
+
+ /**
+ * This method is called on the factory by the object model builder when the parsing starts.
+ *
+ * @return the root of the object model.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ UnifiedHandlerChainsMetaData handlerConfigMetaData = new UnifiedHandlerChainsMetaData(HandlerType.ENDPOINT);
+ return handlerConfigMetaData;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(UnifiedHandlerChainsMetaData handlerConfig, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("handler-chain".equals(localName))
+ return new UnifiedHandlerChainMetaData(handlerConfig);
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(UnifiedHandlerChainsMetaData handlerConfig, UnifiedHandlerChainMetaData handlerChain, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handlerConfig.addHandlerChain(handlerChain);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(UnifiedHandlerChainMetaData chainConfig, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("handler".equals(localName))
+ return new UnifiedHandlerMetaData(chainConfig);
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(UnifiedHandlerChainMetaData handlerConfig, UnifiedHandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handlerConfig.addHandler(handler);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("init-param".equals(localName))
+ return new UnifiedInitParamMetaData();
+ else return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(UnifiedHandlerMetaData handler, UnifiedInitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handler.addInitParam(param);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML content.
+ */
+ public void setValue(UnifiedHandlerChainMetaData handlerChain, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedHandlerChainMetaData setValue: nuri=" + namespaceURI + " localName=" + localName + " value=" + value);
+
+ if (localName.equals("protocol-bindings"))
+ handlerChain.setProtocolBindings(value);
+ else if (localName.equals("service-name-pattern"))
+ handlerChain.setServiceNamePattern(navigator.resolveQName(value));
+ else if (localName.equals("port-name-pattern"))
+ handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML content.
+ */
+ public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedHandlerMetaData setValue: nuri=" + namespaceURI + " localName=" + localName + " value=" + value);
+
+ if (localName.equals("handler-name"))
+ handler.setHandlerName(value);
+ else if (localName.equals("handler-class"))
+ handler.setHandlerClass(value);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML content.
+ */
+ public void setValue(UnifiedInitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI + " localName=" + localName + " value=" + value);
+
+ if (localName.equals("param-name"))
+ param.setParamName(value);
+ else if (localName.equals("param-value"))
+ param.setParamValue(value);
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
===================================================================
--- branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,324 +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.ws.metadata.j2ee.serviceref;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.WSException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * An ObjectModelFactory for ServiceRefMetaData
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2007
- */
-public class ServiceRefObjectFactory implements ObjectModelFactory
-{
- // Hide constructor
- private ServiceRefObjectFactory()
- {
- }
-
- public static ServiceRefObjectFactory newInstance()
- {
- return new ServiceRefObjectFactory();
- }
-
- public ServiceRefMetaData parse(String xmlFragment)
- {
- try
- {
- InputStream is = new ByteArrayInputStream(xmlFragment.getBytes());
-
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- return (ServiceRefMetaData)unmarshaller.unmarshal(is, this, null);
- }
- catch (Exception ex)
- {
- WSException.rethrow(ex);
- return null;
- }
- }
-
- public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- return new ServiceRefMetaData();
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
- {
- return root;
- }
-
- // ********************************************************
- // START ServiceRefMetaData
-
- public void setValue(ServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- /* Standard properties */
- if (localName.equals("service-ref-name"))
- {
- ref.setServiceRefName(value);
- }
- else if (localName.equals("service-interface"))
- {
- ref.setServiceInterface(value);
- }
- else if (localName.equals("service-ref-type"))
- {
- ref.setServiceRefType(value);
- }
- else if (localName.equals("wsdl-file"))
- {
- ref.setWsdlFile(value);
- }
- else if (localName.equals("jaxrpc-mapping-file"))
- {
- ref.setMappingFile(value);
- }
- else if (localName.equals("service-qname"))
- {
- ref.setServiceQName(QName.valueOf(value));
- }
-
- /* JBoss properties */
- else if (localName.equals("service-impl-class"))
- {
- ref.setServiceImplClass(value);
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- else if (localName.equals("wsdl-override"))
- {
- ref.setWsdlOverride(value);
- }
- else if (localName.equals("handler-chain"))
- {
- ref.setHandlerChain(value);
- }
- }
-
- public Object newChild(ServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("port-component-ref"))
- child = new PortComponentRefMetaData(ref);
- else if (localName.equals("handler"))
- child = new HandlerMetaData();
- else if (localName.equals("handler-chains"))
- child = new HandlerChainsMetaData();
-
- else if (localName.equals("call-property"))
- child = new CallPropertyMetaData();
-
- return child;
- }
-
- public Object newChild(HandlerChainsMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("handler-chain"))
- child = new HandlerChainMetaData();
-
- return child;
- }
-
- public void addChild(ServiceRefMetaData parent, PortComponentRefMetaData pcRef, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.addPortComponentRef(pcRef);
- }
-
- public void addChild(ServiceRefMetaData parent, HandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.addHandler(handler);
- }
-
- public void addChild(ServiceRefMetaData parent, HandlerChainsMetaData handlerChains, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.setHandlerChains(handlerChains);
- }
-
- public void addChild(ServiceRefMetaData parent, CallPropertyMetaData callProp, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.addCallProperty(callProp);
- }
-
- public void addChild(HandlerChainsMetaData parent, HandlerChainMetaData handlerChain, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.addHandlerChain(handlerChain);
- }
-
- public void setValue(PortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-endpoint-interface"))
- {
- ref.setServiceEndpointInterface(value);
- }
- else if (localName.equals("enable-mtom"))
- {
- ref.setEnableMTOM(Boolean.valueOf(value));
- }
- else if (localName.equals("port-component-link"))
- {
- ref.setPortComponentLink(value);
- }
- else if (localName.equals("port-qname"))
- {
- ref.setPortQName(QName.valueOf(value));
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- }
-
- public Object newChild(PortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("call-property"))
- child = new CallPropertyMetaData();
- if (localName.equals("stub-property"))
- child = new StubPropertyMetaData();
- return child;
- }
-
- public void setValue(HandlerChainMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-name-pattern"))
- {
- ref.setServiceNamePattern(QName.valueOf(value));
- }
- else if (localName.equals("port-name-pattern"))
- {
- ref.setPortNamePattern(QName.valueOf(value));
- }
- else if (localName.equals("protocol-binding"))
- {
- ref.setProtocolBindings(value);
- }
- }
-
- public void setValue(HandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("handler-name"))
- {
- ref.setHandlerName(value);
- }
- else if (localName.equals("handler-class"))
- {
- ref.setHandlerClass(value);
- }
- else if (localName.equals("soap-header"))
- {
- ref.addSoapHeader(QName.valueOf(value));
- }
- else if (localName.equals("soap-role"))
- {
- ref.addSoapRole(value);
- }
- else if (localName.equals("port-name"))
- {
- ref.addPortName(value);
- }
- }
-
- public Object newChild(HandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("init-param"))
- child = new InitParamMetaData();
-
- return child;
- }
-
- public void addChild(HandlerMetaData parent, InitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.addInitParam(param);
- }
-
- public void setValue(InitParamMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("param-name"))
- {
- ref.setParamName(value);
- }
- else if (localName.equals("param-value"))
- {
- ref.setParamValue(value);
- }
- }
-
- public void setValue(CallPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- public void setValue(StubPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- public void addChild(PortComponentRefMetaData ref, CallPropertyMetaData callProp, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- ref.addCallProperty(callProp);
- }
-
- public void addChild(PortComponentRefMetaData ref, StubPropertyMetaData stubProp, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- ref.addStubProperty(stubProp);
- }
-
- // END ServiceRefMetaData
- // ********************************************************
-}
Copied: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java (from rev 2540, branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,324 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.WSException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * An ObjectModelFactory for ServiceRefMetaData
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public class ServiceRefObjectFactory implements ObjectModelFactory
+{
+ // Hide constructor
+ private ServiceRefObjectFactory()
+ {
+ }
+
+ public static ServiceRefObjectFactory newInstance()
+ {
+ return new ServiceRefObjectFactory();
+ }
+
+ public UnifiedServiceRefMetaData parse(String xmlFragment)
+ {
+ try
+ {
+ InputStream is = new ByteArrayInputStream(xmlFragment.getBytes());
+
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ return (UnifiedServiceRefMetaData)unmarshaller.unmarshal(is, this, null);
+ }
+ catch (Exception ex)
+ {
+ WSException.rethrow(ex);
+ return null;
+ }
+ }
+
+ public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ return new UnifiedServiceRefMetaData();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
+ {
+ return root;
+ }
+
+ // ********************************************************
+ // START ServiceRefMetaData
+
+ public void setValue(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ /* Standard properties */
+ if (localName.equals("service-ref-name"))
+ {
+ ref.setServiceRefName(value);
+ }
+ else if (localName.equals("service-interface"))
+ {
+ ref.setServiceInterface(value);
+ }
+ else if (localName.equals("service-ref-type"))
+ {
+ ref.setServiceRefType(value);
+ }
+ else if (localName.equals("wsdl-file"))
+ {
+ ref.setWsdlFile(value);
+ }
+ else if (localName.equals("jaxrpc-mapping-file"))
+ {
+ ref.setMappingFile(value);
+ }
+ else if (localName.equals("service-qname"))
+ {
+ ref.setServiceQName(QName.valueOf(value));
+ }
+
+ /* JBoss properties */
+ else if (localName.equals("service-impl-class"))
+ {
+ ref.setServiceImplClass(value);
+ }
+ else if (localName.equals("config-name"))
+ {
+ ref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ ref.setConfigFile(value);
+ }
+ else if (localName.equals("wsdl-override"))
+ {
+ ref.setWsdlOverride(value);
+ }
+ else if (localName.equals("handler-chain"))
+ {
+ ref.setHandlerChain(value);
+ }
+ }
+
+ public Object newChild(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("port-component-ref"))
+ child = new UnifiedPortComponentRefMetaData(ref);
+ else if (localName.equals("handler"))
+ child = new UnifiedHandlerMetaData();
+ else if (localName.equals("handler-chains"))
+ child = new UnifiedHandlerChainsMetaData();
+
+ else if (localName.equals("call-property"))
+ child = new UnifiedCallPropertyMetaData();
+
+ return child;
+ }
+
+ public Object newChild(UnifiedHandlerChainsMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("handler-chain"))
+ child = new UnifiedHandlerChainMetaData();
+
+ return child;
+ }
+
+ public void addChild(UnifiedServiceRefMetaData parent, UnifiedPortComponentRefMetaData pcRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addPortComponentRef(pcRef);
+ }
+
+ public void addChild(UnifiedServiceRefMetaData parent, UnifiedHandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addHandler(handler);
+ }
+
+ public void addChild(UnifiedServiceRefMetaData parent, UnifiedHandlerChainsMetaData handlerChains, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.setHandlerChains(handlerChains);
+ }
+
+ public void addChild(UnifiedServiceRefMetaData parent, UnifiedCallPropertyMetaData callProp, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addCallProperty(callProp);
+ }
+
+ public void addChild(UnifiedHandlerChainsMetaData parent, UnifiedHandlerChainMetaData handlerChain, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addHandlerChain(handlerChain);
+ }
+
+ public void setValue(UnifiedPortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-endpoint-interface"))
+ {
+ ref.setServiceEndpointInterface(value);
+ }
+ else if (localName.equals("enable-mtom"))
+ {
+ ref.setEnableMTOM(Boolean.valueOf(value));
+ }
+ else if (localName.equals("port-component-link"))
+ {
+ ref.setPortComponentLink(value);
+ }
+ else if (localName.equals("port-qname"))
+ {
+ ref.setPortQName(QName.valueOf(value));
+ }
+ else if (localName.equals("config-name"))
+ {
+ ref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ ref.setConfigFile(value);
+ }
+ }
+
+ public Object newChild(UnifiedPortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("call-property"))
+ child = new UnifiedCallPropertyMetaData();
+ if (localName.equals("stub-property"))
+ child = new UnifiedStubPropertyMetaData();
+ return child;
+ }
+
+ public void setValue(UnifiedHandlerChainMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-name-pattern"))
+ {
+ ref.setServiceNamePattern(QName.valueOf(value));
+ }
+ else if (localName.equals("port-name-pattern"))
+ {
+ ref.setPortNamePattern(QName.valueOf(value));
+ }
+ else if (localName.equals("protocol-binding"))
+ {
+ ref.setProtocolBindings(value);
+ }
+ }
+
+ public void setValue(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("handler-name"))
+ {
+ ref.setHandlerName(value);
+ }
+ else if (localName.equals("handler-class"))
+ {
+ ref.setHandlerClass(value);
+ }
+ else if (localName.equals("soap-header"))
+ {
+ ref.addSoapHeader(QName.valueOf(value));
+ }
+ else if (localName.equals("soap-role"))
+ {
+ ref.addSoapRole(value);
+ }
+ else if (localName.equals("port-name"))
+ {
+ ref.addPortName(value);
+ }
+ }
+
+ public Object newChild(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("init-param"))
+ child = new UnifiedInitParamMetaData();
+
+ return child;
+ }
+
+ public void addChild(UnifiedHandlerMetaData parent, UnifiedInitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addInitParam(param);
+ }
+
+ public void setValue(UnifiedInitParamMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("param-name"))
+ {
+ ref.setParamName(value);
+ }
+ else if (localName.equals("param-value"))
+ {
+ ref.setParamValue(value);
+ }
+ }
+
+ public void setValue(UnifiedCallPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ public void setValue(UnifiedStubPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ public void addChild(UnifiedPortComponentRefMetaData ref, UnifiedCallPropertyMetaData callProp, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ ref.addCallProperty(callProp);
+ }
+
+ public void addChild(UnifiedPortComponentRefMetaData ref, UnifiedStubPropertyMetaData stubProp, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ ref.addStubProperty(stubProp);
+ }
+
+ // END ServiceRefMetaData
+ // ********************************************************
+}
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,73 @@
+/*
+* 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-May-2004
+ */
+public class UnifiedCallPropertyMetaData implements Serializable
+{
+ // The required <prop-name> element
+ private String propName;
+ // The required <prop-value> element
+ private String propValue;
+
+ public UnifiedCallPropertyMetaData(String propName, String propValue)
+ {
+ this.propName = propName;
+ this.propValue = propValue;
+ }
+
+ public UnifiedCallPropertyMetaData()
+ {
+ }
+
+ public String getPropName()
+ {
+ return propName;
+ }
+
+ public void setPropName(String paramName)
+ {
+ this.propName = paramName;
+ }
+
+ public String getPropValue()
+ {
+ return propValue;
+ }
+
+ public void setPropValue(String paramValue)
+ {
+ this.propValue = paramValue;
+ }
+
+ public String toString()
+ {
+ return "[name=" + propName + ",value=" + propValue + "]";
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedCallPropertyMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,93 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/** The unified metdata data for a handler chain element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class UnifiedHandlerChainMetaData implements Serializable
+{
+ private UnifiedHandlerChainsMetaData handlerChains;
+
+ private QName serviceNamePattern;
+ private QName portNamePattern;
+ private String protocolBindings;
+ private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
+
+ public UnifiedHandlerChainMetaData(UnifiedHandlerChainsMetaData handlerChains)
+ {
+ this.handlerChains = handlerChains;
+ }
+
+ public UnifiedHandlerChainMetaData()
+ {
+ }
+
+ public QName getPortNamePattern()
+ {
+ return portNamePattern;
+ }
+
+ public void setPortNamePattern(QName portNamePattern)
+ {
+ this.portNamePattern = portNamePattern;
+ }
+
+ public QName getServiceNamePattern()
+ {
+ return serviceNamePattern;
+ }
+
+ public void setServiceNamePattern(QName serviceNamePattern)
+ {
+ this.serviceNamePattern = serviceNamePattern;
+ }
+
+ public String getProtocolBindings()
+ {
+ return protocolBindings;
+ }
+
+ public void setProtocolBindings(String protocolBindings)
+ {
+ this.protocolBindings = protocolBindings;
+ }
+
+ public List<UnifiedHandlerMetaData> getHandlers()
+ {
+ return handlers;
+ }
+
+ public void addHandler(UnifiedHandlerMetaData handler)
+ {
+ handlers.add(handler);
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,59 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/** The unified metdata data for a handler chains element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class UnifiedHandlerChainsMetaData implements Serializable
+{
+ private HandlerType handlerType;
+ private List<UnifiedHandlerChainMetaData> handlerChains = new ArrayList<UnifiedHandlerChainMetaData>();
+
+ public UnifiedHandlerChainsMetaData(HandlerType endpoint)
+ {
+ this.handlerType = handlerType;
+ }
+
+ public UnifiedHandlerChainsMetaData()
+ {
+ }
+
+ public List<UnifiedHandlerChainMetaData> getHandlerChains()
+ {
+ return handlerChains;
+ }
+
+ public void addHandlerChain(UnifiedHandlerChainMetaData handlerChain)
+ {
+ handlerChains.add(handlerChain);
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,156 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/** The unified metdata data for a handler element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @version $Revision$
+ */
+public class UnifiedHandlerMetaData implements Serializable
+{
+ private UnifiedHandlerChainMetaData handlerChain;
+
+ // The required <handler-name> element
+ private String handlerName;
+ // The required <handler-class> element
+ private String handlerClass;
+ // The optional <init-param> elements
+ private List<UnifiedInitParamMetaData> initParams = new ArrayList<UnifiedInitParamMetaData>();
+ // The optional <soap-header> elements
+ private Set<QName> soapHeaders = new HashSet<QName>();
+ // The optional <soap-role> elements
+ private Set<String> soapRoles = new HashSet<String>();
+ // The optional <port-name> elements, these only apply to webserve clients
+ private Set<String> portNames = new HashSet<String>();
+
+ public UnifiedHandlerMetaData(UnifiedHandlerChainMetaData handlerChain)
+ {
+ this.handlerChain = handlerChain;
+ }
+
+ public UnifiedHandlerMetaData()
+ {
+ }
+
+ public void setHandlerName(String value)
+ {
+ this.handlerName = value;
+ }
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void addInitParam(UnifiedInitParamMetaData param)
+ {
+ initParams.add(param);
+ }
+
+ public List<UnifiedInitParamMetaData> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void addSoapHeader(QName qName)
+ {
+ soapHeaders.add(qName);
+ }
+
+ public Set<QName> getSoapHeaders()
+ {
+ return soapHeaders;
+ }
+
+ public void addSoapRole(String value)
+ {
+ soapRoles.add(value);
+ }
+
+ public Set<String> getSoapRoles()
+ {
+ return soapRoles;
+ }
+
+ public Set<String> getPortNames()
+ {
+ return portNames;
+ }
+
+ public void addPortName(String value)
+ {
+ portNames.add(value);
+ }
+
+ public HandlerMetaDataJAXRPC getHandlerMetaDataJAXRPC (EndpointMetaData epMetaData, HandlerType type)
+ {
+ HandlerMetaDataJAXRPC hmd = new HandlerMetaDataJAXRPC(epMetaData, type);
+ hmd.setHandlerName(getHandlerName());
+ hmd.setHandlerClassName(getHandlerClass());
+ hmd.seiInitParams(getInitParams());
+ hmd.setSoapHeaders(getSoapHeaders());
+ hmd.setSoapRoles(getSoapRoles());
+ hmd.setPortNames(getPortNames());
+ return hmd;
+ }
+
+ public HandlerMetaDataJAXWS getHandlerMetaDataJAXWS (EndpointMetaData epMetaData, HandlerType type)
+ {
+ HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(epMetaData, type);
+ hmd.setHandlerName(getHandlerName());
+ hmd.setHandlerClassName(getHandlerClass());
+ hmd.seiInitParams(getInitParams());
+ if (handlerChain != null)
+ {
+ hmd.setProtocolBindings(handlerChain.getProtocolBindings());
+ hmd.setServiceNamePattern(handlerChain.getServiceNamePattern());
+ hmd.setPortNamePattern(handlerChain.getPortNamePattern());
+ }
+ return hmd;
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,63 @@
+/*
+* 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-May-2004
+ */
+public class UnifiedInitParamMetaData implements Serializable
+{
+ // The required <param-name> element
+ private String paramName;
+ // The required <param-value> element
+ private String paramValue;
+
+ public String getParamName()
+ {
+ return paramName;
+ }
+
+ public void setParamName(String paramName)
+ {
+ this.paramName = paramName;
+ }
+
+ public String getParamValue()
+ {
+ return paramValue;
+ }
+
+ public void setParamValue(String paramValue)
+ {
+ this.paramValue = paramValue;
+ }
+
+ public String toString()
+ {
+ return "[name=" + paramName + ",value=" + paramValue + "]";
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedInitParamMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,168 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/** The metdata data from service-ref/port-component-ref element in web.xml, ejb-jar.xml, and application-client.xml.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class UnifiedPortComponentRefMetaData implements Serializable
+{
+ // The parent service-ref
+ private UnifiedServiceRefMetaData serviceRefMetaData;
+
+ // The required <service-endpoint-interface> element
+ private String serviceEndpointInterface;
+ // The optional <enable-mtom> element
+ private Boolean enableMTOM;
+ // The optional <port-component-link> element
+ private String portComponentLink;
+ // The optional <port-qname> element
+ private QName portQName;
+ // Arbitrary proxy properties given by <call-property>
+ private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>();
+ // Arbitrary proxy properties given by <stub-property>
+ private List<UnifiedStubPropertyMetaData> stubProperties = new ArrayList<UnifiedStubPropertyMetaData>();
+ // The optional JBossWS config-name
+ private String configName;
+ // The optional JBossWS config-file
+ private String configFile;
+
+ public UnifiedPortComponentRefMetaData(UnifiedServiceRefMetaData serviceRefMetaData)
+ {
+ this.serviceRefMetaData = serviceRefMetaData;
+ }
+
+ public UnifiedServiceRefMetaData getServiceRefMetaData()
+ {
+ return serviceRefMetaData;
+ }
+
+ public Boolean getEnableMTOM()
+ {
+ return enableMTOM;
+ }
+
+ public void setEnableMTOM(Boolean enableMTOM)
+ {
+ this.enableMTOM = enableMTOM;
+ }
+
+ /**
+ * The port-component-link element links a port-component-ref
+ * to a specific port-component required to be made available
+ * by a service reference.
+ *
+ * The value of a port-component-link must be the
+ * port-component-name of a port-component in the same module
+ * or another module in the same application unit. The syntax
+ * for specification follows the syntax defined for ejb-link
+ * in the EJB 2.0 specification.
+ */
+ public String getPortComponentLink()
+ {
+ return portComponentLink;
+ }
+
+ public void setPortComponentLink(String portComponentLink)
+ {
+ this.portComponentLink = portComponentLink;
+ }
+
+ public String getServiceEndpointInterface()
+ {
+ return serviceEndpointInterface;
+ }
+
+ public void setServiceEndpointInterface(String serviceEndpointInterface)
+ {
+ this.serviceEndpointInterface = serviceEndpointInterface;
+ }
+
+ public QName getPortQName()
+ {
+ return portQName;
+ }
+
+ public void setPortQName(QName portQName)
+ {
+ this.portQName = portQName;
+ }
+
+ public List<UnifiedCallPropertyMetaData> getCallProperties()
+ {
+ return callProperties;
+ }
+
+ public void setCallProperties(List<UnifiedCallPropertyMetaData> callProps)
+ {
+ callProperties = callProps;
+ }
+
+ public void addCallProperty(UnifiedCallPropertyMetaData callProp)
+ {
+ callProperties.add(callProp);
+ }
+
+ public List<UnifiedStubPropertyMetaData> getStubProperties()
+ {
+ return stubProperties;
+ }
+
+ public void setStubProperties(List<UnifiedStubPropertyMetaData> stubProps)
+ {
+ stubProperties = stubProps;
+ }
+
+ public void addStubProperty(UnifiedStubPropertyMetaData stubProp)
+ {
+ stubProperties.add(stubProp);
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,323 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.UnifiedVirtualFile;
+
+/**
+ * The metdata data from service-ref element in web.xml, ejb-jar.xml, and
+ * application-client.xml.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class UnifiedServiceRefMetaData implements Serializable
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(UnifiedServiceRefMetaData.class);
+
+ private UnifiedVirtualFile vfsRoot;
+
+ // Standard properties
+
+ // The required <service-ref-name> element
+ private String serviceRefName;
+ // The JAXRPC required <service-interface> element
+ private String serviceInterface;
+ // service-res-type
+ private String serviceRefType;
+ // The optional <wsdl-file> element
+ private String wsdlFile;
+ // The optional <jaxrpc-mapping-file> element
+ private String mappingFile;
+ // The optional <service-qname> element
+ private QName serviceQName;
+ // The LinkedHashMap<String, PortComponentRefMetaData> for <port-component-ref> elements
+ private Map<String, UnifiedPortComponentRefMetaData> portComponentRefs = new LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
+ // The optional <handler> elements. JAX-RPC handlers declared in the standard J2EE1.4 descriptor
+ private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
+ // The optional <handler-chains> elements. JAX-WS handlers declared in the standard JavaEE5 descriptor
+ private UnifiedHandlerChainsMetaData handlerChains;
+
+ // JBoss properties
+
+ // The optional <service-impl-class> element
+ private String serviceImplClass;
+ // The optional JBossWS config-name
+ private String configName;
+ // The optional JBossWS config-file
+ private String configFile;
+ // The optional URL of the actual WSDL to use, <wsdl-override>
+ private String wsdlOverride;
+ // The optional <handler-chain> element. JAX-WS handler chain declared in the JBoss JavaEE5 descriptor
+ private String handlerChain;
+ // Arbitrary proxy properties given by <call-property>
+ private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>();
+
+ public UnifiedServiceRefMetaData(UnifiedVirtualFile vfRoot)
+ {
+ this.vfsRoot = vfRoot;
+ }
+
+ public UnifiedServiceRefMetaData()
+ {
+ }
+
+ public UnifiedVirtualFile getVfsRoot()
+ {
+ return vfsRoot;
+ }
+
+ public void setVfsRoot(UnifiedVirtualFile vfsRoot)
+ {
+ this.vfsRoot = vfsRoot;
+ }
+
+ public String getServiceRefName()
+ {
+ return serviceRefName;
+ }
+
+ public void setServiceRefName(String serviceRefName)
+ {
+ this.serviceRefName = serviceRefName;
+ }
+
+ public String getMappingFile()
+ {
+ return mappingFile;
+ }
+
+ public void setMappingFile(String mappingFile)
+ {
+ this.mappingFile = mappingFile;
+ }
+
+ public URL getMappingLocation()
+ {
+ URL mappingURL = null;
+ if (mappingFile != null)
+ {
+ try
+ {
+ mappingURL = vfsRoot.findChild(mappingFile).toURL();
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot find jaxrcp-mapping-file: " + mappingFile, e);
+ }
+ }
+ return mappingURL;
+ }
+
+ public Collection<UnifiedPortComponentRefMetaData> getPortComponentRefs()
+ {
+ return portComponentRefs.values();
+ }
+
+ public UnifiedPortComponentRefMetaData getPortComponentRef(String seiName)
+ {
+ UnifiedPortComponentRefMetaData ref = portComponentRefs.get(seiName);
+ return ref;
+ }
+
+ public void addPortComponentRef(UnifiedPortComponentRefMetaData pcRef)
+ {
+ portComponentRefs.put(pcRef.getServiceEndpointInterface(), pcRef);
+ }
+
+ public List<UnifiedHandlerMetaData> getHandlers()
+ {
+ return handlers;
+ }
+
+ public void addHandler(UnifiedHandlerMetaData handler)
+ {
+ handlers.add(handler);
+ }
+
+ public String getServiceInterface()
+ {
+ return serviceInterface;
+ }
+
+ public void setServiceInterface(String serviceInterface)
+ {
+ this.serviceInterface = serviceInterface;
+ }
+
+ public String getServiceImplClass()
+ {
+ return serviceImplClass;
+ }
+
+ public void setServiceImplClass(String serviceImplClass)
+ {
+ this.serviceImplClass = serviceImplClass;
+ }
+
+ public QName getServiceQName()
+ {
+ return serviceQName;
+ }
+
+ public void setServiceQName(QName serviceQName)
+ {
+ this.serviceQName = serviceQName;
+ }
+
+ public String getServiceRefType()
+ {
+ return serviceRefType;
+ }
+
+ public void setServiceRefType(String serviceResType)
+ {
+ this.serviceRefType = serviceResType;
+ }
+
+ public String getWsdlFile()
+ {
+ return wsdlFile;
+ }
+
+ public void setWsdlFile(String wsdlFile)
+ {
+ this.wsdlFile = wsdlFile;
+ }
+
+ public URL getWsdlLocation()
+ {
+ URL wsdlLocation = null;
+ if (wsdlOverride != null)
+ {
+ try
+ {
+ wsdlLocation = new URL(wsdlOverride);
+ }
+ catch (MalformedURLException e1)
+ {
+ try
+ {
+ wsdlLocation = vfsRoot.findChild(wsdlOverride).toURL();
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot find wsdl-override: " + wsdlOverride, e);
+ }
+ }
+ }
+
+ if (wsdlLocation == null && wsdlFile != null)
+ {
+ try
+ {
+ wsdlLocation = vfsRoot.findChild(wsdlFile).toURL();
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot find wsdl-file: " + wsdlFile, e);
+ }
+ }
+
+ return wsdlLocation;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public String getWsdlOverride()
+ {
+ return wsdlOverride;
+ }
+
+ public void setWsdlOverride(String wsdlOverride)
+ {
+ this.wsdlOverride = wsdlOverride;
+ }
+
+ public List<UnifiedCallPropertyMetaData> getCallProperties()
+ {
+ return callProperties;
+ }
+
+ public void setCallProperties(List<UnifiedCallPropertyMetaData> callProps)
+ {
+ callProperties = callProps;
+ }
+
+ public void addCallProperty(UnifiedCallPropertyMetaData callProp)
+ {
+ callProperties.add(callProp);
+ }
+
+ public UnifiedHandlerChainsMetaData getHandlerChains()
+ {
+ return handlerChains;
+ }
+
+ public void setHandlerChains(UnifiedHandlerChainsMetaData handlerChains)
+ {
+ this.handlerChains = handlerChains;
+ }
+
+ public String getHandlerChain()
+ {
+ return handlerChain;
+ }
+
+ public void setHandlerChain(String handlerChain)
+ {
+ this.handlerChain = handlerChain;
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,63 @@
+/*
+* 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-May-2004
+ */
+public class UnifiedStubPropertyMetaData implements Serializable
+{
+ // The required <prop-name> element
+ private String propName;
+ // The required <prop-value> element
+ private String propValue;
+
+ public String getPropName()
+ {
+ return propName;
+ }
+
+ public void setPropName(String paramName)
+ {
+ this.propName = paramName;
+ }
+
+ public String getPropValue()
+ {
+ return propValue;
+ }
+
+ public void setPropValue(String paramValue)
+ {
+ this.propValue = paramValue;
+ }
+
+ public String toString()
+ {
+ return "[name=" + propName + ",value=" + propValue + "]";
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedStubPropertyMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -33,6 +33,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
/**
* The common metdata data for a handler element
@@ -61,7 +62,7 @@
// The optional <soap-header> elements
private Set<QName> soapHeaders = new HashSet<QName>();
// The optional <init-param> elements
- private List<HandlerInitParam> initParams = new ArrayList<HandlerInitParam>();
+ private List<UnifiedInitParamMetaData> initParams = new ArrayList<UnifiedInitParamMetaData>();
// The cached handler class
private Class handlerClass;
@@ -137,12 +138,12 @@
return soapHeaders;
}
- public void seiInitParams(List<HandlerInitParam> initParams)
+ public void seiInitParams(List<UnifiedInitParamMetaData> initParams)
{
this.initParams = initParams;
}
- public List<HandlerInitParam> getInitParams()
+ public List<UnifiedInitParamMetaData> getInitParams()
{
return initParams;
}
@@ -166,39 +167,4 @@
{
handlerClass = getHandlerClass();
}
-
- public static class HandlerInitParam implements Serializable
- {
- private static final long serialVersionUID = -8687875291620457318L;
-
- // The required <handler-name> element
- private String paramName;
- // The required <handler-class> element
- private String paramValue;
-
- public String getParamName()
- {
- return paramName;
- }
-
- public void setParamName(String paramName)
- {
- this.paramName = paramName;
- }
-
- public String getParamValue()
- {
- return paramValue;
- }
-
- public void setParamValue(String paramValue)
- {
- this.paramValue = paramValue;
- }
-
- public String toString()
- {
- return "[name=" + paramName + ",value=" + paramValue + "]";
- }
- }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/PortComponentMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/PortComponentMetaData.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/PortComponentMetaData.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -30,7 +30,7 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
/**
* XML Binding and ws4ee meta-data element for
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -26,8 +26,8 @@
import java.net.URL;
import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
@@ -129,14 +129,14 @@
public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
if ("init-param".equals(localName))
- return new HandlerInitParam();
+ return new UnifiedInitParamMetaData();
else return null;
}
/**
* Called when parsing character is complete.
*/
- public void addChild(UnifiedHandlerMetaData handler, HandlerInitParam param, UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(UnifiedHandlerMetaData handler, UnifiedInitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName)
{
handler.addInitParam(param);
}
@@ -200,7 +200,7 @@
/**
* Called when a new simple child element with text value was read from the XML content.
*/
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ public void setValue(UnifiedInitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
if (log.isTraceEnabled())
log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI + " localName=" + localName + " value=" + value);
Modified: trunk/jbossws-tests/ant-import/build-samples-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -325,9 +325,11 @@
<include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
</classes>
<webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
- <include name="jboss-web.xml"/>
<include name="wsdl/**"/>
</webinf>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client">
+ <include name="jboss-web.xml"/>
+ </webinf>
</war>
<jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-ejb3-client.jar">
<fileset dir="${tests.output.dir}/classes">
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java 2007-03-07 14:01:37 UTC (rev 2541)
@@ -26,13 +26,13 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.metadata.config.EndpointProperty;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
+import org.jboss.ws.metadata.config.jaxrpc.CommonConfigJAXRPC;
import org.jboss.ws.metadata.config.jaxrpc.ConfigRootJAXRPC;
import org.jboss.ws.metadata.config.jaxrpc.EndpointConfigJAXRPC;
-import org.jboss.ws.metadata.config.jaxrpc.CommonConfigJAXRPC;
import org.jboss.ws.metadata.config.jaxws.ConfigRootJAXWS;
import org.jboss.ws.metadata.config.jaxws.EndpointConfigJAXWS;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
/**
* Test parsing of the JBossWS config
@@ -63,7 +63,7 @@
assertFalse("MTOM should not be enabled" , epc1.hasFeature("http://org.jboss.ws/mtom"));
assertEquals("Standard WSSecurity Endpoint", epc2.getConfigName());
- HandlerChainMetaData preChain = epc2.getPreHandlerChain();
+ UnifiedHandlerChainMetaData preChain = epc2.getPreHandlerChain();
assertEquals(1, preChain.getHandlers().size());
UnifiedHandlerMetaData h1 = (UnifiedHandlerMetaData)preChain.getHandlers().get(0);
assertEquals("WSSecurityHandlerInbound", h1.getHandlerName());
Modified: trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -5,20 +5,20 @@
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service1</service-ref-name>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-handlerchain/TestService?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service2</service-ref-name>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-handlerchain/TestService?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service3</service-ref-name>
<handler-chain>jaxws-handlers.xml</handler-chain>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-handlerchain/TestService?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file
Modified: trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -7,90 +7,90 @@
<!--
@WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
- <webservice-ref>
+ <service-ref>
<service-ref-name>service1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
-->
<!--
@WebServiceRef(name = "service2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>service2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/service4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService5")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService5</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/service6</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>port1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/port3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/port4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port5")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port5</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file
Deleted: trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-
-<jboss-web>
-
-
- <!--
- @WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "WEB-INF/wsdl/TestEndpoint.wsdl")
- <webservice-ref>
- <service-ref-name>service1</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
- -->
-
- <!--
- @WebServiceRef(name = "service2", value = TestEndpointService.class)
- -->
- <webservice-ref>
- <service-ref-name>service2</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
- <!--
- @WebServiceRef(name = "TestEndpointService3")
- -->
- <webservice-ref>
- <service-ref-name>TestEndpointService3</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
- <!--
- @WebServiceRef
- -->
- <webservice-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service4</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
- <!--
- @WebServiceRef(name = "TestEndpointService5")
- -->
- <webservice-ref>
- <service-ref-name>TestEndpointService5</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
- <!--
- @WebServiceRef
- -->
- <webservice-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service6</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
- <!--
- @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
- -->
- <webservice-ref>
- <service-ref-name>port1</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
- <!--
- @WebServiceRef(name = "Port2", value = TestEndpointService.class)
- -->
- <webservice-ref>
- <service-ref-name>Port2</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
- <!--
- @WebServiceRef(value = TestEndpointService.class)
- -->
- <webservice-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/port3</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
-
-</jboss-web>
\ No newline at end of file
Modified: trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -10,75 +10,75 @@
<!--
@WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
- <webservice-ref>
+ <service-ref>
<service-ref-name>service1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
-->
<!--
@WebServiceRef(name = "service2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>service2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/service4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService5")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService5</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/service6</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>port1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/port3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</session>
</enterprise-beans>
Modified: trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -8,90 +8,90 @@
<!--
@WebServiceRef(name = "Service1")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service1</service-ref-name>
- <service-class-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-class-name>
+ <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
<service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Service2")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service2</service-ref-name>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Service3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service3</service-ref-name>
- <service-class-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-class-name>
+ <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
<service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Service4")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service4</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port1", type = TestEndpoint.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port1</service-ref-name>
- <port-info>
+ <port-component-ref>
<port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port2")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port2</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port3</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
<port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file
Modified: trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml 2007-03-07 12:14:57 UTC (rev 2540)
+++ trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -5,55 +5,55 @@
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
- <webservice-ref>
+ <service-ref>
<service-ref-name>SecureService1</service-ref-name>
- <service-class-name>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointService</service-class-name>
+ <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointService</service-impl-class>
<service-qname>{http://org.jboss.ws/wsref}SecureEndpointService</service-qname>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>SecureService2</service-ref-name>
- <port-info>
+ <port-component-ref>
<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>SecurePort1</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file
Copied: trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml (from rev 2540, branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml)
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml (rev 0)
+++ trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml 2007-03-07 14:01:37 UTC (rev 2541)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+
+<jboss-web>
+
+
+ <!--
+ @WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "WEB-INF/wsdl/TestEndpoint.wsdl")
+ <service-ref>
+ <service-ref-name>service1</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+ -->
+
+ <!--
+ @WebServiceRef(name = "service2", value = TestEndpointService.class)
+ -->
+ <service-ref>
+ <service-ref-name>service2</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "TestEndpointService3")
+ -->
+ <service-ref>
+ <service-ref-name>TestEndpointService3</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service4</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "TestEndpointService5")
+ -->
+ <service-ref>
+ <service-ref-name>TestEndpointService5</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service6</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
+ -->
+ <service-ref>
+ <service-ref-name>port1</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+ -->
+ <service-ref>
+ <service-ref-name>Port2</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(value = TestEndpointService.class)
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/port3</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-web>
\ No newline at end of file
17 years, 9 months
JBossWS SVN: r2540 - in branches/tdiesler/trunk: jbossws-core/src/java/org/jboss/ws/core/jaxws/client and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-07 07:14:57 -0500 (Wed, 07 Mar 2007)
New Revision: 2540
Added:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml
Removed:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml
Modified:
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
branches/tdiesler/trunk/jbossws-tests/ant-import/build-samples-jaxws.xml
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
Log:
partial
Modified: branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
--- branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-03-07 12:14:57 UTC (rev 2540)
@@ -62,7 +62,7 @@
{
Element root = DOMUtils.parse(xmlFragment);
if (log.isDebugEnabled())
- log.info(DOMWriter.printNode(root, true));
+ log.info("setupServiceRef\n" + DOMWriter.printNode(root, true));
}
catch (IOException e)
{
@@ -87,7 +87,9 @@
private boolean isServiceRefJaxRpc(ServiceRefMetaData serviceRef)
{
- return false;
+ // The <service-interface> is a required element
+ // for JAXRPC and not defined for JAXWS
+ return serviceRef.getServiceInterface() != null;
}
public void create() throws Exception
Modified: branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
--- branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-07 12:14:57 UTC (rev 2540)
@@ -96,19 +96,19 @@
String serviceRefName = serviceRef.getServiceRefName();
QName serviceQName = serviceRef.getServiceQName();
- String serviceInterface = serviceRef.getServiceInterface();
- if (serviceInterface == null)
- serviceInterface = (String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
+ String serviceImplClass = serviceRef.getServiceImplClass();
+ if (serviceImplClass == null)
+ serviceImplClass = (String)ref.get(ServiceReferenceable.SERVICE_IMPL_CLASS).getContent();
// If the target defaults to javax.xml.ws.Service, user the service as the target
if (Service.class.getName().equals(targetClassName))
- targetClassName = serviceInterface;
+ targetClassName = serviceImplClass;
- if(log.isDebugEnabled()) log.debug("[name=" + serviceRefName + ",service=" + serviceInterface + ",target=" + targetClassName + "]");
+ if(log.isDebugEnabled()) log.debug("[name=" + serviceRefName + ",service=" + serviceImplClass + ",target=" + targetClassName + "]");
// Load the service class
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- Class serviceClass = ctxLoader.loadClass(serviceInterface);
+ Class serviceClass = ctxLoader.loadClass(serviceImplClass);
Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
if (Service.class.isAssignableFrom(serviceClass) == false)
@@ -158,7 +158,7 @@
// Configure the service
configureService((Service)target, serviceRef);
- if (targetClassName != null && targetClassName.equals(serviceInterface) == false)
+ if (targetClassName != null && targetClassName.equals(serviceImplClass) == false)
{
try
{
Modified: branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
--- branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-07 12:14:57 UTC (rev 2540)
@@ -60,16 +60,19 @@
// Build the list of @WebServiceRef relevant annotations
List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
- for (Annotation an : anElement.getAnnotations())
+ if (anElement != null)
{
- if (an instanceof WebServiceRef)
- wsrefList.add((WebServiceRef)an);
+ for (Annotation an : anElement.getAnnotations())
+ {
+ if (an instanceof WebServiceRef)
+ wsrefList.add((WebServiceRef)an);
- if (an instanceof WebServiceRefs)
- {
- WebServiceRefs wsrefs = (WebServiceRefs)an;
- for (WebServiceRef aux : wsrefs.value())
- wsrefList.add(aux);
+ if (an instanceof WebServiceRefs)
+ {
+ WebServiceRefs wsrefs = (WebServiceRefs)an;
+ for (WebServiceRef aux : wsrefs.value())
+ wsrefList.add(aux);
+ }
}
}
@@ -90,9 +93,6 @@
}
}
- if (wsref == null)
- throw new IllegalArgumentException("@WebServiceRef must be present on: " + anElement);
-
Class targetClass = null;
if (anElement instanceof Field)
targetClass = ((Field)anElement).getType();
@@ -103,22 +103,22 @@
String targetClassName = (targetClass != null ? targetClass.getName() : null);
log.debug("setupWebServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
- String serviceClassName = null;
+ String serviceImplClass = null;
// #1 Use the explicit @WebServiceRef.value
- if (wsref.value() != Object.class)
- serviceClassName = wsref.value().getName();
+ if (wsref != null && wsref.value() != Object.class)
+ serviceImplClass = wsref.value().getName();
// #2 Use the target ref type
- if (serviceClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
- serviceClassName = targetClass.getName();
+ if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
+ serviceImplClass = targetClass.getName();
// #3 Use javax.xml.ws.Service
- if (serviceClassName == null)
- serviceClassName = Service.class.getName();
+ if (serviceImplClass == null)
+ serviceImplClass = Service.class.getName();
// #1 Use the explicit @WebServiceRef.type
- if (wsref.type() != Object.class)
+ if (wsref != null && wsref.type() != Object.class)
targetClassName = wsref.type().getName();
// #2 Use the target ref type
@@ -126,14 +126,17 @@
targetClassName = targetClass.getName();
// Set the wsdlLocation if there is no override already
- if (serviceRef.getWsdlOverride() == null && wsref.wsdlLocation().length() > 0)
- serviceRef.setWsdlFile(wsref.wsdlLocation());
+ if (serviceRef.getWsdlOverride() == null && wsref != null && wsref.wsdlLocation().length() > 0)
+ serviceRef.setWsdlOverride(wsref.wsdlLocation());
// Set the handlerChain from @HandlerChain on the annotated element
String handlerChain = serviceRef.getHandlerChain();
- HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
- if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
- handlerChain = anHandlerChain.file();
+ if (anElement != null)
+ {
+ HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
+ if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
+ handlerChain = anHandlerChain.file();
+ }
// Resolve path to handler chain
if (handlerChain != null)
@@ -160,7 +163,7 @@
// Do not use rebind, the binding should be unique
// [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
- Util.rebind(encCtx, encName, new ServiceReferenceable(serviceClassName, targetClassName, serviceRef));
+ Util.rebind(encCtx, encName, new ServiceReferenceable(serviceImplClass, targetClassName, serviceRef));
log.debug("<service-ref> bound to: java:comp/env/" + encName);
}
Modified: branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
===================================================================
--- branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-03-07 12:14:57 UTC (rev 2540)
@@ -49,16 +49,16 @@
public class ServiceReferenceable implements Referenceable
{
public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
- public static final String SERVICE_CLASS_NAME = "SERVICE_CLASS_NAME";
+ public static final String SERVICE_IMPL_CLASS = "SERVICE_CLASS_NAME";
public static final String TARGET_CLASS_NAME = "TARGET_CLASS_NAME";
- private String serviceClassName;
+ private String serviceImplClass;
private String targetClassName;
private ServiceRefMetaData serviceRef;
- public ServiceReferenceable(String serviceClassName, String targetClassName, ServiceRefMetaData serviceRef)
+ public ServiceReferenceable(String serviceImplClass, String targetClassName, ServiceRefMetaData serviceRef)
{
- this.serviceClassName = serviceClassName;
+ this.serviceImplClass = serviceImplClass;
this.targetClassName = targetClassName;
this.serviceRef = serviceRef;
}
@@ -73,7 +73,7 @@
{
Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
- myRef.add(new StringRefAddr(SERVICE_CLASS_NAME, serviceClassName));
+ myRef.add(new StringRefAddr(SERVICE_IMPL_CLASS, serviceImplClass));
myRef.add(new StringRefAddr(TARGET_CLASS_NAME, targetClassName));
myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshall(serviceRef)));
Modified: branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java
===================================================================
--- branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java 2007-03-07 12:14:57 UTC (rev 2540)
@@ -51,9 +51,11 @@
private UnifiedVirtualFile vfsRoot;
+ // Standard properties
+
// The required <service-ref-name> element
private String serviceRefName;
- // The required <service-interface> element
+ // The JAXRPC required <service-interface> element
private String serviceInterface;
// service-res-type
private String serviceRefType;
@@ -69,14 +71,19 @@
private List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
// The optional <handler-chains> elements. JAX-WS handlers declared in the standard JavaEE5 descriptor
private HandlerChainsMetaData handlerChains;
- // The optional <handler-chain> element. JAX-WS handler chain declared in the JBoss JavaEE5 descriptor
- private String handlerChain;
+
+ // JBoss properties
+
+ // The optional <service-impl-class> element
+ private String serviceImplClass;
// The optional JBossWS config-name
private String configName;
// The optional JBossWS config-file
private String configFile;
// The optional URL of the actual WSDL to use, <wsdl-override>
private String wsdlOverride;
+ // The optional <handler-chain> element. JAX-WS handler chain declared in the JBoss JavaEE5 descriptor
+ private String handlerChain;
// Arbitrary proxy properties given by <call-property>
private List<CallPropertyMetaData> callProperties = new ArrayList<CallPropertyMetaData>();
@@ -163,6 +170,16 @@
this.serviceInterface = serviceInterface;
}
+ public String getServiceImplClass()
+ {
+ return serviceImplClass;
+ }
+
+ public void setServiceImplClass(String serviceImplClass)
+ {
+ this.serviceImplClass = serviceImplClass;
+ }
+
public QName getServiceQName()
{
return serviceQName;
Modified: branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
===================================================================
--- branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java 2007-03-07 12:14:57 UTC (rev 2540)
@@ -109,6 +109,10 @@
}
/* JBoss properties */
+ else if (localName.equals("service-impl-class"))
+ {
+ ref.setServiceImplClass(value);
+ }
else if (localName.equals("config-name"))
{
ref.setConfigName(value);
@@ -193,8 +197,16 @@
}
else if (localName.equals("port-qname"))
{
- ref.setPortComponentLink(value);
+ ref.setPortQName(QName.valueOf(value));
}
+ else if (localName.equals("config-name"))
+ {
+ ref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ ref.setConfigFile(value);
+ }
}
public Object newChild(PortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
@@ -297,6 +309,16 @@
}
}
+ public void addChild(PortComponentRefMetaData ref, CallPropertyMetaData callProp, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ ref.addCallProperty(callProp);
+ }
+
+ public void addChild(PortComponentRefMetaData ref, StubPropertyMetaData stubProp, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ ref.addStubProperty(stubProp);
+ }
+
// END ServiceRefMetaData
// ********************************************************
}
Modified: branches/tdiesler/trunk/jbossws-tests/ant-import/build-samples-jaxws.xml
===================================================================
--- branches/tdiesler/trunk/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-03-07 12:14:57 UTC (rev 2540)
@@ -325,9 +325,11 @@
<include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
</classes>
<webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
- <include name="jboss-web.xml"/>
<include name="wsdl/**"/>
</webinf>
+ <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client">
+ <include name="jboss-web.xml"/>
+ </webinf>
</war>
<jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-ejb3-client.jar">
<fileset dir="${tests.output.dir}/classes">
Deleted: branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml
===================================================================
--- branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml 2007-03-07 12:14:57 UTC (rev 2540)
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
-
-<jboss-web>
-
-
- <!--
- @WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "WEB-INF/wsdl/TestEndpoint.wsdl")
- <service-ref>
- <service-ref-name>service1</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
- -->
-
- <!--
- @WebServiceRef(name = "service2", value = TestEndpointService.class)
- -->
- <service-ref>
- <service-ref-name>service2</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
- <!--
- @WebServiceRef(name = "TestEndpointService3")
- -->
- <service-ref>
- <service-ref-name>TestEndpointService3</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
- <!--
- @WebServiceRef
- -->
- <service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service4</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
- <!--
- @WebServiceRef(name = "TestEndpointService5")
- -->
- <service-ref>
- <service-ref-name>TestEndpointService5</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
- <!--
- @WebServiceRef
- -->
- <service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service6</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
- <!--
- @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
- -->
- <service-ref>
- <service-ref-name>port1</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
- <!--
- @WebServiceRef(name = "Port2", value = TestEndpointService.class)
- -->
- <service-ref>
- <service-ref-name>Port2</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
- <!--
- @WebServiceRef(value = TestEndpointService.class)
- -->
- <service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/port3</service-ref-name>
- <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </service-ref>
-
-</jboss-web>
\ No newline at end of file
Modified: branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
===================================================================
--- branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml 2007-03-07 12:14:57 UTC (rev 2540)
@@ -10,7 +10,7 @@
-->
<service-ref>
<service-ref-name>Service1</service-ref-name>
- <service-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-interface>
+ <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
<service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -30,7 +30,7 @@
-->
<service-ref>
<service-ref-name>Service3</service-ref-name>
- <service-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-interface>
+ <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
<service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -83,12 +83,12 @@
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
<port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
</port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
Modified: branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
--- branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml 2007-03-07 08:08:09 UTC (rev 2539)
+++ branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml 2007-03-07 12:14:57 UTC (rev 2540)
@@ -7,18 +7,18 @@
<service-ref>
<service-ref-name>SecureService1</service-ref-name>
- <service-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointService</service-interface>
+ <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointService</service-impl-class>
<service-qname>{http://org.jboss.ws/wsref}SecureEndpointService</service-qname>
<port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
</port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
@@ -29,12 +29,12 @@
<port-component-ref>
<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
</port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
@@ -45,12 +45,12 @@
<port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
<stub-property>
- <name>javax.xml.ws.security.auth.username</name>
- <value>kermit</value>
+ <prop-name>javax.xml.ws.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
</stub-property>
<stub-property>
- <name>javax.xml.ws.security.auth.password</name>
- <value>thefrog</value>
+ <prop-name>javax.xml.ws.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
</stub-property>
</port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
Copied: branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml (from rev 2539, branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml)
===================================================================
--- branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml (rev 0)
+++ branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml 2007-03-07 12:14:57 UTC (rev 2540)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+
+<jboss-web>
+
+
+ <!--
+ @WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "WEB-INF/wsdl/TestEndpoint.wsdl")
+ <service-ref>
+ <service-ref-name>service1</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+ -->
+
+ <!--
+ @WebServiceRef(name = "service2", value = TestEndpointService.class)
+ -->
+ <service-ref>
+ <service-ref-name>service2</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "TestEndpointService3")
+ -->
+ <service-ref>
+ <service-ref-name>TestEndpointService3</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service4</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "TestEndpointService5")
+ -->
+ <service-ref>
+ <service-ref-name>TestEndpointService5</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service6</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
+ -->
+ <service-ref>
+ <service-ref-name>port1</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+ -->
+ <service-ref>
+ <service-ref-name>Port2</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(value = TestEndpointService.class)
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/port3</service-ref-name>
+ <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-web>
\ No newline at end of file
17 years, 9 months