Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'dev/grze/EUCA-4529' into testing

Conflicts:
	clc/modules/msgs/src/main/java/com/eucalyptus/ws/Handlers.java
	clc/modules/wsstack/src/main/java/com/eucalyptus/ws/client/pipeline/InternalClientPipeline.java
  • Loading branch information...
commit 76a7b15f98953fcb663d9cc1527e0d12c4c20e6c 2 parents df6edd6 + 6419781
@grze grze authored
Showing with 27 additions and 25 deletions.
  1. +1 −1  clc/modules/core/src/main/java/edu/ucsb/eucalyptus/ic/DNSReplyQueue.java
  2. +1 −1  clc/modules/core/src/main/java/edu/ucsb/eucalyptus/ic/StorageReplyQueue.java
  3. +1 −1  clc/modules/msgs/src/main/java/com/eucalyptus/binding/BindingCache.java
  4. +2 −1  clc/modules/msgs/src/main/java/com/eucalyptus/binding/BindingManager.java
  5. +6 −6 clc/modules/msgs/src/main/java/com/eucalyptus/ws/Handlers.java
  6. +1 −1  clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/BindingHandler.java
  7. +2 −2 clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/RestfulMarshallingHandler.java
  8. +1 −1  clc/modules/msgs/src/main/java/com/eucalyptus/ws/server/Pipelines.java
  9. +1 −1  clc/modules/msgs/src/main/java/com/eucalyptus/ws/util/ErrorHandlerSupport.java
  10. +2 −2 clc/modules/msgs/src/main/java/com/eucalyptus/ws/util/ReplyQueue.java
  11. +2 −1  clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/BaseMessage.java
  12. +1 −1  clc/modules/reporting/src/main/java/com/eucalyptus/reporting/service/ws/ReportingErrorHandler.java
  13. +1 −1  clc/modules/wsstack/src/main/java/com/eucalyptus/ws/client/pipeline/InternalClientPipeline.java
  14. +1 −1  clc/modules/wsstack/src/main/java/com/eucalyptus/ws/handlers/BrokerBindingHandler.java
  15. +3 −3 clc/modules/wsstack/src/main/java/com/eucalyptus/ws/handlers/WalrusRESTBinding.java
  16. +1 −1  clc/modules/wsstack/src/main/java/com/eucalyptus/ws/util/EuareReplyQueue.java
