JBossWS SVN: r17370 - in thirdparty/cxf/branches/cxf-2.4.10: rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-28 08:00:27 -0500 (Thu, 28 Feb 2013)
New Revision: 17370
Added:
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyService.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyServiceImpl.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentService.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentServiceImpl.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/URIDomainExpressionBuilder.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/UriDomainExpression.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/server/JavaFirstPolicyServer.java
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/SslUsernamePasswordAttachment.xml
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/UsernamePasswordAttachment.xml
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/client/javafirstclient.xml
thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/server/javafirstserver.xml
Modified:
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/Token.java
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java
Log:
backport CXF-4776 fix, some tests and required part of CXF-4646
Modified: thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java 2013-02-28 11:50:46 UTC (rev 17369)
+++ thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokens12Builder.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -147,6 +147,7 @@
} else if (primitive instanceof Token) {
supportingToken.addToken((Token) primitive);
+ ((Token)primitive).setSupportingToken(supportingToken);
}
}
}
Modified: thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java 2013-02-28 11:50:46 UTC (rev 17369)
+++ thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SupportingTokensBuilder.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -117,6 +117,7 @@
} else if (primitive instanceof Token) {
supportingToken.addToken((Token)primitive);
+ ((Token)primitive).setSupportingToken(supportingToken);
}
}
}
Modified: thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/Token.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/Token.java 2013-02-28 11:50:46 UTC (rev 17369)
+++ thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/Token.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -39,6 +39,11 @@
private String issuerName;
+ /**
+ * A Reference to a parent SupportingToken assertion
+ */
+ private SupportingToken supportingToken;
+
public Token(SPConstants version) {
super(version);
}
@@ -103,4 +108,12 @@
public void setIssuerName(String issuerName) {
this.issuerName = issuerName;
}
+
+ public SupportingToken getSupportingToken() {
+ return supportingToken;
+ }
+
+ public void setSupportingToken(SupportingToken supportingToken) {
+ this.supportingToken = supportingToken;
+ }
}
Modified: thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java 2013-02-28 11:50:46 UTC (rev 17369)
+++ thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -55,6 +55,7 @@
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.policy.SP12Constants;
import org.apache.cxf.ws.security.policy.SPConstants;
+import org.apache.cxf.ws.security.policy.model.SupportingToken;
import org.apache.cxf.ws.security.policy.model.UsernameToken;
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.WSDocInfo;
@@ -245,8 +246,11 @@
tok = (UsernameToken)ai.getAssertion();
if (princ != null && tok.isHashPassword() != princ.isPasswordDigest()) {
ai.setNotAsserted("Password hashing policy not enforced");
+ } else if (princ != null && !tok.isNoPassword() && (princ.getPassword() == null)
+ && isNonEndorsingSupportingToken(tok)) {
+ ai.setNotAsserted("Username Token No Password supplied");
} else {
- ai.setAsserted(true);
+ ai.setAsserted(true);
}
}
ais = aim.getAssertionInfo(SP12Constants.SUPPORTING_TOKENS);
@@ -259,6 +263,26 @@
}
return tok;
}
+
+ /**
+ * Return true if this UsernameToken policy is a (non-endorsing)SupportingToken. If this is
+ * true then the corresponding UsernameToken must have a password element.
+ */
+ private boolean isNonEndorsingSupportingToken(
+ org.apache.cxf.ws.security.policy.model.UsernameToken usernameTokenPolicy
+ ) {
+ SupportingToken supportingToken = usernameTokenPolicy.getSupportingToken();
+ if (supportingToken != null) {
+ SPConstants.SupportTokenType type = supportingToken.getTokenType();
+ if (type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_SUPPORTING
+ || type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_SIGNED
+ || type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_SIGNED_ENCRYPTED
+ || type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_ENCRYPTED) {
+ return true;
+ }
+ }
+ return false;
+ }
private void addUsernameToken(SoapMessage message) {
UsernameToken tok = assertUsernameTokens(message, null);
Modified: thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java 2013-02-28 11:50:46 UTC (rev 17369)
+++ thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/UsernameTokenPolicyValidator.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -29,6 +29,8 @@
import org.apache.cxf.ws.policy.AssertionInfo;
import org.apache.cxf.ws.policy.AssertionInfoMap;
import org.apache.cxf.ws.security.policy.SP12Constants;
+import org.apache.cxf.ws.security.policy.SPConstants;
+import org.apache.cxf.ws.security.policy.model.SupportingToken;
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.WSSecurityEngineResult;
import org.apache.ws.security.message.token.UsernameToken;
@@ -94,10 +96,15 @@
ai.setNotAsserted("Password hashing policy not enforced");
return false;
}
- if (usernameTokenPolicy.isNoPassword() && usernameToken.getPassword() != null) {
+ if (usernameTokenPolicy.isNoPassword() && (usernameToken.getPassword() != null)) {
ai.setNotAsserted("Username Token NoPassword policy not enforced");
return false;
+ } else if (!usernameTokenPolicy.isNoPassword() && (usernameToken.getPassword() == null)
+ && isNonEndorsingSupportingToken(usernameTokenPolicy)) {
+ ai.setNotAsserted("Username Token No Password supplied");
+ return false;
}
+
if (usernameTokenPolicy.isRequireCreated()
&& (usernameToken.getCreated() == null || usernameToken.isHashed())) {
ai.setNotAsserted("Username Token Created policy not enforced");
@@ -112,4 +119,24 @@
return true;
}
+ /**
+ * Return true if this UsernameToken policy is a (non-endorsing)SupportingToken. If this is
+ * true then the corresponding UsernameToken must have a password element.
+ */
+ private boolean isNonEndorsingSupportingToken(
+ org.apache.cxf.ws.security.policy.model.UsernameToken usernameTokenPolicy
+ ) {
+ SupportingToken supportingToken = usernameTokenPolicy.getSupportingToken();
+ if (supportingToken != null) {
+ SPConstants.SupportTokenType type = supportingToken.getTokenType();
+ if (type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_SUPPORTING
+ || type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_SIGNED
+ || type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_SIGNED_ENCRYPTED
+ || type == SPConstants.SupportTokenType.SUPPORTING_TOKEN_ENCRYPTED) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyService.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyService.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyService.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService(name = "JavaFirstAttachmentPolicyService",
+targetNamespace = "http://www.example.org/contract/JavaFirstAttachmentPolicyService")
+public interface JavaFirstAttachmentPolicyService {
+ @WebMethod(operationName = "doOperationLevelPolicy")
+ void doOperationLevelPolicy();
+
+ @WebMethod(operationName = "doInputMessagePolicy")
+ void doInputMessagePolicy();
+
+ @WebMethod(operationName = "doOutputMessagePolicy")
+ void doOutputMessagePolicy();
+
+ @WebMethod(operationName = "doNoPolicy")
+ void doNoPolicy();
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyServiceImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyServiceImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstAttachmentPolicyServiceImpl.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface = "org.apache.cxf.systest.ws.policy.JavaFirstAttachmentPolicyService",
+serviceName = "JavaFirstAttachmentPolicyService",
+targetNamespace = "http://www.example.org/contract/JavaFirstAttachmentPolicyService")
+public class JavaFirstAttachmentPolicyServiceImpl implements JavaFirstAttachmentPolicyService {
+ public void doOperationLevelPolicy() {
+ }
+
+ public void doInputMessagePolicy() {
+ }
+
+ public void doOutputMessagePolicy() {
+ }
+
+ public void doNoPolicy() {
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/JavaFirstPolicyServiceTest.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,162 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.systest.ws.policy.server.JavaFirstPolicyServer;
+import org.apache.cxf.systest.ws.wssec11.client.UTPasswordCallback;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.handler.WSHandlerConstants;
+
+import org.junit.BeforeClass;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class JavaFirstPolicyServiceTest extends AbstractBusClientServerTestBase {
+ static final String PORT = allocatePort(JavaFirstPolicyServer.class);
+ static final String PORT2 = allocatePort(JavaFirstPolicyServer.class, 2);
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("Server failed to launch",
+ // run the server in the same process
+ // set this to false to fork
+ launchServer(JavaFirstPolicyServer.class, true));
+ }
+
+ @org.junit.AfterClass
+ public static void cleanup() throws Exception {
+ String tmpDir = System.getProperty("java.io.tmpdir");
+ if (tmpDir != null) {
+ File[] tmpFiles = new File(tmpDir).listFiles();
+ if (tmpFiles != null) {
+ for (File tmpFile : tmpFiles) {
+ if (tmpFile.exists() && (tmpFile.getName().startsWith("ws-security.nonce.cache.instance")
+ || tmpFile.getName().startsWith("ws-security.timestamp.cache.instance"))) {
+ tmpFile.delete();
+ }
+ }
+ }
+ }
+ stopAllServers();
+ }
+
+ @org.junit.Test
+ public void testUsernameTokenInterceptorNoPasswordValidation() {
+ ClassPathXmlApplicationContext ctx =
+ new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/policy/client/javafirstclient.xml");
+
+ JavaFirstAttachmentPolicyService svc =
+ (JavaFirstAttachmentPolicyService) ctx.getBean("JavaFirstAttachmentPolicyServiceClient");
+
+ Client client = ClientProxy.getClient(svc);
+ client.getEndpoint().getEndpointInfo().setAddress(
+ "http://localhost:" + PORT + "/JavaFirstAttachmentPolicyService");
+
+ WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor();
+ client.getEndpoint().getOutInterceptors().add(wssOut);
+
+ // just some basic sanity tests first to make sure that auth is working where password is provided.
+ wssOut.setProperties(getPasswordProperties("alice", "password"));
+ svc.doInputMessagePolicy();
+
+ wssOut.setProperties(getPasswordProperties("alice", "passwordX"));
+ try {
+ svc.doInputMessagePolicy();
+ fail("Expected authentication failure");
+ } catch (Exception e) {
+ assertTrue(true);
+ }
+
+ wssOut.setProperties(getNoPasswordProperties("alice"));
+
+ try {
+ svc.doInputMessagePolicy();
+ fail("Expected authentication failure");
+ } catch (Exception e) {
+ assertTrue(true);
+ }
+ }
+
+ @org.junit.Test
+ public void testUsernameTokenPolicyValidatorNoPasswordValidation() {
+ ClassPathXmlApplicationContext ctx =
+ new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/policy/client/javafirstclient.xml");
+
+ SslUsernamePasswordAttachmentService svc =
+ (SslUsernamePasswordAttachmentService) ctx.getBean("SslUsernamePasswordAttachmentServiceClient");
+
+ Client client = ClientProxy.getClient(svc);
+ client.getEndpoint().getEndpointInfo().setAddress(
+ "https://localhost:" + PORT2 + "/SslUsernamePasswordAttachmentService");
+
+ WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor();
+ client.getEndpoint().getOutInterceptors().add(wssOut);
+
+ // just some basic sanity tests first to make sure that auth is working where password is provided.
+ wssOut.setProperties(getPasswordProperties("alice", "password"));
+ svc.doSslAndUsernamePasswordPolicy();
+
+ wssOut.setProperties(getPasswordProperties("alice", "passwordX"));
+ try {
+ svc.doSslAndUsernamePasswordPolicy();
+ fail("Expected authentication failure");
+ } catch (Exception e) {
+ assertTrue(true);
+ }
+
+ wssOut.setProperties(getNoPasswordProperties("alice"));
+
+ try {
+ svc.doSslAndUsernamePasswordPolicy();
+ fail("Expected authentication failure");
+ } catch (Exception e) {
+ assertTrue(true);
+ }
+ }
+
+ private Map<String, Object> getPasswordProperties(String username, String password) {
+ UTPasswordCallback callback = new UTPasswordCallback();
+ callback.setAliasPassword(username, password);
+
+ Map<String, Object> outProps = new HashMap<String, Object>();
+ outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
+ outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
+ outProps.put(WSHandlerConstants.PW_CALLBACK_REF, callback);
+ outProps.put(WSHandlerConstants.USER, username);
+ return outProps;
+ }
+
+ private Map<String, Object> getNoPasswordProperties(String username) {
+ Map<String, Object> outProps = new HashMap<String, Object>();
+ outProps.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
+ outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_NONE);
+ outProps.put(WSHandlerConstants.USER, username);
+ return outProps;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentService.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentService.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentService.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService(name = "SslUsernamePasswordAttachmentService",
+targetNamespace = "http://www.example.org/contract/SslUsernamePasswordAttachmentService")
+public interface SslUsernamePasswordAttachmentService {
+ @WebMethod(operationName = "doSslAndUsernamePasswordPolicy")
+ void doSslAndUsernamePasswordPolicy();
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentServiceImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentServiceImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/SslUsernamePasswordAttachmentServiceImpl.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface = "org.apache.cxf.systest.ws.policy.SslUsernamePasswordAttachmentService",
+serviceName = "SslUsernamePasswordAttachmentService",
+targetNamespace = "http://www.example.org/contract/SslUsernamePasswordAttachmentService")
+public class SslUsernamePasswordAttachmentServiceImpl implements SslUsernamePasswordAttachmentService {
+ public void doSslAndUsernamePasswordPolicy() {
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/URIDomainExpressionBuilder.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/URIDomainExpressionBuilder.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/URIDomainExpressionBuilder.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import javax.xml.namespace.QName;
+import org.w3c.dom.Element;
+import org.apache.cxf.ws.policy.attachment.external.DomainExpression;
+import org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilder;
+
+public class URIDomainExpressionBuilder implements DomainExpressionBuilder {
+ private static final Collection<QName> SUPPORTED_TYPES = Collections.unmodifiableList(
+ Arrays.asList(new QName[] {
+ new QName("http://www.w3.org/ns/ws-policy", "URI"),
+ new QName("http://schemas.xmlsoap.org/ws/2004/09/policy", "URI")}));
+
+ public DomainExpression build(Element paramElement) {
+ return new UriDomainExpression(paramElement.getTextContent());
+ }
+
+ public Collection<QName> getDomainExpressionTypes() {
+ return SUPPORTED_TYPES;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/UriDomainExpression.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/UriDomainExpression.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/UriDomainExpression.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy;
+
+import org.apache.cxf.service.model.BindingFaultInfo;
+import org.apache.cxf.service.model.BindingMessageInfo;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.MessageInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.ws.policy.attachment.external.DomainExpression;
+
+public class UriDomainExpression implements DomainExpression {
+ private final String url;
+
+ public UriDomainExpression(final String url) {
+ this.url = url;
+ }
+
+ public boolean appliesTo(BindingMessageInfo bmi) {
+ String serviceName =
+ bmi.getBindingOperation().getBinding().getService().getName().getLocalPart();
+
+ if ("JavaFirstAttachmentPolicyService".equals(serviceName) && "usernamepassword".equals(url)) {
+ return MessageInfo.Type.INPUT.equals(bmi.getMessageInfo().getType());
+ } else if ("SslUsernamePasswordAttachmentService".equals(serviceName)
+ && "sslusernamepassword".equals(url)) {
+ return MessageInfo.Type.INPUT.equals(bmi.getMessageInfo().getType());
+ } else {
+ return false;
+ }
+ }
+
+ public boolean appliesTo(BindingOperationInfo arg0) {
+ return false;
+ }
+
+ public boolean appliesTo(EndpointInfo arg0) {
+ return false;
+ }
+
+ public boolean appliesTo(ServiceInfo arg0) {
+ return false;
+ }
+
+ public boolean appliesTo(BindingFaultInfo arg0) {
+ return false;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/server/JavaFirstPolicyServer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/server/JavaFirstPolicyServer.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/server/JavaFirstPolicyServer.java 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.policy.server;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+import org.junit.Assert;
+
+public class JavaFirstPolicyServer extends AbstractBusTestServerBase {
+
+ public JavaFirstPolicyServer() {
+
+ }
+
+ protected void run() {
+ URL busFile = JavaFirstPolicyServer.class.getResource("javafirstserver.xml");
+ Bus busLocal = new SpringBusFactory().createBus(busFile);
+ BusFactory.setDefaultBus(busLocal);
+ Assert.assertNotNull(busLocal);
+ setBus(busLocal);
+
+ try {
+ new JavaFirstPolicyServer();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/SslUsernamePasswordAttachment.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/SslUsernamePasswordAttachment.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/SslUsernamePasswordAttachment.xml 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<wsp:PolicyAttachment xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+
+ <wsp:AppliesTo>
+ <wsp:URI>sslusernamepassword</wsp:URI>
+ </wsp:AppliesTo>
+
+ <wsp:Policy wsu:Id="UsernameToken"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:TransportBinding>
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken>
+ <wsp:Policy />
+ </sp:HttpsToken>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax />
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128 />
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:TransportBinding>
+
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssUsernameToken11 />
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</wsp:PolicyAttachment>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/UsernamePasswordAttachment.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/UsernamePasswordAttachment.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/java_first_policies/UsernamePasswordAttachment.xml 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<wsp:PolicyAttachment xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+
+ <wsp:AppliesTo>
+ <wsp:URI>usernamepassword</wsp:URI>
+ </wsp:AppliesTo>
+
+ <wsp:Policy wsu:Id="UsernameToken"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
+ sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssUsernameToken11 />
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</wsp:PolicyAttachment>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/client/javafirstclient.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/client/javafirstclient.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/client/javafirstclient.xml 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:p="http://cxf.apache.org/policy"
+ xmlns:sec="http://cxf.apache.org/configuration/security"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+ http://www.w3.org/ns/ws-policy http://www.w3.org/2007/02/ws-policy.xsd"
+>
+ <cxf:bus>
+ <cxf:features>
+ <p:policies/>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+
+ <http:conduit name="https://localhost:.*">
+ <http:tlsClientParameters disableCNCheck="true">
+ <sec:trustManagers>
+ <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
+ </sec:trustManagers>
+ </http:tlsClientParameters>
+ </http:conduit>
+
+ <jaxws:client
+ id="JavaFirstAttachmentPolicyServiceClient" serviceClass="org.apache.cxf.systest.ws.policy.JavaFirstAttachmentPolicyService">
+ </jaxws:client>
+
+ <jaxws:client
+ id="SslUsernamePasswordAttachmentServiceClient" serviceClass="org.apache.cxf.systest.ws.policy.SslUsernamePasswordAttachmentService">
+ </jaxws:client>
+
+
+
+</beans>
Added: thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/server/javafirstserver.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/server/javafirstserver.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.4.10/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/policy/server/javafirstserver.xml 2013-02-28 13:00:27 UTC (rev 17370)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+ xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:p="http://cxf.apache.org/policy"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+ http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
+ http://www.w3.org/ns/ws-policy http://www.w3.org/2007/02/ws-policy.xsd
+ ">
+ <bean
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
+
+ <cxf:bus>
+ <cxf:features>
+ <p:policies />
+ <cxf:logging />
+ </cxf:features>
+ </cxf:bus>
+
+ <httpj:engine-factory id="tls-settings">
+ <httpj:engine port="${testutil.ports.JavaFirstPolicyServer.2}">
+ <httpj:tlsServerParameters>
+ <sec:keyManagers keyPassword="password">
+ <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Bethal.jks"/>
+ </sec:keyManagers>
+ <sec:cipherSuitesFilter>
+ <sec:include>.*_EXPORT_.*</sec:include>
+ <sec:include>.*_EXPORT1024_.*</sec:include>
+ <sec:include>.*_WITH_DES_.*</sec:include>
+ <sec:include>.*_WITH_AES_.*</sec:include>
+ <sec:include>.*_WITH_NULL_.*</sec:include>
+ <sec:exclude>.*_DH_anon_.*</sec:exclude>
+ </sec:cipherSuitesFilter>
+ <sec:clientAuthentication want="true" required="false"/>
+ </httpj:tlsServerParameters>
+ </httpj:engine>
+ </httpj:engine-factory>
+
+ <p:externalAttachment location="classpath:java_first_policies/UsernamePasswordAttachment.xml" />
+ <p:externalAttachment location="classpath:java_first_policies/SslUsernamePasswordAttachment.xml" />
+
+ <!-- register a policy attachment appliesto checker! -->
+ <bean id="uridomainexpressionbuilder"
+ class="org.apache.cxf.systest.ws.policy.URIDomainExpressionBuilder" />
+
+ <bean id="org.apache.cxf.systest.ws.policy.JavaFirstAttachmentPolicyService"
+ class="org.apache.cxf.systest.ws.policy.JavaFirstAttachmentPolicyServiceImpl" />
+
+ <bean id="org.apache.cxf.systest.ws.policy.SslUsernamePasswordAttachmentService"
+ class="org.apache.cxf.systest.ws.policy.SslUsernamePasswordAttachmentServiceImpl" />
+
+ <jaxws:endpoint id="JavaFirstAttachmentPolicyService"
+ address="http://localhost:${testutil.ports.JavaFirstPolicyServer}/JavaFirstAttachm..."
+ implementor="#org.apache.cxf.systest.ws.policy.JavaFirstAttachmentPolicyService">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.wssec10.client.UTPasswordCallback" />
+ </jaxws:properties>
+
+ <jaxws:features>
+ <p:policies />
+ </jaxws:features>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint id="SslUsernamePasswordAttachmentService"
+ address="https://localhost:${testutil.ports.JavaFirstPolicyServer.2}/SslUsernamePa..."
+ implementor="#org.apache.cxf.systest.ws.policy.SslUsernamePasswordAttachmentService">
+
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler"
+ value="org.apache.cxf.systest.ws.wssec10.client.UTPasswordCallback" />
+ </jaxws:properties>
+
+ <jaxws:features>
+ <p:policies />
+ </jaxws:features>
+ </jaxws:endpoint>
+</beans>
11 years, 9 months
JBossWS SVN: r17369 - thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-02-28 06:50:46 -0500 (Thu, 28 Feb 2013)
New Revision: 17369
Modified:
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
Log:
[JBPAPP-10657] Commited changes to ensure parameterized types are populated correctly in the WSDL
Modified: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java 2013-02-28 11:31:41 UTC (rev 17368)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java 2013-02-28 11:50:46 UTC (rev 17369)
@@ -580,6 +580,12 @@
for (Method m : Utils.getGetters(cls, accessType)) {
//map method
Type type = Utils.getMethodReturnType(m);
+ //we want to return the right type for collections so if we get null
+ //from the return type we check if it's ParameterizedType and get the
+ //generic return type.
+ if((type==null) && (m.getGenericReturnType() instanceof ParameterizedType)) {
+ type = m.getGenericReturnType();
+ }
JAXBBeanInfo beanInfo = getBeanInfo(type);
if (beanInfo != null) {
int idx = m.getName().startsWith("get") ? 3 : 2;
Modified: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java 2013-02-28 11:31:41 UTC (rev 17368)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java 2013-02-28 11:50:46 UTC (rev 17369)
@@ -209,9 +209,17 @@
}
static Class<?> getMethodReturnType(Method m) {
- XmlJavaTypeAdapter adapter = getMethodXJTA(m);
- Class<?> adapterType = getTypeFromXmlAdapter(adapter);
- return adapterType != null ? adapterType : m.getReturnType();
+ XmlJavaTypeAdapter adapter = getMethodXJTA(m);
+ //if there is no adapter, yet we have a collection make sure
+ //we return the Generic type; if there is an annotation let the
+ //adapter handle what gets populated
+ if(adapter==null) {
+ if(m.getGenericReturnType() instanceof ParameterizedType) {
+ return null;
+ }
+ }
+ Class<?> adapterType = getTypeFromXmlAdapter(adapter);
+ return adapterType != null ? adapterType : m.getReturnType();
}
@SuppressWarnings({ "rawtypes", "unchecked" })
11 years, 9 months
JBossWS SVN: r17368 - in thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657: rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-02-28 06:31:41 -0500 (Thu, 28 Feb 2013)
New Revision: 17368
Added:
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java
Removed:
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java
Modified:
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Log:
[JBPAPP-10657] Merged and committed original changes from dependant fixes JBPAPP-10564, JBPAPP-10566, JBPAPP-10568
Property changes on: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657
___________________________________________________________________
Added: svn:mergeinfo
+ /thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627:17298
/thirdparty/cxf/branches/cxf-2.2.12-patch02_JBPAPP-10129:17139-17140,17225,17231-17235
Modified: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java 2013-02-28 08:41:36 UTC (rev 17367)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -33,14 +33,13 @@
import java.util.Set;
import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
import javax.xml.namespace.QName;
import org.apache.cxf.common.classloader.ClassLoaderUtils;
@@ -196,13 +195,19 @@
if (anns != null) {
for (Annotation a : anns) {
if (XmlJavaTypeAdapter.class.isAssignableFrom(a.annotationType())) {
- inspectTypeAdapter(((XmlJavaTypeAdapter)a).value());
+ Type t = Utils.getTypeFromXmlAdapter((XmlJavaTypeAdapter)a);
+ if (t != null) {
+ addType(t);
+ }
}
}
}
XmlJavaTypeAdapter xjta = clazz.getAnnotation(XmlJavaTypeAdapter.class);
if (xjta != null) {
- inspectTypeAdapter(xjta.value());
+ Type t = Utils.getTypeFromXmlAdapter(xjta);
+ if (t != null) {
+ addType(t);
+ }
}
}
@@ -285,9 +290,10 @@
}
}
XmlJavaTypeAdapter xjta = cls.getAnnotation(XmlJavaTypeAdapter.class);
- if (xjta != null) {
- Class<? extends XmlAdapter> c2 = xjta.value();
- inspectTypeAdapter(c2);
+ if (xjta != null && Utils.getTypeFromXmlAdapter(xjta) != null) {
+ Type t = Utils.getTypeFromXmlAdapter(xjta);
+ addType(t);
+ return;
}
} else if (classes.contains(cls)) {
return;
@@ -299,16 +305,24 @@
}
}
- private void inspectTypeAdapter(Class<? extends XmlAdapter> aclass) {
- Class<?> c2 = aclass;
- Type sp = c2.getGenericSuperclass();
- while (!XmlAdapter.class.equals(c2) && c2 != null) {
- sp = c2.getGenericSuperclass();
- c2 = c2.getSuperclass();
+ static XmlJavaTypeAdapter getFieldXJTA(final Field f) {
+ XmlJavaTypeAdapter adapter = f.getAnnotation(XmlJavaTypeAdapter.class);
+ if (adapter == null) {
+ adapter = f.getType().getAnnotation(XmlJavaTypeAdapter.class);
}
- if (sp instanceof ParameterizedType) {
- addType(((ParameterizedType)sp).getActualTypeArguments()[0]);
+ if (adapter == null) {
+ XmlJavaTypeAdapters adapters =
+ f.getDeclaringClass().getPackage().getAnnotation(XmlJavaTypeAdapters.class);
+ if (adapters != null) {
+ for (XmlJavaTypeAdapter candidate : adapters.value()) {
+ if (candidate != null && candidate.type().equals(f.getType())) {
+ adapter = candidate;
+ break;
+ }
+ }
+ }
}
+ return adapter;
}
private void walkReferences(Class<?> cls) {
@@ -325,11 +339,7 @@
//We'll grab the public field/method types and then add the ObjectFactory stuff
//as well as look for jaxb.index files in those packages.
- XmlAccessorType accessorType = cls.getAnnotation(XmlAccessorType.class);
- if (accessorType == null && cls.getPackage() != null) {
- accessorType = cls.getPackage().getAnnotation(XmlAccessorType.class);
- }
- XmlAccessType accessType = accessorType != null ? accessorType.value() : XmlAccessType.PUBLIC_MEMBER;
+ XmlAccessType accessType = Utils.getXmlAccessType(cls);
if (accessType != XmlAccessType.PROPERTY) { // only look for fields if we are instructed to
//fields are accessible even if not public, must look at the declared fields
@@ -368,9 +378,6 @@
&& !Modifier.isPublic(field.getModifiers())) {
return false;
}
- if (field.getAnnotation(XmlJavaTypeAdapter.class) != null) {
- return false;
- }
if (accessType == XmlAccessType.NONE
|| accessType == XmlAccessType.PROPERTY) {
return checkJaxbAnnotation(field.getAnnotations());
@@ -397,12 +404,6 @@
return false;
}
- boolean isPropGetter = method.getName().startsWith("get") || method.getName().startsWith("is");
-
- if (!isPropGetter
- || method.getAnnotation(XmlJavaTypeAdapter.class) != null) {
- return false;
- }
int beginIndex = 3;
if (method.getName().startsWith("is")) {
beginIndex = 2;
@@ -428,7 +429,7 @@
* @param annotations the array of annotations from the class member
* @return true if JAXB annotations are present, false otherwise
*/
- private static boolean checkJaxbAnnotation(Annotation[] annotations) {
+ static boolean checkJaxbAnnotation(Annotation[] annotations) {
// must check if there are any jaxb annotations
Package jaxbAnnotationsPackage = XmlElement.class.getPackage();
for (Annotation annotation : annotations) {
@@ -438,4 +439,4 @@
}
return false;
}
-}
\ No newline at end of file
+}
Modified: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java 2013-02-28 08:41:36 UTC (rev 17367)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -48,7 +48,7 @@
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
import javax.xml.bind.attachment.AttachmentMarshaller;
import javax.xml.bind.attachment.AttachmentUnmarshaller;
@@ -65,7 +65,6 @@
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
import org.apache.cxf.common.i18n.Message;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.SOAPConstants;
@@ -335,12 +334,7 @@
try {
writer.writeStartElement("ns1", qn.getLocalPart(), qn.getNamespaceURI());
Class<?> cls = part.getTypeClass();
- XmlAccessorType accessorType = cls.getAnnotation(XmlAccessorType.class);
- if (accessorType == null && cls.getPackage() != null) {
- accessorType = cls.getPackage().getAnnotation(XmlAccessorType.class);
- }
- XmlAccessType accessType = accessorType != null
- ? accessorType.value() : XmlAccessType.PUBLIC_MEMBER;
+ XmlAccessType accessType = Utils.getXmlAccessType(cls);
String namespace = part.getElementQName().getNamespaceURI();
SchemaInfo sch = part.getMessageInfo().getOperation().getInterface()
@@ -353,33 +347,31 @@
LOG.warning("Schema associated with " + namespace + " is null");
}
- for (Field f : cls.getDeclaredFields()) {
- if (JAXBContextInitializer.isFieldAccepted(f, accessType)) {
+ for (Field f : Utils.getFields(cls, accessType)) {
+ XmlAttribute at = f.getAnnotation(XmlAttribute.class);
+ if (at == null) {
QName fname = new QName(namespace, f.getName());
f.setAccessible(true);
if (JAXBSchemaInitializer.isArray(f.getGenericType())) {
- writeArrayObject(marshaller, writer, fname, f.get(elValue));
+ writeArrayObject(marshaller, writer, fname, f.get(elValue));
} else {
- writeObject(marshaller, writer, new JAXBElement(fname, String.class,
- f.get(elValue)));
+ Object o = Utils.getFieldValue(f, elValue);
+ writeObject(marshaller, writer, new JAXBElement(fname, String.class, o));
}
}
}
- for (Method m : cls.getMethods()) {
- if (JAXBContextInitializer.isMethodAccepted(m, accessType)) {
- int idx = m.getName().startsWith("get") ? 3 : 2;
- String name = m.getName().substring(idx);
- name = Character.toLowerCase(name.charAt(0)) + name.substring(1);
- QName mname = new QName(namespace, name);
- if (JAXBSchemaInitializer.isArray(m.getGenericReturnType())) {
- writeArrayObject(marshaller, writer, mname, m.invoke(elValue));
- } else {
- writeObject(marshaller, writer, new JAXBElement(mname, String.class,
- m.invoke(elValue)));
- }
+ for (Method m : Utils.getGetters(cls, accessType)) {
+ int idx = m.getName().startsWith("get") ? 3 : 2;
+ String name = m.getName().substring(idx);
+ name = Character.toLowerCase(name.charAt(0)) + name.substring(1);
+ QName mname = new QName(namespace, name);
+ if (JAXBSchemaInitializer.isArray(m.getGenericReturnType())) {
+ writeArrayObject(marshaller, writer, mname, m.invoke(elValue));
+ } else {
+ Object o = Utils.getMethodValue(m, elValue);
+ writeObject(marshaller, writer, new JAXBElement(mname, String.class, o));
}
}
-
writer.writeEndElement();
writer.flush();
} catch (Exception e) {
@@ -448,55 +440,43 @@
obj = cons.newInstance(new Object[1]);
}
- XmlAccessorType accessorType = cls.getAnnotation(XmlAccessorType.class);
- if (accessorType == null && cls.getPackage() != null) {
- accessorType = cls.getPackage().getAnnotation(XmlAccessorType.class);
- }
- XmlAccessType accessType = accessorType != null
- ? accessorType.value() : XmlAccessType.PUBLIC_MEMBER;
+ XmlAccessType accessType = Utils.getXmlAccessType(cls);
reader.nextTag();
while (reader.getEventType() == XMLStreamReader.START_ELEMENT) {
QName q = reader.getName();
- try {
- Field f = cls.getField(q.getLocalPart());
+ String fieldName = q.getLocalPart();
+ Field f = Utils.getField(cls, accessType, fieldName);
+ if (f != null) {
Type type = f.getGenericType();
- if (JAXBContextInitializer.isFieldAccepted(f, accessType)) {
- f.setAccessible(true);
- if (JAXBSchemaInitializer.isArray(type)) {
- Class<?> compType = JAXBSchemaInitializer
- .getArrayComponentType(type);
- List<Object> ret = unmarshallArray(u, reader,
- q,
- compType,
- createList(type));
- Object o = ret;
- if (!isList(type)) {
- if (compType.isPrimitive()) {
- o = java.lang.reflect.Array.newInstance(compType, ret.size());
- for (int x = 0; x < ret.size(); x++) {
- Array.set(o, x, ret.get(x));
- }
- } else {
- o = ret.toArray((Object[])Array.newInstance(compType, ret.size()));
+ f.setAccessible(true);
+ if (JAXBSchemaInitializer.isArray(type)) {
+ Class<?> compType = JAXBSchemaInitializer.getArrayComponentType(type);
+ List<Object> ret = unmarshallArray(u, reader, q, compType, createList(type));
+ Object o = ret;
+ if (!isList(type)) {
+ if (compType.isPrimitive()) {
+ o = java.lang.reflect.Array.newInstance(compType, ret.size());
+ for (int x = 0; x < ret.size(); x++) {
+ Array.set(o, x, ret.get(x));
}
+ } else {
+ o = ret.toArray((Object[]) Array.newInstance(compType, ret.size()));
}
-
- f.set(obj, o);
- } else {
- f.set(obj, u.unmarshal(reader, f.getType()));
}
+ f.set(obj, o);
+ } else {
+ Object o = getElementValue(u.unmarshal(reader, Utils.getFieldType(f)));
+ Utils.setFieldValue(f, obj, o);
}
- } catch (NoSuchFieldException ex) {
+ } else {
String s = Character.toUpperCase(q.getLocalPart().charAt(0))
+ q.getLocalPart().substring(1);
- Method m = null;
- try {
- m = cls.getMethod("get" + s);
- } catch (NoSuchMethodException mex) {
- m = cls.getMethod("is" + s);
+ Method m = Utils.getMethod(cls, accessType, "get" + s);
+ if (m == null) {
+ m = Utils.getMethod(cls, accessType, "is" + s);
}
Type type = m.getGenericReturnType();
- Method m2 = cls.getMethod("set" + s, m.getReturnType());
+ Method m2 = Utils.getMethod(cls, accessType, "set" + s, m.getReturnType());
if (JAXBSchemaInitializer.isArray(type)) {
Class<?> compType = JAXBSchemaInitializer
.getArrayComponentType(type);
@@ -518,8 +498,8 @@
m2.invoke(obj, o);
} else {
- Object o = getElementValue(u.unmarshal(reader, m.getReturnType()));
- m2.invoke(obj, o);
+ Object o = getElementValue(u.unmarshal(reader, Utils.getMethodReturnType(m)));
+ Utils.setMethodValue(m, m2, obj, o);
}
}
}
@@ -527,7 +507,8 @@
} catch (Exception e) {
throw new Fault(new Message("MARSHAL_ERROR", LOG, e.getMessage()), e);
}
- }
+ }
+
private static void writeObject(Marshaller u, Object source, Object mObj) throws Fault, JAXBException {
if (source instanceof XMLStreamWriter) {
Modified: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java 2013-02-28 08:41:36 UTC (rev 17367)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -26,13 +26,22 @@
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
+import javax.xml.bind.annotation.XmlAccessOrder;
import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorOrder;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlList;
+import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
@@ -368,7 +377,7 @@
MessagePartInfo part = fault.getMessageParts().get(0);
Class<?> cls = part.getTypeClass();
Class<?> cl2 = (Class)fault.getProperty(Class.class.getName());
- if (cls != cl2) {
+ if (cls != cl2) {
QName name = (QName)fault.getProperty("elementName");
part.setElementQName(name);
JAXBBeanInfo beanInfo = getBeanInfo(cls);
@@ -427,6 +436,8 @@
XmlSchemaSequence seq = new XmlSchemaSequence();
ct.setParticle(seq);
+ List<XmlSchemaElement> elementList = new ArrayList<XmlSchemaElement>();
+
Method methods[] = cls.getMethods();
for (Method m : methods) {
if (m.getName().startsWith("get")
@@ -454,15 +465,38 @@
el.setSchemaTypeName(typeName);
}
- seq.getItems().add(el);
+ elementList.add(el);
} catch (Exception e) {
//not mappable
}
}
}
+ XmlAccessorOrder xmlAccessorOrder = cls.getAnnotation(XmlAccessorOrder.class);
+ XmlType xmlTypeAnno = cls.getAnnotation(XmlType.class);
+ String[] propertyOrder = null;
+
+ if (xmlTypeAnno != null && xmlTypeAnno.propOrder().length > 0) {
+ propertyOrder = xmlTypeAnno.propOrder();
+ //TODO: handle @XmlAccessOrder
+ }
+
+ if (propertyOrder != null && propertyOrder.length == elementList.size()) {
+ sortItems(elementList, propertyOrder);
+ } else if (propertyOrder != null && propertyOrder.length != elementList.size()) {
+ LOG.log(Level.WARNING, "propOrder in @XmlType doesn't define all schema elements: "
+ + Arrays.toString(propertyOrder));
+ }
+
+ if (xmlAccessorOrder != null && xmlAccessorOrder.value().equals(XmlAccessOrder.ALPHABETICAL)
+ && propertyOrder == null) {
+ sort(elementList);
+ }
+
+ for (XmlSchemaElement elem : elementList) {
+ seq.getItems().add(elem);
+ }
}
}
-
private void buildExceptionType(MessagePartInfo part, Class<?> cls) {
SchemaInfo schemaInfo = null;
@@ -472,6 +506,15 @@
break;
}
}
+ XmlAccessorOrder xmlAccessorOrder = cls.getAnnotation(XmlAccessorOrder.class);
+ XmlType xmlTypeAnno = cls.getAnnotation(XmlType.class);
+ String[] propertyOrder = null;
+
+ if (xmlTypeAnno != null && xmlTypeAnno.propOrder().length > 0) {
+ propertyOrder = xmlTypeAnno.propOrder();
+ //TODO: handle @XmlAccessOrder
+ }
+
XmlSchema schema;
if (schemaInfo == null) {
schema = schemas.newXmlSchemaInCollection(part.getElementQName().getNamespaceURI());
@@ -521,32 +564,47 @@
if (accessorType == null && cls.getPackage() != null) {
accessorType = cls.getPackage().getAnnotation(XmlAccessorType.class);
}
- XmlAccessType accessType = accessorType != null ? accessorType.value() : XmlAccessType.PUBLIC_MEMBER;
+ XmlAccessType accessType = Utils.getXmlAccessType(cls);
+
+ List<XmlSchemaElement> elementList = new ArrayList<XmlSchemaElement>();
+
+ for (Field f : Utils.getFields(cls, accessType)) {
+ //map field
+ Type type = Utils.getFieldType(f);
+ JAXBBeanInfo beanInfo = getBeanInfo(type);
+ if (beanInfo != null) {
+ addElement(elementList, beanInfo, new QName(namespace, f.getName()), isArray(type));
+ }
+ }
+ for (Method m : Utils.getGetters(cls, accessType)) {
+ //map method
+ Type type = Utils.getMethodReturnType(m);
+ JAXBBeanInfo beanInfo = getBeanInfo(type);
+ if (beanInfo != null) {
+ int idx = m.getName().startsWith("get") ? 3 : 2;
+ String name = m.getName().substring(idx);
+ name = Character.toLowerCase(name.charAt(0)) + name.substring(1);
+ addElement(elementList, beanInfo, new QName(namespace, name), isArray(type));
+ }
+ }
+
+ if (propertyOrder != null && propertyOrder.length == elementList.size()) {
+ sortItems(elementList, propertyOrder);
+ } else if (propertyOrder != null && propertyOrder.length != elementList.size()) {
+ LOG.log(Level.WARNING, "propOrder in @XmlType doesn't define all schema elements: "
+ + Arrays.toString(propertyOrder));
+ }
- for (Field f : cls.getDeclaredFields()) {
- if (JAXBContextInitializer.isFieldAccepted(f, accessType)) {
- //map field
- Type type = f.getGenericType();
- JAXBBeanInfo beanInfo = getBeanInfo(type);
- if (beanInfo != null) {
- addElement(seq, beanInfo, new QName(namespace, f.getName()), isArray(type));
- }
- }
+ if (xmlAccessorOrder != null && xmlAccessorOrder.value().equals(XmlAccessOrder.ALPHABETICAL)
+ && propertyOrder == null) {
+ sort(elementList);
}
- for (Method m : cls.getMethods()) {
- if (JAXBContextInitializer.isMethodAccepted(m, accessType)) {
- //map field
- Type type = m.getGenericReturnType();
- JAXBBeanInfo beanInfo = getBeanInfo(type);
- if (beanInfo != null) {
- int idx = m.getName().startsWith("get") ? 3 : 2;
- String name = m.getName().substring(idx);
- name = Character.toLowerCase(name.charAt(0)) + name.substring(1);
- addElement(seq, beanInfo, new QName(namespace, name), isArray(type));
- }
- }
+
+ for (XmlSchemaElement elem : elementList) {
+ seq.getItems().add(elem);
}
+
part.setProperty(JAXBDataBinding.class.getName() + ".CUSTOM_EXCEPTION", Boolean.TRUE);
}
@@ -561,7 +619,7 @@
return false;
}
- public void addElement(XmlSchemaSequence seq, JAXBBeanInfo beanInfo,
+ public void addElement(List<XmlSchemaElement> elementList, JAXBBeanInfo beanInfo,
QName name, boolean isArray) {
XmlSchemaElement el = new XmlSchemaElement();
el.setName(name.getLocalPart());
@@ -591,7 +649,7 @@
el.setSchemaTypeName(typeName);
}
- seq.getItems().add(el);
+ elementList.add(el);
}
@@ -609,4 +667,25 @@
}
return isExist;
}
+
+ //sort to Alphabetical order
+ private void sort(final List<XmlSchemaElement> elementList) {
+ Collections.sort(elementList, new Comparator<XmlSchemaElement>() {
+ public int compare(XmlSchemaElement e1, XmlSchemaElement e2) {
+ return e1.getName().compareTo(e2.getName());
+ }
+ });
+ }
+
+ private void sortItems(List<XmlSchemaElement> elementList, String[] propOrder) {
+ final List<String> propList = Arrays.asList(propOrder);
+
+ Collections.sort(elementList, new Comparator<XmlSchemaElement>() {
+ public int compare(XmlSchemaElement el1, XmlSchemaElement el2) {
+ int index1 = propList.indexOf(el1.getName());
+ int index2 = propList.indexOf(el2.getName());
+ return index1 - index2;
+ }
+ });
+ }
}
Copied: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java (from rev 17298, thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java)
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -0,0 +1,310 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxb;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
+
+/**
+ * JAXB reflection utilities.
+ */
+final class Utils {
+ private Utils() {
+ }
+
+ static XmlAccessType getXmlAccessType(Class<?> cls) {
+ XmlAccessorType accessorType = cls.getAnnotation(XmlAccessorType.class);
+ if (accessorType == null && cls.getPackage() != null) {
+ accessorType = cls.getPackage().getAnnotation(XmlAccessorType.class);
+ }
+ return accessorType != null
+ ? accessorType.value() : XmlAccessType.PUBLIC_MEMBER;
+ }
+
+ static Collection<Field> getFields(Class<?> cls, XmlAccessType accessType) {
+ return getFieldsInternal(cls, accessType);
+ }
+
+ private static Collection<Field> getFieldsInternal(Class<?> cls, XmlAccessType accessType) {
+ Set<Field> fields = new HashSet<Field>();
+ Class<?> superClass = cls.getSuperclass();
+ if (superClass != null && !superClass.equals(Object.class) && !superClass.equals(Throwable.class)) {
+ // process super class until java.lang.Object or java.lang.Throwable is not reached
+ fields.addAll(getFieldsInternal(superClass, accessType));
+ }
+ // process current class
+ for (Field field : cls.getDeclaredFields()) {
+ if (JAXBContextInitializer.isFieldAccepted(field, accessType)) {
+ fields.add(field);
+ }
+ }
+ return fields;
+ }
+
+ private static Collection<Method> getMethods(Class<?> cls,
+ XmlAccessType accessType, boolean acceptSetters) {
+ return getMethodsInternal(cls, accessType, acceptSetters);
+ }
+
+ private static Collection<Method> getMethodsInternal(Class<?> cls, XmlAccessType accessType,
+ boolean acceptSetters) {
+ Set<Method> methods = new HashSet<Method>();
+ Class<?> superClass = cls.getSuperclass();
+ if (superClass != null && !superClass.equals(Object.class) && !superClass.equals(Throwable.class)) {
+ // process super class until java.lang.Object or java.lang.Throwable is not reached
+ methods.addAll(getMethodsInternal(superClass, accessType, acceptSetters));
+ }
+ // process current class
+ for (Method method : cls.getDeclaredMethods()) {
+ if (isMethodAccepted(method, accessType, acceptSetters)) {
+ methods.add(method);
+ }
+ }
+ return methods;
+ }
+
+ static Method getMethod(Class<?> cls, XmlAccessType accessType, String methodName,
+ Class<?>... paramTypes) {
+ for (Method m : getMethods(cls, accessType, true)) {
+ if (m.getName().equals(methodName) && Arrays.equals(m.getParameterTypes(), paramTypes)) {
+ return m;
+ }
+ }
+ return null;
+ }
+
+ static Field getField(Class<?> cls, XmlAccessType accessType, String fieldName) {
+ for (final Field f : getFields(cls, accessType)) {
+ if (f.getName().equals(fieldName)) {
+ return f;
+ }
+ }
+ return null;
+ }
+
+ static Collection<Method> getGetters(Class<?> cls, XmlAccessType accessType) {
+ return getMethods(cls, accessType, false);
+ }
+
+ static boolean isMethodAccepted(Method method, XmlAccessType accessType, boolean acceptSetters) {
+ // ignore bridge, static, @XmlTransient methods plus methods declared in Throwable
+ if (method.isBridge()
+ || Modifier.isStatic(method.getModifiers())
+ || method.isAnnotationPresent(XmlTransient.class)
+ || method.getDeclaringClass().equals(Throwable.class)) {
+ return false;
+ }
+ // Allow only public methods if PUBLIC_MEMBER access is requested
+ if (accessType == XmlAccessType.PUBLIC_MEMBER && !Modifier.isPublic(method.getModifiers())) {
+ return false;
+ }
+ if (isGetter(method)) {
+ // does nothing
+ } else if (isSetter(method)) {
+ if (!acceptSetters) {
+ return false;
+ }
+ } else {
+ // we accept only getters and setters
+ return false;
+ }
+ // let JAXB annotations decide if NONE or FIELD access is requested
+ if (accessType == XmlAccessType.NONE || accessType == XmlAccessType.FIELD) {
+ return JAXBContextInitializer.checkJaxbAnnotation(method.getAnnotations());
+ }
+ // method accepted
+ return true;
+ }
+
+ private static boolean isGetter(Method m) {
+ if (m.getReturnType() != Void.class
+ && m.getReturnType() != Void.TYPE
+ && m.getParameterTypes().length == 0) {
+ Method setter = getSetter(m);
+ if (setter != null) {
+ return !setter.isAnnotationPresent(XmlTransient.class);
+ }
+ }
+ return false;
+ }
+
+ private static Method getSetter(Method m) {
+ final int index = getterIndex(m.getName());
+ if (index != -1) {
+ String setterName = "set" + m.getName().substring(index);
+ Class<?> paramTypes = m.getReturnType();
+ return getDeclaredMethod(m.getDeclaringClass(), setterName, paramTypes);
+ }
+ return null;
+ }
+
+ private static boolean isSetter(Method m) {
+ Class<?> declaringClass = m.getDeclaringClass();
+ boolean isVoidReturnType = m.getReturnType() == Void.class || m.getReturnType() == Void.TYPE;
+ if (isVoidReturnType && m.getParameterTypes().length == 1 && m.getName().startsWith("set")) {
+ String getterName = "get" + m.getName().substring(3);
+ Class<?> setterParamType = m.getParameterTypes()[0];
+ Method getter = getDeclaredMethod(declaringClass, getterName);
+ if (getter != null && getter.getReturnType().equals(setterParamType)
+ && !getter.isAnnotationPresent(XmlTransient.class)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static int getterIndex(String methodName) {
+ if (methodName.startsWith("is")) {
+ return 2;
+ }
+ if (methodName.startsWith("get")) {
+ return 3;
+ }
+ return -1;
+ }
+
+ private static Method getDeclaredMethod(Class<?> cls, String methodName, Class<?>... paramTypes) {
+ try {
+ return cls.getDeclaredMethod(methodName, paramTypes);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ static Class<?> getFieldType(Field f) {
+ XmlJavaTypeAdapter adapter = getFieldXJTA(f);
+ Class<?> adapterType = getTypeFromXmlAdapter(adapter);
+ return adapterType != null ? adapterType : f.getType();
+ }
+
+ static Class<?> getMethodReturnType(Method m) {
+ XmlJavaTypeAdapter adapter = getMethodXJTA(m);
+ Class<?> adapterType = getTypeFromXmlAdapter(adapter);
+ return adapterType != null ? adapterType : m.getReturnType();
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ static Object getFieldValue(Field f, Object target) throws Exception {
+ XmlJavaTypeAdapter adapterAnnotation = getFieldXJTA(f);
+ XmlAdapter adapter = getXmlAdapter(adapterAnnotation);
+ return adapter != null ? adapter.marshal(f.get(target)) : f.get(target);
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ static Object getMethodValue(Method m, Object target) throws Exception {
+ XmlJavaTypeAdapter adapterAnnotation = getMethodXJTA(m);
+ XmlAdapter adapter = getXmlAdapter(adapterAnnotation);
+ return adapter != null ? adapter.marshal(m.invoke(target)) : m.invoke(target);
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ static void setFieldValue(Field f, Object target, Object value) throws Exception {
+ XmlJavaTypeAdapter xjta = getFieldXJTA(f);
+ XmlAdapter adapter = getXmlAdapter(xjta);
+ f.set(target, adapter != null ? adapter.unmarshal(value) : value);
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ static void setMethodValue(Method getter, Method setter, Object target, Object value) throws Exception {
+ XmlJavaTypeAdapter xjta = getMethodXJTA(getter);
+ XmlAdapter adapter = getXmlAdapter(xjta);
+ setter.invoke(target, adapter != null ? adapter.unmarshal(value) : value);
+ }
+
+ @SuppressWarnings("rawtypes")
+ static XmlAdapter getXmlAdapter(XmlJavaTypeAdapter adapterAnnotation)
+ throws InstantiationException, IllegalAccessException {
+ return adapterAnnotation != null ? adapterAnnotation.value().newInstance() : null;
+ }
+
+ static XmlJavaTypeAdapter getFieldXJTA(final Field f) {
+ XmlJavaTypeAdapter adapter = f.getAnnotation(XmlJavaTypeAdapter.class);
+ if (adapter == null) {
+ adapter = f.getType().getAnnotation(XmlJavaTypeAdapter.class);
+ }
+ if (adapter == null) {
+ XmlJavaTypeAdapters adapters =
+ f.getDeclaringClass().getPackage().getAnnotation(XmlJavaTypeAdapters.class);
+ if (adapters != null) {
+ for (XmlJavaTypeAdapter candidate : adapters.value()) {
+ if (candidate != null && candidate.type().equals(f.getType())) {
+ adapter = candidate;
+ break;
+ }
+ }
+ }
+ }
+ return adapter;
+ }
+
+ static XmlJavaTypeAdapter getMethodXJTA(final Method m) {
+ XmlJavaTypeAdapter adapter = m.getAnnotation(XmlJavaTypeAdapter.class);
+ if (adapter == null) {
+ Method setter = getSetter(m);
+ adapter = setter.getAnnotation(XmlJavaTypeAdapter.class);
+ }
+ if (adapter == null) {
+ adapter = m.getReturnType().getAnnotation(XmlJavaTypeAdapter.class);
+ }
+ if (adapter == null) {
+ XmlJavaTypeAdapters adapters =
+ m.getDeclaringClass().getPackage().getAnnotation(XmlJavaTypeAdapters.class);
+ if (adapters != null) {
+ for (XmlJavaTypeAdapter candidate : adapters.value()) {
+ if (candidate != null && candidate.type().equals(m.getGenericReturnType())) {
+ adapter = candidate;
+ break;
+ }
+ }
+ }
+ }
+ return adapter;
+ }
+
+ static Class<?> getTypeFromXmlAdapter(XmlJavaTypeAdapter xjta) {
+ if (xjta != null) {
+ Class<?> c2 = xjta.value();
+ Type sp = c2.getGenericSuperclass();
+ while (!XmlAdapter.class.equals(c2) && c2 != null) {
+ sp = c2.getGenericSuperclass();
+ c2 = c2.getSuperclass();
+ }
+ if (sp instanceof ParameterizedType) {
+ return (Class<?>)((ParameterizedType)sp).getActualTypeArguments()[0];
+ }
+ }
+ return null;
+ }
+
+}
Deleted: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java 2013-02-12 14:24:29 UTC (rev 17298)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -1,26 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.tools.fortest.exception;
-
-import javax.jws.WebService;
-
-@WebService(targetNamespace = "http://cxf.apache.org/test/HelloService", name = "HelloService")
-public interface Echo {
- String echo(String request) throws MyException;
-}
Copied: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java (from rev 17298, thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java)
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.tools.fortest.exception;
+
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://cxf.apache.org/test/HelloService", name = "HelloService")
+public interface Echo {
+ String echo(String request) throws MyException;
+}
Deleted: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java 2013-02-12 14:24:29 UTC (rev 17298)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.tools.fortest.exception;
-
-import javax.jws.WebService;
-
-@WebService(serviceName = "HelloService",
- portName = "HelloPort",
- endpointInterface = "org.apache.cxf.tools.fortest.exception.Echo",
- targetNamespace = "http://cxf.apache.org/test/HelloService")
-public class EchoImpl {
- public String echo(String request) throws MyException {
- return "Response";
-
- }
-
-}
Copied: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java (from rev 17298, thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java)
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/EchoImpl.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.tools.fortest.exception;
+
+import javax.jws.WebService;
+
+@WebService(serviceName = "HelloService",
+ portName = "HelloPort",
+ endpointInterface = "org.apache.cxf.tools.fortest.exception.Echo",
+ targetNamespace = "http://cxf.apache.org/test/HelloService")
+public class EchoImpl {
+ public String echo(String request) throws MyException {
+ return "Response";
+
+ }
+
+}
Deleted: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java 2013-02-12 14:24:29 UTC (rev 17298)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.tools.fortest.exception;
-
-import javax.xml.bind.annotation.XmlType;
-
-(a)javax.xml.ws.WebFault
-@XmlType(namespace = "http://cxf.apache.org/test/HelloService",
- name = "MyException",
- propOrder = { "summary", "from", "id" })
-public class MyException extends SuperException {
- private static final long serialVersionUID = 8575109064272599936L;
- private String summary;
- private String from;
-
- public MyException(String message) {
- super(message);
- }
-
- public void setSummary(String summary) {
- this.summary = summary;
- }
-
- public void setFrom(String from) {
- this.from = from;
- }
-
- public String getSummary() {
- return summary;
- }
-
- public String getFrom() {
- return from;
- }
-
-}
Copied: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java (from rev 17298, thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java)
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyException.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.tools.fortest.exception;
+
+import javax.xml.bind.annotation.XmlType;
+
+(a)javax.xml.ws.WebFault
+@XmlType(namespace = "http://cxf.apache.org/test/HelloService",
+ name = "MyException",
+ propOrder = { "summary", "from", "id" })
+public class MyException extends SuperException {
+ private static final long serialVersionUID = 8575109064272599936L;
+ private String summary;
+ private String from;
+
+ public MyException(String message) {
+ super(message);
+ }
+
+ public void setSummary(String summary) {
+ this.summary = summary;
+ }
+
+ public void setFrom(String from) {
+ this.from = from;
+ }
+
+ public String getSummary() {
+ return summary;
+ }
+
+ public String getFrom() {
+ return from;
+ }
+
+}
Deleted: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java 2013-02-12 14:24:29 UTC (rev 17298)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.tools.fortest.exception;
-
-public class SuperException extends Exception {
- private static final long serialVersionUID = 1L;
- private int id;
-
- public SuperException(String message) {
- super(message);
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public int getId() {
- return id;
- }
-}
Copied: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java (from rev 17298, thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10627/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java)
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.java 2013-02-28 11:31:41 UTC (rev 17368)
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.tools.fortest.exception;
+
+public class SuperException extends Exception {
+ private static final long serialVersionUID = 1L;
+ private int id;
+
+ public SuperException(String message) {
+ super(message);
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public int getId() {
+ return id;
+ }
+}
11 years, 9 months
JBossWS SVN: r17367 - shared-testsuite/trunk/testsuite/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-28 03:41:36 -0500 (Thu, 28 Feb 2013)
New Revision: 17367
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
Log:
AS8 moved to annotations api 1.2
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2013-02-28 08:25:04 UTC (rev 17366)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2013-02-28 08:41:36 UTC (rev 17367)
@@ -484,7 +484,7 @@
<include name="jboss-servlet-api_3.0_spec-*.jar"/>
</fileset>
<fileset dir="${jboss.home}/modules/system/layers/base/javax/annotation/api/main/">
- <include name="jboss-annotations-api_1.1_spec-*.jar"/>
+ <include name="jboss-annotations-api_1.2_spec-*.jar"/>
</fileset>
</path>
11 years, 9 months
JBossWS SVN: r17366 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-28 03:25:04 -0500 (Thu, 28 Feb 2013)
New Revision: 17366
Modified:
stack/cxf/trunk/pom.xml
Log:
Move to wss4j 1.6.10-SNAPSHOT as CXF 2.7.4-SNAPSHOT depends on it
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
+++ stack/cxf/trunk/pom.xml 2013-02-28 08:25:04 UTC (rev 17366)
@@ -104,7 +104,7 @@
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
<xmlsec.version>1.5.3</xmlsec.version>
- <wss4j.version>1.6.9</wss4j.version>
+ <wss4j.version>1.6.10-SNAPSHOT</wss4j.version>
<wstx.version>4.1.4</wstx.version>
<spring.version>3.0.7.RELEASE</spring.version>
</properties>
11 years, 9 months
JBossWS SVN: r17365 - in stack/cxf/trunk: modules/addons and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-27 12:36:40 -0500 (Wed, 27 Feb 2013)
New Revision: 17365
Modified:
stack/cxf/trunk/modules/addons/pom.xml
stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/endorsed/pom.xml
stack/cxf/trunk/modules/resources/pom.xml
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
stack/cxf/trunk/modules/testsuite/pom.xml
stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml
stack/cxf/trunk/pom.xml
Log:
Go ahead with dev...
Modified: stack/cxf/trunk/modules/addons/pom.xml
===================================================================
--- stack/cxf/trunk/modules/addons/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/addons/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml
===================================================================
--- stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-addons</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/client/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/dist/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/endorsed/pom.xml
===================================================================
--- stack/cxf/trunk/modules/endorsed/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/endorsed/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/resources/pom.xml
===================================================================
--- stack/cxf/trunk/modules/resources/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/resources/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/server/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-02-27 17:24:51 UTC (rev 17364)
+++ stack/cxf/trunk/pom.xml 2013-02-27 17:36:40 UTC (rev 17365)
@@ -32,7 +32,7 @@
<description>JBossWS CXF stack</description>
- <version>4.2.0.Alpha1</version>
+ <version>4.2.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -43,9 +43,9 @@
<!-- Source Control Management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf-4....</developerConnection>
- <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/cxf/tags/jbossws-cxf-4.2.0...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/cxf/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/cxf/trunk</developerConnection>
+ <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/cxf/trunk</url>
</scm>
<!-- Modules -->
@@ -59,21 +59,21 @@
<!-- Properties -->
<properties>
- <jbossws.api.version>1.0.2.Alpha1</jbossws.api.version>
- <jbossws.spi.version>2.1.1.Final</jbossws.spi.version>
- <jbossws.common.version>2.1.1.Final</jbossws.common.version>
+ <jbossws.api.version>1.0.2-SNAPSHOT</jbossws.api.version>
+ <jbossws.spi.version>2.2.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.2.0-SNAPSHOT</jbossws.common.version>
<jbossws.common.tools.version>1.1.0.Final</jbossws.common.tools.version>
- <jbossws.shared.testsuite.version>4.2.0.Alpha1</jbossws.shared.testsuite.version>
+ <jbossws.shared.testsuite.version>4.2.0-SNAPSHOT</jbossws.shared.testsuite.version>
<jbossws.jboss712.version>4.1.1.Final</jbossws.jboss712.version>
<jbossws.jboss713.version>4.1.1.Final</jbossws.jboss713.version>
- <jbossws.jboss720.version>4.2.0.Alpha1</jbossws.jboss720.version>
+ <jbossws.jboss720.version>4.2.0-SNAPSHOT</jbossws.jboss720.version>
<jbossws.native.version>4.1.1.Final</jbossws.native.version>
<jboss712.version>7.1.2.Final</jboss712.version>
<jboss713.version>7.1.3.Final</jboss713.version>
<jboss720.version>7.2.0.Final</jboss720.version>
<jboss800.version>8.0.0.Alpha1-SNAPSHOT</jboss800.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
- <cxf.version>2.7.3</cxf.version>
+ <cxf.version>2.7.4-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.6.0</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
11 years, 9 months
JBossWS SVN: r17364 - in hudson/trunk: hudson-home/jobs/AS-8.0.0 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-27 12:24:51 -0500 (Wed, 27 Feb 2013)
New Revision: 17364
Modified:
hudson/trunk/ant.properties.example
hudson/trunk/hudson-home/jobs/AS-8.0.0/config.xml
Log:
Default to using jdk7 and seet JAVA_HOME when building AS8. Will need to update jobs name later.
Modified: hudson/trunk/ant.properties.example
===================================================================
--- hudson/trunk/ant.properties.example 2013-02-27 14:44:49 UTC (rev 17363)
+++ hudson/trunk/ant.properties.example 2013-02-27 17:24:51 UTC (rev 17364)
@@ -9,7 +9,7 @@
jboss.bind.address=localhost
# JDK settings
-java.home.sun.jdk6=/usr/java/jdk1.6
+java.home.sun.jdk6=/usr/java/jdk1.7
# Hudson QA Environment
hudson.root=/data/workspace
Modified: hudson/trunk/hudson-home/jobs/AS-8.0.0/config.xml
===================================================================
--- hudson/trunk/hudson-home/jobs/AS-8.0.0/config.xml 2013-02-27 14:44:49 UTC (rev 17363)
+++ hudson/trunk/hudson-home/jobs/AS-8.0.0/config.xml 2013-02-27 17:24:51 UTC (rev 17364)
@@ -60,7 +60,7 @@
<hudson.tasks.Shell>
<command>MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=128m"
export MAVEN_OPTS
-
+export JAVA_HOME=(a)java.home.sun.jdk6@
./build.sh clean install -Dskip-download-sources -DskipTests=true -U -B</command>
</hudson.tasks.Shell>
</builders>
11 years, 9 months
JBossWS SVN: r17363 - stack/cxf/tags.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-27 09:44:49 -0500 (Wed, 27 Feb 2013)
New Revision: 17363
Added:
stack/cxf/tags/jbossws-cxf-4.2.0.Alpha1/
Log:
Tagging jbossws-cxf-4.2.0.Alpha1
11 years, 9 months
JBossWS SVN: r17362 - in stack/cxf/trunk: modules/addons and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-27 09:41:30 -0500 (Wed, 27 Feb 2013)
New Revision: 17362
Modified:
stack/cxf/trunk/modules/addons/pom.xml
stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/endorsed/pom.xml
stack/cxf/trunk/modules/resources/pom.xml
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
stack/cxf/trunk/modules/testsuite/pom.xml
stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml
stack/cxf/trunk/pom.xml
Log:
Preparing for tagging
Modified: stack/cxf/trunk/modules/addons/pom.xml
===================================================================
--- stack/cxf/trunk/modules/addons/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/addons/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml
===================================================================
--- stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/addons/transports/http/httpserver/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-addons</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/client/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/dist/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/endorsed/pom.xml
===================================================================
--- stack/cxf/trunk/modules/endorsed/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/endorsed/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/resources/pom.xml
===================================================================
--- stack/cxf/trunk/modules/resources/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/resources/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/server/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-02-27 14:02:16 UTC (rev 17361)
+++ stack/cxf/trunk/pom.xml 2013-02-27 14:41:30 UTC (rev 17362)
@@ -32,7 +32,7 @@
<description>JBossWS CXF stack</description>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.0.Alpha1</version>
<!-- Parent -->
<parent>
@@ -43,9 +43,9 @@
<!-- Source Control Management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/cxf/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/cxf/trunk</developerConnection>
- <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/cxf/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf-4....</developerConnection>
+ <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/cxf/tags/jbossws-cxf-4.2.0...</url>
</scm>
<!-- Modules -->
@@ -59,21 +59,21 @@
<!-- Properties -->
<properties>
- <jbossws.api.version>1.0.2-SNAPSHOT</jbossws.api.version>
- <jbossws.spi.version>2.2.0-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>2.2.0-SNAPSHOT</jbossws.common.version>
+ <jbossws.api.version>1.0.2.Alpha1</jbossws.api.version>
+ <jbossws.spi.version>2.1.1.Final</jbossws.spi.version>
+ <jbossws.common.version>2.1.1.Final</jbossws.common.version>
<jbossws.common.tools.version>1.1.0.Final</jbossws.common.tools.version>
- <jbossws.shared.testsuite.version>4.2.0-SNAPSHOT</jbossws.shared.testsuite.version>
+ <jbossws.shared.testsuite.version>4.2.0.Alpha1</jbossws.shared.testsuite.version>
<jbossws.jboss712.version>4.1.1.Final</jbossws.jboss712.version>
<jbossws.jboss713.version>4.1.1.Final</jbossws.jboss713.version>
- <jbossws.jboss720.version>4.2.0-SNAPSHOT</jbossws.jboss720.version>
+ <jbossws.jboss720.version>4.2.0.Alpha1</jbossws.jboss720.version>
<jbossws.native.version>4.1.1.Final</jbossws.native.version>
<jboss712.version>7.1.2.Final</jboss712.version>
<jboss713.version>7.1.3.Final</jboss713.version>
<jboss720.version>7.2.0.Final</jboss720.version>
<jboss800.version>8.0.0.Alpha1-SNAPSHOT</jboss800.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
- <cxf.version>2.7.3-SNAPSHOT</cxf.version>
+ <cxf.version>2.7.3</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.6.0</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
11 years, 9 months
JBossWS SVN: r17361 - thirdparty/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-02-27 09:02:16 -0500 (Wed, 27 Feb 2013)
New Revision: 17361
Added:
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10657/
Log:
[JBPAPP-10657] Create one off patch branch
11 years, 9 months