[jbossws-commits] JBossWS SVN: r6809 - in stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws: addressing and 2 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Apr 30 13:41:58 EDT 2008
Author: thomas.diesler at jboss.com
Date: 2008-04-30 13:41:58 -0400 (Wed, 30 Apr 2008)
New Revision: 6809
Added:
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/ActionNotSupportedException.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingException.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingType.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AttributedURI.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/EndpointUnavailableException.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingBuilder.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingElement.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingProperties.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/BindingProvider21.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java
stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
Log:
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/ActionNotSupportedException.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/ActionNotSupportedException.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/ActionNotSupportedException.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -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 javax.xml.ws.addressing;
+
+//$Id$
+
+import javax.xml.namespace.QName;
+
+public class ActionNotSupportedException extends AddressingException
+{
+ private static final long serialVersionUID = -2281268200778671820L;
+
+ static
+ {
+ fMessage = ac.getActionNotSupportedText();
+ }
+
+ private String action;
+
+ protected ActionNotSupportedException()
+ {
+ super();
+ }
+
+ public ActionNotSupportedException(String action)
+ {
+ super(fMessage + ": " + action);
+ this.action = action;
+ }
+
+ public String getAction()
+ {
+ return action;
+ }
+
+ public QName getSubcode()
+ {
+ return ac.getActioNotSupportedQName();
+ }
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/ActionNotSupportedException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingException.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingException.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingException.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,90 @@
+/*
+ * 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 javax.xml.ws.addressing;
+
+//$Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceException;
+
+public class AddressingException extends WebServiceException
+{
+ private static final long serialVersionUID = -4470655951999027171L;
+
+ protected QName code;
+
+ protected String reason;
+
+ protected Object detail;
+
+ protected static AddressingConstants ac = null;
+ protected static String fMessage = null;
+ static
+ {
+ ac = AddressingBuilder.getAddressingBuilder().newAddressingConstants();
+ }
+
+ public AddressingException()
+ {
+ }
+
+ public AddressingException(String message)
+ {
+ super(message);
+ }
+
+ public AddressingException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public AddressingException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ /**
+ * Returns the fault code.
+ *
+ * @return the fault code
+ */
+ public QName getCode()
+ {
+ return code;
+ }
+
+ public QName getSubcode()
+ {
+ return null;
+ }
+
+ public String getReason()
+ {
+ return reason;
+ }
+
+ public Object getDetail()
+ {
+ return detail;
+ }
+
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingType.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingType.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingType.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,29 @@
+/*
+ * 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 javax.xml.ws.addressing;
+
+//$Id$
+
+public interface AddressingType
+{
+ public String getNamespaceURI();
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AddressingType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AttributedURI.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AttributedURI.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AttributedURI.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,35 @@
+/*
+ * 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 javax.xml.ws.addressing;
+
+//$Id$
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+public interface AttributedURI extends AddressingType, AttributeExtensible
+{
+ public URI getURI();
+
+ public void addAttribute(QName name, String value);
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/AttributedURI.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/EndpointUnavailableException.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/EndpointUnavailableException.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/EndpointUnavailableException.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,50 @@
+/*
+ * 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 javax.xml.ws.addressing;
+
+//$Id$
+
+import javax.xml.namespace.QName;
+
+public class EndpointUnavailableException extends AddressingException
+{
+ private static final long serialVersionUID = 4098776568071868541L;
+
+ static
+ {
+ fMessage = ac.getEndpointUnavailableText();
+ }
+
+ public EndpointUnavailableException()
+ {
+ }
+
+ public EndpointUnavailableException(int retryAfter, String problemIRI)
+ {
+ super(fMessage + ": [retry=" + retryAfter + ",iri=" + problemIRI + "]");
+ }
+
+ public QName getSubcode()
+ {
+ return ac.getEndpointUnavailableQName();
+ }
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/EndpointUnavailableException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingBuilder.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingBuilder.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingBuilder.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,30 @@
+/*
+ * 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 javax.xml.ws.addressing.soap;
+
+//$Id$
+
+import javax.xml.ws.addressing.AddressingBuilder;
+
+public abstract class SOAPAddressingBuilder extends AddressingBuilder
+{
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingElement.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingElement.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingElement.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,38 @@
+/*
+ * 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 javax.xml.ws.addressing.soap;
+
+//$Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.ws.addressing.AddressingException;
+import javax.xml.ws.addressing.AddressingType;
+
+public interface SOAPAddressingElement extends AddressingType
+{
+
+ public void read(SOAPElement element) throws AddressingException;
+
+ public SOAPElement write(SOAPElement parent, QName name) throws AddressingException;
+
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingElement.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingProperties.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingProperties.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingProperties.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,38 @@
+/*
+ * 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 javax.xml.ws.addressing.soap;
+
+//$Id$
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.addressing.AddressingException;
+import javax.xml.ws.addressing.AddressingProperties;
+
+public interface SOAPAddressingProperties extends AddressingProperties
+{
+ public void readHeaders(SOAPMessage message) throws AddressingException;
+
+ public void writeHeaders(SOAPMessage message) throws AddressingException;
+
+ public void setMu(boolean mu);
+
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/addressing/soap/SOAPAddressingProperties.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/BindingProvider21.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/BindingProvider21.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/BindingProvider21.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,96 @@
+/*
+ * 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 javax.xml.ws.wsaddressing;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.EndpointReference;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public interface BindingProvider21 extends BindingProvider
+{
+ /**
+ * Returns the <code>EndpointReference</code> associated with
+ * this <code>BindingProvider</code> instance.
+ * <p>
+ * If the Binding for this <code>bindingProvider</code> is
+ * either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
+ * <code>W3CEndpointReference</code> MUST be returned.
+ * If the returned <code>EndpointReference</code> is a
+ * <code>W3CEndpointReference</code> it MUST contain
+ * the <code>wsaw:ServiceName</code> element and the
+ * <code>wsaw:EndpointName</code> attribute on the
+ * <code>wsaw:ServiceName</code>. It SHOULD contain
+ * the embedded WSDL in the <code>wsa:Metadata</code> element
+ * if there is an associated WSDL. The
+ * <code>wsaw:InterfaceName</code> MAY also be present.
+ * <br>
+ * See <a href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">
+ * WS-Addressing - WSDL 1.0</a>.
+ *
+ * @return EndpointReference of the target endpoint associated with this
+ * <code>BindingProvider</code> instance.
+ *
+ * @throws java.lang.UnsupportedOperationException If this
+ * <code>BindingProvider</code> uses the XML/HTTP binding.
+ *
+ * @see W3CEndpointReference
+ *
+ * @since JAX-WS 2.1
+ */
+ public EndpointReference getEndpointReference();
+
+ /**
+ * Returns the <code>EndpointReference</code> associated with
+ * this <code>BindingProvider</code> instance. The instance
+ * returned will be of type <code>clazz</code>.
+ * <p>
+ * If the returned <code>EndpointReference</code> is a
+ * <code>W3CEndpointReference</code> it MUST contain
+ * the <code>wsaw:ServiceName</code> element and the
+ * <code>wsaw:EndpointName</code> attribute on the
+ * <code>wsaw:ServiceName</code>. It SHOULD contain
+ * the embedded WSDL in the <code>wsa:Metadata</code> element
+ * if there is an associated WSDL. The
+ * <code>wsaw:InterfaceName</code> MAY also be present.
+ * <br>
+ * See <a href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">
+ * WS-Addressing - WSDL 1.0</a>.
+ *
+ * @param clazz Specifies the type of <code>EndpointReference</code>
+ * that MUST be returned.
+
+ * @return EndpointReference of the target endpoint associated with this
+ * <code>BindingProvider</code> instance. MUST be of type
+ * <code>clazz</code>.
+
+ * @throws javax.xml.ws.WebServiceException If the Class <code>clazz</code>
+ * is not supported by this implementation.
+ * @throws java.lang.UnsupportedOperationException If this
+ * <code>BindingProvider</code> uses the XML/HTTP binding.
+ *
+ * @since JAX-WS 2.1
+ */
+ public <T extends EndpointReference> T getEndpointReference(Class<T> clazz);
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/BindingProvider21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,308 @@
+/*
+ * 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 javax.xml.ws.wsaddressing;
+
+// $Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceException;
+
+import org.w3c.dom.Element;
+
+/**
+ * This class represents a W3C Addressing EndpointReferece which is
+ * a remote reference to a web service endpoint that supports the
+ * W3C WS-Addressing 1.0 - Core Recommendation.
+ * <p>
+ * Developers should use this class in their SEIs if they want to
+ * pass/return endpoint references that represent the W3C WS-Addressing
+ * recommendation.
+ * <p>
+ * JAXB will use the JAXB annotations and bind this class to XML infoset
+ * that is consistent with that defined by WS-Addressing. See
+ * <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">
+ * WS-Addressing</a>
+ * for more information on WS-Addressing EndpointReferences.
+ *
+ * @since JAX-WS 2.1
+ */
+
+// XmlRootElement allows this class to be marshalled on its own
+ at XmlRootElement(name = "EndpointReference", namespace = W3CEndpointReference.NS)
+ at XmlType(name = "EndpointReferenceType", namespace = W3CEndpointReference.NS)
+public final class W3CEndpointReference extends EndpointReference
+{
+ protected static final String NS = "http://www.w3.org/2005/08/addressing";
+
+ private final static JAXBContext w3cjc = getW3CJaxbContext();
+
+ // private but necessary properties for databinding
+ @XmlElement(name = "Address", namespace = NS)
+ private Address address;
+ @XmlElement(name = "ReferenceParameters", namespace = NS)
+ private Elements referenceParameters;
+ @XmlElement(name = "Metadata", namespace = NS)
+ private Elements metadata;
+ @XmlAnyAttribute
+ Map<QName, String> attributes;
+ @XmlAnyElement
+ List<Element> elements;
+
+ // not marshalled
+ private QName serviceName;
+ private QName endpointName;
+ private URL wsdlLocation;
+
+ protected W3CEndpointReference()
+ {
+ }
+
+ /**
+ * construct an EPR from infoset representation
+ *
+ * @param source A source object containing valid XmlInfoset
+ * instance consistent with the W3C WS-Addressing Core
+ * recommendation.
+ *
+ * @throws WebServiceException
+ * If the source does NOT contain a valid W3C WS-Addressing
+ * EndpointReference.
+ * @throws NullPointerException
+ * If the <code>null</code> <code>source</code> value is given
+ */
+ public W3CEndpointReference(Source source)
+ {
+ try
+ {
+ W3CEndpointReference epr = w3cjc.createUnmarshaller().unmarshal(source, W3CEndpointReference.class).getValue();
+ this.address = epr.address;
+ this.metadata = epr.metadata;
+ this.referenceParameters = epr.referenceParameters;
+ }
+ catch (JAXBException e)
+ {
+ throw new WebServiceException("Error unmarshalling W3CEndpointReference ", e);
+ }
+ catch (ClassCastException e)
+ {
+ throw new WebServiceException("Source did not contain W3CEndpointReference", e);
+ }
+ }
+
+ @XmlTransient
+ public String getAddress()
+ {
+ return address != null ? address.getUri() : null;
+ }
+
+ void setAddress(String address)
+ {
+ this.address = new Address(address);
+ }
+
+ @XmlTransient
+ public QName getServiceName()
+ {
+ return serviceName;
+ }
+
+ public void setServiceName(QName serviceName)
+ {
+ this.serviceName = serviceName;
+ }
+
+ @XmlTransient
+ public QName getEndpointName()
+ {
+ return endpointName;
+ }
+
+ public void setEndpointName(QName endpointName)
+ {
+ this.endpointName = endpointName;
+ }
+
+ @XmlTransient
+ public List<Element> getMetadata()
+ {
+ return metadata != null ? metadata.getElements() : null;
+ }
+
+ public void setMetadata(List<Element> metadata)
+ {
+ this.metadata = new Elements(metadata);
+ }
+
+ @XmlTransient
+ public URL getWsdlLocation()
+ {
+ return wsdlLocation;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ try
+ {
+ this.wsdlLocation = wsdlLocation != null ? new URL(wsdlLocation) : null;
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalArgumentException("Invalid URL: " + wsdlLocation);
+ }
+ }
+
+ @XmlTransient
+ public List<Element> getReferenceParameters()
+ {
+ return referenceParameters != null ? referenceParameters.getElements() : null;
+ }
+
+ public void setReferenceParameters(List<Element> metadata)
+ {
+ this.referenceParameters = new Elements(metadata);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void writeTo(Result result)
+ {
+ try
+ {
+ Marshaller marshaller = w3cjc.createMarshaller();
+ marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
+ marshaller.marshal(this, result);
+ }
+ catch (JAXBException e)
+ {
+ throw new WebServiceException("Error marshalling W3CEndpointReference. ", e);
+ }
+ }
+
+ private static JAXBContext getW3CJaxbContext()
+ {
+ try
+ {
+ return JAXBContext.newInstance(new Class[] { W3CEndpointReference.class });
+ }
+ catch (JAXBException ex)
+ {
+ throw new WebServiceException("Cannot obtain JAXB context", ex);
+ }
+ }
+
+ private static class Address
+ {
+ @XmlValue
+ String uri;
+ @XmlAnyAttribute
+ Map<QName, String> attributes;
+
+ protected Address()
+ {
+ }
+
+ public Address(String uri)
+ {
+ this.uri = uri;
+ }
+
+ @XmlTransient
+ public String getUri()
+ {
+ return uri;
+ }
+
+ public void setUri(String uri)
+ {
+ this.uri = uri;
+ }
+
+ @XmlTransient
+ public Map<QName, String> getAttributes()
+ {
+ return attributes;
+ }
+
+ public void setAttributes(Map<QName, String> attributes)
+ {
+ this.attributes = attributes;
+ }
+ }
+
+ private static class Elements
+ {
+ @XmlAnyElement
+ List<Element> elements;
+ @XmlAnyAttribute
+ Map<QName, String> attributes;
+
+ protected Elements()
+ {
+ }
+
+ public Elements(List<Element> elements)
+ {
+ this.elements = elements;
+ }
+
+ @XmlTransient
+ public List<Element> getElements()
+ {
+ return elements;
+ }
+
+ public void setElements(List<Element> elements)
+ {
+ this.elements = elements;
+ }
+
+ @XmlTransient
+ public Map<QName, String> getAttributes()
+ {
+ return attributes;
+ }
+
+ public void setAttributes(Map<QName, String> attributes)
+ {
+ this.attributes = attributes;
+ }
+ }
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReference.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
===================================================================
--- stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java (rev 0)
+++ stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java 2008-04-30 17:41:58 UTC (rev 6809)
@@ -0,0 +1,274 @@
+/*
+ * 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 javax.xml.ws.wsaddressing;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceException;
+
+import org.w3c.dom.Element;
+
+/**
+ * This class is used to build <code>W3CEndpointReference</code>
+ * instances. The intended use of this clsss is for
+ * an application component, for example a factory component,
+ * to create an <code>W3CEndpointReference</code> for a
+ * web service endpoint published by the same
+ * Java EE application. It can also be used to create
+ * <code>W3CEndpointReferences</code> for an Java SE based
+ * endpoint by providing the <code>address</code> property.
+ * <p>
+ * When creating a <code>W3CEndpointReference</code> for an
+ * endpoint that is not published by the same Java EE application,
+ * the <code>address</code> property MUST be specified.
+ * <p>
+ * When creating a <code>W3CEndpointReference</code> for an endpoint
+ * published by the same Java EE application, the <code>address</code>
+ * property MAY be <code>null</code> but then the <code>serviceName</code>
+ * and <code>endpointName</code> MUST specify an endpoint published by
+ * the same Java EE application.
+ * <p>
+ * When the <code>wsdlDocumentLocation</code> is specified it MUST refer
+ * to a valid WSDL document and the <code>serviceName</code> and
+ * <code>endpointName</code> (if specified) MUST match a service and port
+ * in the WSDL document.
+ *
+ * @since JAX-WS 2.1
+ */
+public final class W3CEndpointReferenceBuilder
+{
+
+ private String address;
+ private List<Element> parameters;
+ private List<Element> metadata;
+ private QName serviceName;
+ private QName endpointName;
+ private String wsdlLocation;
+
+ public W3CEndpointReferenceBuilder()
+ {
+ parameters = new ArrayList<Element>();
+ metadata = new ArrayList<Element>();
+ }
+
+ /**
+ * Sets the <code>address</code> to the
+ * <code>W3CEndpointReference</code> instance's
+ * <code>wsa:Address</code>.
+ * <p>
+ * The <code>address</code> MUST be set to a non-<code>null</code>
+ * value when building a <code>W3CEndpointReference</code> for a
+ * web service endpoint that is not published by the same
+ * Java EE application or when running on Java SE.
+ *
+ * @param address The address of the endpoint to be targeted
+ * by the returned <code>W3CEndpointReference<code>.
+ *
+ * @return A <code>W3CEndpointReferenceBuilder</code> instance with
+ * the <code>address</code> set to the <code>wsa:Address</code>.
+ */
+ public W3CEndpointReferenceBuilder address(String address)
+ {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Sets the <code>serviceName</code> as the
+ * <code>wsaw:ServiceName</code> element in the
+ * <code>wsa:Metadata</code> element.
+ *
+ * @param serviceName The service name of the endpoint to be targeted
+ * by the returned <code>W3CEndpointReference<code>. This property
+ * may also be used with the <code>endpointName</code> (portName)
+ * property to lookup the <code>address</code> of a web service
+ * endpoint that is published by the same Java EE application.
+ *
+ * @return A <code>W3CEndpointReferenceBuilder</code> instance with
+ * the <code>serviceName</code> element added to the
+ * <code>wsa:Metadata</code> element.
+ *
+ */
+ public W3CEndpointReferenceBuilder serviceName(QName serviceName)
+ {
+ this.serviceName = serviceName;
+ return this;
+ }
+
+ /**
+ * Sets the <code>endpointName</code> as and attribute on
+ * <code>wsaw:ServiceName</code> element in the
+ * <code>wsa:Metadata</code> element. This method can only
+ * be called after the {@link #serviceName} method has been called.
+ *
+ * @param endpointName The name of the endpoint to be targeted
+ * by the returned <code>W3CEndpointReference<code>. The
+ * <code>endpointName</code> (portName) property may also be
+ * used with the <code>serviceName</code> property to lookup
+ * the <code>address</code> of a web service
+ * endpoint published by the same Java EE application.
+ *
+ * @return A <code>W3CEndpointReferenceBuilder</code> instance with
+ * the <code>endpointName</code> atrribute added to the
+ * <code>wsaw:ServiceName</code> element in the
+ * <code>wsa:Metadata</code> element.
+ *
+ * @throws javax.lang.IllegalStateException If the <code>serviceName</code> has not
+ * been set.
+ */
+ public W3CEndpointReferenceBuilder endpointName(QName endpointName)
+ {
+ if (serviceName == null)
+ {
+ throw new IllegalStateException("The W3CEndpointReferenceBuilder's serviceName must be set before setting the endpointName: " + endpointName);
+ }
+
+ this.endpointName = endpointName;
+ return this;
+ }
+
+ /**
+ * Sets the <code>wsdlDocumentLocation</code> that will be inlined
+ * in the <code>W3CEndpointReferenc</code> instance's
+ * <code>wsa:Metadata</code>.
+ *
+ * @param wsdlDocumentLocation The location of the WSDL document to
+ * be inlined in the <code>wsa:Metadata</code> of the
+ * <code>W3CEndpointReference<code>.
+ *
+ * @return A <code>W3CEndpointReferenceBuilder</code> instance with
+ * the <code>wsdlDocumentLocation</code> that is to be inlined.
+ *
+ */
+ public W3CEndpointReferenceBuilder wsdlDocumentLocation(String wsdlDocumentLocation)
+ {
+ this.wsdlLocation = wsdlDocumentLocation;
+ return this;
+ }
+
+ /**
+ * Adds the <code>referenceParameter</code> to the
+ * <code>W3CEndpointReference</code> instance
+ * <code>wsa:ReferenceParameters</code> element.
+ *
+ * @param referenceParameter The element to be added to the
+ * <code>wsa:ReferenceParameters</code> element.
+ *
+ * @return A <code>W3CEndpointReferenceBuilder</code> instance with
+ * the <code>referenceParameter</code> added to the
+ * <code>wsa:ReferenceParameters</code> element.
+ *
+ * @throws java.lang.IllegalArgumentException if <code>referenceParameter</code>
+ * is <code>null</code>.
+ */
+ public W3CEndpointReferenceBuilder referenceParameter(Element referenceParameter)
+ {
+ if (referenceParameter == null)
+ throw new java.lang.IllegalArgumentException("The referenceParameter cannot be null.");
+ parameters.add(referenceParameter);
+ return this;
+ }
+
+ /**
+ * Adds the <code>metadataElement</code> to the
+ * <code>W3CEndpointReference</code> instance's
+ * <code>wsa:Metadata</code> element.
+ *
+ * @param metadataElement The element to be added to the
+ * <code>wsa:Metadata</code> element.
+ *
+ * @return A <code>W3CEndpointReferenceBuilder</code> instance with
+ * the <code>metadataElement</code> added to the
+ * <code>wsa:Metadata</code> element.
+ *
+ * @throws java.lang.IllegalArgumentException if <code>metadataElement</code>
+ * is <code>null</code>.
+ */
+ public W3CEndpointReferenceBuilder metadata(Element metadataElement)
+ {
+ if (metadataElement == null)
+ throw new java.lang.IllegalArgumentException("The metadataElement cannot be null.");
+ metadata.add(metadataElement);
+ return this;
+ }
+
+ /**
+ * Builds a <code>W3CEndpointReference</code> from the accumulated
+ * properties set on this <code>W3CEndpointReferenceBuilder</code>
+ * instance.
+ * <p>
+ * This method can be used to create a <code>W3CEndpointReference</code>
+ * for any endpoint by specifying the <code>address</code> property along
+ * with any other desired properties. This method
+ * can also be used to create a <code>W3CEndpointReference</code> for
+ * an endpoint that is published by the same Java EE application.
+ * This method can automatically determine the <code>address</code> of
+ * an endpoint published by the same Java EE application that is identified by the
+ * <code>serviceName</code> and
+ * <code>endpointName</code> properties. If the <code>address</code> is
+ * <code>null</code> and the <code>serviceName</code> and
+ * <code>endpointName</code>
+ * do not identify an endpoint published by the same Java EE application, a
+ * <code>javax.lang.IllegalStateException</code> MUST be thrown.
+ *
+ *
+ * @return <code>W3CEndpointReference</code> from the accumulated
+ * properties set on this <code>W3CEndpointReferenceBuilder</code>
+ * instance. This method never returns <code>null</code>.
+ *
+ * @throws javax.lang.IllegalStateException
+ * <ul>
+ * <li>If the <code>address</code>, <code>serviceName</code> and
+ * <code>endpointName</code> are all <code>null</code>.
+ * <li>If the <code>serviceName</code> service is <code>null</code> and the
+ * <code>endpointName</code> is NOT <code>null</code>.
+ * <li>If the <code>address</code> property is <code>null</code> and
+ * the <code>serviceName</code> and <code>endpointName</code> do not
+ * specify a valid endpoint published by the same Java EE
+ * application.
+ * <li>If the <code>serviceName</code>is NOT <code>null</code>
+ * and is not present in the specified WSDL.
+ * <li>If the <code>endpointName</code> port is not <code>null<code> and it
+ * is not present in <code>serviceName</code> service in the WSDL.
+ * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> Pr
+ * and does not represent a valid WSDL.
+ * </ul>
+ * @throws WebServiceException If an error occurs while creating the
+ * <code>W3CEndpointReference</code>.
+ *
+ */
+ public W3CEndpointReference build()
+ {
+ W3CEndpointReference epr = new W3CEndpointReference();
+ epr.setAddress(address);
+ epr.setServiceName(serviceName);
+ epr.setEndpointName(endpointName);
+ epr.setMetadata(metadata);
+ epr.setWsdlLocation(wsdlLocation);
+ epr.setReferenceParameters(parameters);
+ return epr;
+ }
+}
Property changes on: stack/native/branches/tdiesler/trunk/modules/jaxws-impl/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
More information about the jbossws-commits
mailing list