JBossWS SVN: r17378 - in stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws: extensions/security and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2013-03-04 09:57:40 -0500 (Mon, 04 Mar 2013)
New Revision: 17378
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedAuthenticationException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityHeaderException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityTokenException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/SecurityTokenUnavailableException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedAlgorithmException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedSecurityTokenException.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
Log:
Various improvements to WS-Security error handling:
- Fix JBPAPP-10468: WSSecurityException conversion to SOAP 1.2 fault fails
- Marking several exceptions as external errors (e.g. InvalidSecurityTokenException)
- This will make the SOAP 1.2 fault code be "Sender" rather than "Receiver"
- Printing the stack trace of the original exception before converstion to SOAP fault
- The stack trace is truncated at the HTTPServlet frame to reduce redundancy
- Stop redundant namespace declarations from being added to the SOAP fault envelope
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -800,7 +800,7 @@
public void writeElement(Writer writer)
{
- new DOMWriter(writer).print(this);
+ new DOMWriter(writer).setCompleteNamespaces(false).print(this);
}
private static SOAPElement getChildElement(SOAPElement element, QName name)
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -25,16 +25,20 @@
import java.util.List;
import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.soap.SOAPBinding;
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPFaultException;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException;
import org.jboss.ws.extensions.security.exception.WSSecurityException;
import org.jboss.ws.extensions.security.nonce.DefaultNonceFactory;
@@ -263,21 +267,65 @@
return newList;
}
- private CommonSOAPFaultException convertToFault(WSSecurityException e)
+ private RuntimeException convertToFault(WSSecurityException e) throws SOAPException
{
return convertToFault(e, VERBOSE_EXCEPTION_REPORTING);
}
- private CommonSOAPFaultException convertToFault(WSSecurityException e, boolean verbose)
+ private RuntimeException convertToFault(WSSecurityException e, boolean verbose) throws SOAPException
{
- if (verbose) {
- return new CommonSOAPFaultException(e.getFaultCode(), e.getFaultString());
- } else {
- QName faultCode = new QName(Constants.JBOSS_WSSE_NS, "GenericError", Constants.JBOSS_WSSE_PREFIX);
- return new CommonSOAPFaultException(faultCode, "A WS-Security error occurred.");
+ //Try to reduce redundant stack trace elements printed to log
+ chopStackTrace(e);
+ log.error("Original WSSecurityException: ", e);
+
+ if(isSOAP12())
+ {
+ SOAPFaultImpl fault = new SOAPFaultImpl(
+ org.jboss.ws.Constants.PREFIX_ENV,
+ org.jboss.ws.Constants.NS_SOAP12_ENV
+ );
+
+ if(e.isInternalError())
+ fault.setFaultCode(SOAPConstants.SOAP_RECEIVER_FAULT);
+ else
+ fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
+
+ fault.appendFaultSubcode(e.getFaultCode());
+ fault.setFaultString(e.getFaultString());
+
+ return new SOAPFaultException(fault);
}
+ else
+ {
+ if (verbose)
+ {
+ return new CommonSOAPFaultException(e.getFaultCode(), e.getFaultString());
+ }
+ else
+ {
+ QName faultCode = new QName(Constants.JBOSS_WSSE_NS, "GenericError", Constants.JBOSS_WSSE_PREFIX);
+ return new CommonSOAPFaultException(faultCode, "A WS-Security error occurred.");
+ }
+ }
}
+ private void chopStackTrace(Exception e)
+ {
+ StackTraceElement[] original = e.getStackTrace();
+ int cutOffElement = 0;
+ for(; cutOffElement < original.length; cutOffElement++)
+ {
+ StackTraceElement elem = original[cutOffElement];
+ String className = elem.getClassName();
+ if("javax.servlet.http.HttpServlet".equals(className))
+ {
+ StackTraceElement[] newSte = new StackTraceElement[cutOffElement + 1];
+ System.arraycopy(original, 0, newSte, 0, cutOffElement + 1);
+ e.setStackTrace(newSte);
+ }
+ }
+ }
+
private List<RequireOperation> buildRequireOperations(Config operationConfig, boolean fault)
{
if (operationConfig == null)
@@ -368,4 +416,20 @@
return requires != null && (!fault || requires.includesFaults());
}
+
+ private static boolean isSOAP12()
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ if (msgContext != null)
+ {
+ EndpointMetaData emd = msgContext.getEndpointMetaData();
+ String bindingId = emd.getBindingId();
+ if (SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId) || SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bindingId))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedAuthenticationException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedAuthenticationException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedAuthenticationException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -39,6 +39,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public FailedAuthenticationException(Throwable cause)
@@ -46,6 +47,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public FailedAuthenticationException(String message)
@@ -53,6 +55,7 @@
super(message);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
public FailedAuthenticationException(String message, Throwable cause)
@@ -60,5 +63,6 @@
super(message, cause);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -39,6 +39,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public FailedCheckException(Throwable cause)
@@ -46,6 +47,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public FailedCheckException(String message)
@@ -60,5 +62,6 @@
super(message, cause);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityHeaderException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityHeaderException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityHeaderException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -39,6 +39,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public InvalidSecurityHeaderException(Throwable cause)
@@ -46,6 +47,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public InvalidSecurityHeaderException(String message)
@@ -53,6 +55,7 @@
super(message);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
public InvalidSecurityHeaderException(String message, Throwable cause)
@@ -60,5 +63,6 @@
super(message, cause);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityTokenException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityTokenException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/InvalidSecurityTokenException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -39,6 +39,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public InvalidSecurityTokenException(Throwable cause)
@@ -46,6 +47,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public InvalidSecurityTokenException(String message)
@@ -53,6 +55,7 @@
super(message);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
public InvalidSecurityTokenException(String message, Throwable cause)
@@ -60,5 +63,6 @@
super(message, cause);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/SecurityTokenUnavailableException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/SecurityTokenUnavailableException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/SecurityTokenUnavailableException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -39,6 +39,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public SecurityTokenUnavailableException(Throwable cause)
@@ -46,6 +47,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public SecurityTokenUnavailableException(String message)
@@ -53,6 +55,7 @@
super(message);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
public SecurityTokenUnavailableException(String message, Throwable cause)
@@ -60,5 +63,6 @@
super(message, cause);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedAlgorithmException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedAlgorithmException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedAlgorithmException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -39,6 +39,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public UnsupportedAlgorithmException(Throwable cause)
@@ -46,6 +47,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public UnsupportedAlgorithmException(String message)
@@ -53,6 +55,7 @@
super(message);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
public UnsupportedAlgorithmException(String message, Throwable cause)
@@ -60,5 +63,6 @@
super(message, cause);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedSecurityTokenException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedSecurityTokenException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/UnsupportedSecurityTokenException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -39,6 +39,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public UnsupportedSecurityTokenException(Throwable cause)
@@ -46,6 +47,7 @@
super(faultString);
setFaultCode(faultCode);
setFaultString(faultString);
+ internal = false;
}
public UnsupportedSecurityTokenException(String message)
@@ -53,6 +55,7 @@
super(message);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
public UnsupportedSecurityTokenException(String message, Throwable cause)
@@ -60,5 +63,6 @@
super(message, cause);
setFaultCode(faultCode);
setFaultString(message);
+ internal = false;
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-03-04 09:19:04 UTC (rev 17377)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-03-04 14:57:40 UTC (rev 17378)
@@ -30,7 +30,7 @@
*/
public class WSSecurityException extends Exception
{
- private boolean internal = false;
+ protected boolean internal = false;
private QName faultCode = new QName(Constants.JBOSS_WSSE_NS, "InternalError", Constants.JBOSS_WSSE_PREFIX);
11 years, 10 months
JBossWS SVN: r17377 - in common/branches/jbossws-common-2.0.4.GA_BZ-916944: src/main/java/org/jboss/ws/common/deployment and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-03-04 04:19:04 -0500 (Mon, 04 Mar 2013)
New Revision: 17377
Modified:
common/branches/jbossws-common-2.0.4.GA_BZ-916944/
common/branches/jbossws-common-2.0.4.GA_BZ-916944/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java
Log:
[BZ916944] Commit -r 17050 from JBWS-3571
Property changes on: common/branches/jbossws-common-2.0.4.GA_BZ-916944
___________________________________________________________________
Modified: svn:mergeinfo
- /common/branches/asoldano:14028-14056
/common/trunk:16016
+ /common/branches/asoldano:14028-14056
/common/trunk:16016,17050
Modified: common/branches/jbossws-common-2.0.4.GA_BZ-916944/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java
===================================================================
--- common/branches/jbossws-common-2.0.4.GA_BZ-916944/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java 2013-03-01 15:36:36 UTC (rev 17376)
+++ common/branches/jbossws-common-2.0.4.GA_BZ-916944/src/main/java/org/jboss/ws/common/deployment/SOAPAddressWSDLParser.java 2013-03-04 09:19:04 UTC (rev 17377)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -29,10 +29,13 @@
import java.io.IOException;
import java.io.InputStream;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import java.util.ResourceBundle;
+import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamConstants;
@@ -52,6 +55,7 @@
{
private static final ResourceBundle bundle = BundleUtils.getBundle(SOAPAddressWSDLParser.class);
public static final String SOAP_OVER_JMS_NS = "http://www.w3.org/2010/soapjms/";
+ public static final String SOAP_HTTP_NS = "http://schemas.xmlsoap.org/soap/http";
private static final String WSDL_NS = "http://schemas.xmlsoap.org/wsdl/";
private static final String SOAP_NS = "http://schemas.xmlsoap.org/wsdl/soap/";
private static final String SOAP12_NS = "http://schemas.xmlsoap.org/wsdl/soap12/";
@@ -59,6 +63,7 @@
private static final String SERVICE = "service";
private static final String PORT = "port";
private static final String BINDING = "binding";
+ private static final String IMPORT = "import";
private static final String TRANSPORT = "transport";
private static final String ADDRESS = "address";
private static final String LOCATION = "location";
@@ -69,12 +74,22 @@
public SOAPAddressWSDLParser(URL wsdlUrl)
{
- this.metadata = getMetaData(wsdlUrl);
+ this.metadata = new WSDLMetaData();
+ parse(this.metadata, wsdlUrl);
+ Map<String, Boolean> map = this.metadata.getImports();
+ while (!map.isEmpty() && map.containsValue(false)) {
+ Set<String> imports = new HashSet<String>(map.keySet());
+ for (String i : imports) {
+ if (!map.get(i)) {
+ parse(this.metadata, i);
+ map.put(i, true);
+ }
+ }
+ }
}
- public String filterSoapAddress(QName serviceName, QName portName, String transportNamespace)
+ public String filterSoapAddress(QName serviceName, QName portName, String[] transportNamespaces)
{
- //get the soap:address of the required service/port if the corresponding binding uses SOAP over JMS transport
WSDLServiceMetaData smd = metadata.getServices().get(serviceName);
if (smd != null)
{
@@ -82,23 +97,46 @@
if (pmd != null)
{
WSDLBindingMetaData bmd = metadata.getBindings().get(pmd.getBindingName());
- if (bmd != null && transportNamespace.equals(bmd.getSoapTransport()))
+ if (bmd != null)
{
- return pmd.getSoapAddress();
+ for (String txNs : transportNamespaces)
+ {
+ if (txNs.equals(bmd.getSoapTransport()))
+ {
+ return pmd.getSoapAddress();
+ }
+ }
}
}
}
return null;
}
- protected static WSDLMetaData getMetaData(URL wsdlUrl)
+ public String filterSoapAddress(QName serviceName, QName portName, String transportNamespace)
{
+ return filterSoapAddress(serviceName, portName, new String[]{transportNamespace});
+ }
+
+ protected static void parse(WSDLMetaData metadata, String wsdlUrl)
+ {
+ try
+ {
+ parse(metadata, new URL(wsdlUrl));
+ }
+ catch (MalformedURLException e)
+ {
+ throw new WebServiceException(BundleUtils.getMessage(bundle, "FAILED_TO_READ", new Object[]{ wsdlUrl , e.getMessage()}), e);
+ }
+ }
+
+ protected static void parse(WSDLMetaData metadata, URL wsdlUrl)
+ {
InputStream is = null;
try
{
is = wsdlUrl.openStream();
XMLStreamReader xmlr = StAXUtils.createXMLStreamReader(is);
- return getMetaData(xmlr);
+ parse(metadata, xmlr, wsdlUrl);
}
catch (Exception e)
{
@@ -114,7 +152,7 @@
}
}
- private static WSDLMetaData getMetaData(XMLStreamReader reader) throws XMLStreamException
+ private static void parse(WSDLMetaData metadata, XMLStreamReader reader, URL wsdlUrl) throws XMLStreamException
{
int iterate;
try
@@ -126,7 +164,6 @@
// skip non-tag elements
iterate = reader.nextTag();
}
- WSDLMetaData metadata = new WSDLMetaData();
switch (iterate)
{
case END_ELEMENT : {
@@ -138,7 +175,7 @@
if (match(reader, WSDL_NS, DEFINITIONS))
{
String targetNS = reader.getAttributeValue(null, TARGET_NAMESPACE);
- parseDefinitions(reader, metadata, targetNS);
+ parseDefinitions(reader, metadata, targetNS, wsdlUrl);
}
else
{
@@ -146,10 +183,9 @@
}
}
}
- return metadata;
}
- private static void parseDefinitions(XMLStreamReader reader, WSDLMetaData metadata, String targetNS) throws XMLStreamException
+ private static void parseDefinitions(XMLStreamReader reader, WSDLMetaData metadata, String targetNS, URL wsdlUrl) throws XMLStreamException
{
while (reader.hasNext())
{
@@ -175,6 +211,14 @@
bmd.setName(name);
metadata.getBindings().put(bmd.getName(), bmd);
}
+ else if (match(reader, WSDL_NS, IMPORT)) {
+ final String location = reader.getAttributeValue(null, LOCATION);
+ final String url = wsdlUrl.toString();
+ final String newUrl = url.substring(0, url.lastIndexOf("/") + (location.startsWith("/") ? 0 : 1)) + location;
+ if (!metadata.getImports().containsKey(newUrl)) {
+ metadata.getImports().put(newUrl, false);
+ }
+ }
continue;
}
}
@@ -270,6 +314,7 @@
{
private Map<QName, WSDLServiceMetaData> services = new HashMap<QName, SOAPAddressWSDLParser.WSDLServiceMetaData>();
private Map<QName, WSDLBindingMetaData> bindings = new HashMap<QName, SOAPAddressWSDLParser.WSDLBindingMetaData>();
+ private Map<String, Boolean> imports = new HashMap<String, Boolean>(); //<url, processed>
public Map<QName, WSDLServiceMetaData> getServices()
{
@@ -279,6 +324,11 @@
{
return bindings;
}
+
+ public Map<String, Boolean> getImports()
+ {
+ return imports;
+ }
}
private static class WSDLServiceMetaData
11 years, 10 months
JBossWS SVN: r17376 - common/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-03-01 10:36:36 -0500 (Fri, 01 Mar 2013)
New Revision: 17376
Added:
common/branches/jbossws-common-2.0.4.GA_BZ-916944/
Log:
[BZ916944] Create one off patch for jbossws-common
11 years, 10 months
JBossWS SVN: r17375 - common/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-03-01 09:55:52 -0500 (Fri, 01 Mar 2013)
New Revision: 17375
Removed:
common/branches/jbossws-common-2.0.4.GA_BZ916944/
Log:
Deleted branch created in error
11 years, 10 months
JBossWS SVN: r17374 - common/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-03-01 08:39:38 -0500 (Fri, 01 Mar 2013)
New Revision: 17374
Added:
common/branches/jbossws-common-2.0.4.GA_BZ916944/
Log:
[BZ-916944] Create one off patch branch
11 years, 10 months
JBossWS SVN: r17373 - thirdparty/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-03-01 05:17:20 -0500 (Fri, 01 Mar 2013)
New Revision: 17373
Added:
thirdparty/cxf/branches/cxf-2.4.9.jbossorg-1_BZ-916944/
Log:
[BZ-916944] Create one off patch branch
11 years, 10 months
JBossWS SVN: r17372 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-03-01 05:06:35 -0500 (Fri, 01 Mar 2013)
New Revision: 17372
Added:
stack/cxf/branches/jbossws-cxf-4.0.6.GA_BZ-916944/
Log:
[BZ-916944] Creating one off patch
11 years, 10 months
JBossWS SVN: r17371 - stack/native/trunk/modules/resources/src/main/resources/modules/jboss800/org/jboss/as/webservices/main.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-03-01 03:38:41 -0500 (Fri, 01 Mar 2013)
New Revision: 17371
Modified:
stack/native/trunk/modules/resources/src/main/resources/modules/jboss800/org/jboss/as/webservices/main/module.xml
Log:
Use new jboss-web-common on AS800
Modified: stack/native/trunk/modules/resources/src/main/resources/modules/jboss800/org/jboss/as/webservices/main/module.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/modules/jboss800/org/jboss/as/webservices/main/module.xml 2013-02-28 13:00:27 UTC (rev 17370)
+++ stack/native/trunk/modules/resources/src/main/resources/modules/jboss800/org/jboss/as/webservices/main/module.xml 2013-03-01 08:38:41 UTC (rev 17371)
@@ -50,6 +50,7 @@
<module name="org.jboss.as.naming"/>
<module name="org.jboss.as.security"/>
<module name="org.jboss.as.web"/>
+ <module name="org.jboss.as.web-common"/>
<module name="org.jboss.threads"/>
<module name="org.jboss.modules"/>
<module name="org.jboss.msc"/>
11 years, 10 months