View
2  clc/modules/core/src/main/java/edu/ucsb/eucalyptus/ic/DNSReplyQueue.java
@@ -90,7 +90,7 @@ public void handle( ExceptionMessage muleMsg )
{
Object requestMsg = muleMsg.getPayload();
String requestString = requestMsg.toString();
- BaseMessage msg = ( BaseMessage ) BindingManager.getBinding( "msgs_eucalyptus_com" ).fromOM( requestString );
+ BaseMessage msg = ( BaseMessage ) BindingManager.getDefaultBinding( ).fromOM( requestString );
Throwable ex = muleMsg.getException().getCause();
BaseMessage errMsg;
View
2  clc/modules/core/src/main/java/edu/ucsb/eucalyptus/ic/StorageReplyQueue.java
@@ -93,7 +93,7 @@ public void handle( ExceptionMessage muleMsg )
{
Object requestMsg = muleMsg.getPayload();
String requestString = requestMsg.toString();
- BaseMessage msg = ( BaseMessage ) BindingManager.getBinding( "msgs_eucalyptus_com" ).fromOM( requestString );
+ BaseMessage msg = ( BaseMessage ) BindingManager.getDefaultBinding( ).fromOM( requestString );
Throwable ex = muleMsg.getException().getCause();
StorageErrorMessageType errMsg = null;
View
2  clc/modules/msgs/src/main/java/com/eucalyptus/binding/BindingCache.java
@@ -541,7 +541,7 @@ public void processClass( Class klass ) {
e.printStackTrace( System.err );
System.exit( -1 );//GRZE: special case to fail build
}
- this.bindingName = this.ns.replaceAll( "(http://)|(/$)", "" ).replaceAll( "/[^/]*$", "" ).replaceAll( "[./-]", "_" );
+ this.bindingName = this.ns.replaceAll( "(http://)|(/$)", "" ).replaceAll( "[./-]", "_" );
this.out.write( "<binding xmlns:euca=\"" + this.ns + "\" name=\"" + this.bindingName + "\">\n" );
this.out.write( " <namespace uri=\"" + this.ns + "\" default=\"elements\" prefix=\"euca\"/>\n" );
this.out.flush( );
View
3  clc/modules/msgs/src/main/java/com/eucalyptus/binding/BindingManager.java
@@ -65,6 +65,7 @@
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
+import com.eucalyptus.bootstrap.BillOfMaterials;
import com.eucalyptus.bootstrap.BootstrapException;
import com.eucalyptus.records.EventRecord;
import com.eucalyptus.records.EventType;
@@ -74,7 +75,7 @@
private static Logger LOG = Logger.getLogger( BindingManager.class );
private static Map<String, Binding> bindingMap = new HashMap<String, Binding>( );
- private static final String DEFAULT_BINDING_NAMESPACE = "http://msgs.eucalyptus.com";
+ private static final String DEFAULT_BINDING_NAMESPACE = "http://msgs.eucalyptus.com/" + BillOfMaterials.getVersion( );
private static final String DEFAULT_BINDING_NAME = BindingManager.sanitizeNamespace( defaultBindingNamespace( ) );
private static Binding DEFAULT = null;
View
12 clc/modules/msgs/src/main/java/com/eucalyptus/ws/Handlers.java
@@ -155,7 +155,7 @@
private static final ChannelHandler soapHandler = new SoapHandler( );
private static final ChannelHandler addressingHandler = new AddressingHandler( );
private static final ConcurrentMap<String, BindingHandler> bindingHandlers = new MapMaker( ).makeComputingMap( BindingHandlerLookup.INSTANCE );
- private static final ChannelHandler bindingHandler = new BindingHandler( );
+ private static final ChannelHandler bindingHandler = new BindingHandler( BindingManager.getDefaultBinding( ) );
private static final ChannelHandler internalImpersonationHandler = new InternalImpersonationHandler();
private static final HashedWheelTimer timer = new HashedWheelTimer( ); //TODO:GRZE: configurable
@@ -296,6 +296,10 @@ public BindingHandler apply( String bindingName ) {
}
+ public static ChannelHandler bindingHandler( ) {
+ return bindingHandler;
+ }
+
public static ChannelHandler bindingHandler( final String bindingName ) {
return bindingHandlers.get( bindingName );
}
@@ -550,14 +554,10 @@ public static ChannelHandler queryTimestamphandler( ) {
return queryTimestampHandler;
}
- public static ChannelHandler bindinghandler( ) {
- return bindingHandler;
- }
-
public static ChannelHandler internalWsSecHandler( ) {
return internalWsSecHandler;
}
-
+
public static ChannelHandler internalImpersonationHandler() {
return internalImpersonationHandler;
}
View
2  clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/BindingHandler.java
@@ -124,7 +124,7 @@ public void incomingMessage( final MessageEvent event ) throws Exception {
if ( namespacePattern != null && !namespacePattern.matcher( namespace ).matches() ) {
throw new WebServicesException( "Invalid request" );
}
- this.binding = BindingManager.getBinding( BindingManager.sanitizeNamespace( namespace ) );
+ this.binding = BindingManager.getBinding( namespace );
msgType = this.binding.getElementClass( httpMessage.getOmMessage( ).getLocalName( ) );
} catch ( BindingException ex ) {
if ( this.defaultBinding != null ) {
View
4 clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/RestfulMarshallingHandler.java
@@ -122,7 +122,7 @@ public RestfulMarshallingHandler( String namespacePattern ) {
public RestfulMarshallingHandler( String namespacePattern, String defaultVersion ) {
this( namespacePattern );
this.defaultBindingNamespace = String.format( namespacePattern, defaultVersion );
- this.defaultBinding = BindingManager.getBinding( BindingManager.sanitizeNamespace( this.defaultBindingNamespace ) );
+ this.defaultBinding = BindingManager.getBinding( this.defaultBindingNamespace );
}
@Override
@@ -149,7 +149,7 @@ public void incomingMessage( MessageEvent event ) throws Exception {
protected void setNamespace( String namespace ) {
this.namespace = namespace;
- this.binding = BindingManager.getBinding( BindingManager.sanitizeNamespace( this.namespace ) );
+ this.binding = BindingManager.getBinding( this.namespace );
}
private void setNamespaceVersion( String bindingVersion ) {
View
2  clc/modules/msgs/src/main/java/com/eucalyptus/ws/server/Pipelines.java
@@ -246,7 +246,7 @@ public ChannelPipeline addHandlers( final ChannelPipeline pipeline ) {
pipeline.addLast( "ws-security", Handlers.internalWsSecHandler() );
pipeline.addLast( "ws-addressing", Handlers.addressingHandler( ) );
pipeline.addLast( "build-soap-envelope", Handlers.soapHandler( ) );
- pipeline.addLast( "binding", Handlers.bindinghandler() );
+ pipeline.addLast( "binding", Handlers.bindingHandler( ) );
return pipeline;
}
View
2  clc/modules/msgs/src/main/java/com/eucalyptus/ws/util/ErrorHandlerSupport.java
@@ -110,7 +110,7 @@ private BaseMessage parsePayload( final Object payload ) throws PayloadParseExce
return ( BaseMessage ) payload;
} else if ( payload instanceof String ) {
try {
- return ( BaseMessage ) BindingManager.getBinding( BindingManager.sanitizeNamespace( namespace ) ).fromOM( ( String ) payload );
+ return ( BaseMessage ) BindingManager.getBinding( namespace ).fromOM( ( String ) payload );
} catch ( Exception e ) {
throw new PayloadParseException( e );
}
View
4 clc/modules/msgs/src/main/java/com/eucalyptus/ws/util/ReplyQueue.java
@@ -118,7 +118,7 @@ private BaseMessage convert( Object payload ) {
ret = ( ( HasRequest ) payload ).getRequest( );
} else if ( payload instanceof String ) {
try {
- ret = ( BaseMessage ) BindingManager.getBinding( "msgs_eucalyptus_com" ).fromOM( ( String ) payload );
+ ret = ( BaseMessage ) BindingManager.getDefaultBinding( ).fromOM( ( String ) payload );
} catch ( Exception ex ) {
LOG.error( ex , ex );
}
@@ -130,7 +130,7 @@ private BaseMessage convert( Object payload ) {
// ret = ( ( Allocation ) payload ).getRequest( );
} else if ( payload instanceof String ) {
try {
- ret = ( BaseMessage ) BindingManager.getBinding( "msgs_eucalyptus_com" ).fromOM( ( String ) payload );
+ ret = ( BaseMessage ) BindingManager.getDefaultBinding( ).fromOM( ( String ) payload );
} catch ( Exception ex ) {
LOG.error( ex , ex );
}
View
3  clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/BaseMessage.java
@@ -75,6 +75,7 @@
import org.jibx.runtime.JiBXException;
import com.eucalyptus.auth.principal.Principals;
import com.eucalyptus.auth.principal.User;
+import com.eucalyptus.binding.BindingManager;
import com.eucalyptus.empyrean.ServiceId;
import com.eucalyptus.http.MappingHttpMessage;
import com.eucalyptus.util.Classes;
@@ -231,7 +232,7 @@ public String getEffectiveUserId( ) {
}
public String toString( ) {
- String str = this.toString( "msgs_eucalyptus_com" );
+ String str = this.toString( BindingManager.defaultBindingName( ) );
str = ( str != null )
? str
: this.toString( "eucalyptus_ucsb_edu" );
View
2  clc/modules/reporting/src/main/java/com/eucalyptus/reporting/service/ws/ReportingErrorHandler.java
@@ -84,7 +84,7 @@ private static BaseMessage parsePayload( final Object payload ) throws PayloadPa
return ( BaseMessage ) payload;
} else if ( payload instanceof String ) {
try {
- return ( BaseMessage ) BindingManager.getBinding( BindingManager.sanitizeNamespace( ReportingQueryBinding.REPORTING_DEFAULT_NAMESPACE ) ).fromOM( ( String ) payload );
+ return ( BaseMessage ) BindingManager.getBinding( ReportingQueryBinding.REPORTING_DEFAULT_NAMESPACE ).fromOM( ( String ) payload );
} catch ( Exception e ) {
throw new PayloadParseException( e );
}
View
2  clc/modules/wsstack/src/main/java/com/eucalyptus/ws/client/pipeline/InternalClientPipeline.java
@@ -93,7 +93,7 @@ public ChannelPipeline getPipeline( ) throws Exception {
pipeline.addLast( "wssec", Handlers.internalWsSecHandler( ) );
pipeline.addLast( "addressing", Handlers.addressingHandler( ) );
pipeline.addLast( "soap", Handlers.soapHandler( ) );
- pipeline.addLast( "binding", Handlers.bindingHandler( "msgs_eucalyptus_com" ) );
+ pipeline.addLast( "binding", Handlers.bindingHandler( ) );
pipeline.addLast( "impersonation", Handlers.internalImpersonationHandler( ) );
return pipeline;
}
View
2  clc/modules/wsstack/src/main/java/com/eucalyptus/ws/handlers/BrokerBindingHandler.java
@@ -104,7 +104,7 @@ public void incomingMessage( final MessageEvent event ) throws Exception {
String namespace = omNs.getNamespaceURI( );
Class msgType = null;
try {
- this.binding = BindingManager.getBinding( BindingManager.sanitizeNamespace( namespace ) );
+ this.binding = BindingManager.getBinding( namespace );
msgType = this.binding.getElementClass( httpMessage.getOmMessage( ).getLocalName( ) );
} catch ( Exception e1 ) {
if ( this.binding == null ) {
View
6 clc/modules/wsstack/src/main/java/com/eucalyptus/ws/handlers/WalrusRESTBinding.java
@@ -217,12 +217,12 @@ public void outgoingMessage( ChannelHandlerContext ctx, MessageEvent event ) thr
Binding binding;
if(!(msg instanceof EucalyptusErrorMessageType)&&!(msg instanceof ExceptionResponseType)) {
- binding = BindingManager.getBinding( BindingManager.sanitizeNamespace( super.getNamespace( ) ) );
+ binding = BindingManager.getBinding( super.getNamespace( ) );
if(putQueue != null) {
putQueue = null;
}
} else {
- binding = BindingManager.getBinding( BindingManager.sanitizeNamespace( "http://msgs.eucalyptus.com" ) );
+ binding = BindingManager.getDefaultBinding( );
if(putQueue != null) {
putQueue = null;
}
@@ -339,7 +339,7 @@ public Object bind( final MappingHttpRequest httpRequest ) throws Exception {
LOG.info(groovyMsg.toString());
try
{
- Binding binding = BindingManager.getBinding( BindingManager.sanitizeNamespace( "http://msgs.eucalyptus.com" ) );
+ Binding binding = BindingManager.getDefaultBinding( );
msg = binding.toOM( groovyMsg );
}
catch ( RuntimeException e )
View
2  clc/modules/wsstack/src/main/java/com/eucalyptus/ws/util/EuareReplyQueue.java
@@ -159,7 +159,7 @@ private BaseMessage parsePayload( Object payload ) throws Exception {
if ( payload instanceof BaseMessage ) {
return ( BaseMessage ) payload;
} else if ( payload instanceof String ) {
- return ( BaseMessage ) BindingManager.getBinding( BindingManager.sanitizeNamespace( "http://iam.amazonaws.com/doc/2010-05-08/" ) ).fromOM( ( String ) payload );
+ return ( BaseMessage ) BindingManager.getBinding( "http://iam.amazonaws.com/doc/2010-05-08/" ).fromOM( ( String ) payload );
}
return new EucalyptusErrorMessageType( "ReplyQueue", LogUtil.dumpObject( payload ) );
}
Please sign in to comment.
Something went wrong with that request. Please try again.