Permalink
Browse files

bringing over outstanding changes.

  • Loading branch information...
2 parents 86c4865 + 4799d81 commit 7a804ec82b0fbf4a874f351a0a629df7bf38a604 Neil committed Aug 17, 2009
@@ -268,7 +268,7 @@
</structure>
</mapping>
- <mapping name="Status" class="edu.ucsb.eucalyptus.msgs.Status">
+ <mapping class="edu.ucsb.eucalyptus.msgs.Status" abstract="true">
<value name="Code" field="code" />
<value name="Description" field="description" />
</mapping>
@@ -494,7 +494,7 @@
<value name="LastModified" field="lastModified" />
<value name="ETag" field="etag" />
<value name="Size" field="size" />
- <structure field="owner"
+ <structure name="Owner" field="owner"
map-as="edu.ucsb.eucalyptus.msgs.CanonicalUserType" usage="optional" />
<value name="StorageClass" field="storageClass" />
</mapping>
@@ -11,11 +11,13 @@
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.soap.SOAP11Constants;
+import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPFault;
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axiom.soap.SOAPProcessingException;
import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
import org.apache.log4j.Logger;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -45,7 +47,8 @@ public void incomingMessage( ChannelHandlerContext ctx, MessageEvent event ) thr
String content = message.getContent( ).toString( "UTF-8" );
ByteArrayInputStream byteIn = new ByteArrayInputStream( content.getBytes( ) );
XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance( ).createXMLStreamReader( byteIn );
- StAXSOAPModelBuilder soapBuilder = new StAXSOAPModelBuilder( xmlStreamReader, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI );
+ StAXSOAPModelBuilder soapBuilder = null;
+ soapBuilder = new StAXSOAPModelBuilder( xmlStreamReader);
SOAPEnvelope env = ( SOAPEnvelope ) soapBuilder.getDocumentElement( );
message.setSoapEnvelope( env );
message.setMessageString( content );
@@ -442,7 +442,8 @@ private boolean skipLine( ChannelBuffer buffer ) {
valueStart = findNonWhitespace( sb, colonEnd );
valueEnd = findEndOfString( sb );
-
+ valueStart = valueStart > valueEnd ? valueEnd: valueStart;
+
return new String[] { sb.substring( nameStart, nameEnd ), sb.substring( valueStart, valueEnd ) };
}

0 comments on commit 7a804ec

Please sign in to comment.