Polishing

This commit is contained in:
Arjen Poutsma
2012-01-25 12:09:18 +00:00
parent a2973c7e44
commit 2e55903060
3 changed files with 8 additions and 9 deletions

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2005-2010 the original author or authors.
* Copyright 2005-2012 the original author or authors.
*
* Licensed 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
* 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,
@@ -232,7 +232,7 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
private boolean isMultiPartRelated(String contentType) {
contentType = contentType.toLowerCase(Locale.ENGLISH);
return contentType.indexOf(MULTI_PART_RELATED_CONTENT_TYPE) != -1;
return contentType.contains(MULTI_PART_RELATED_CONTENT_TYPE);
}
/** Creates an AxiomSoapMessage without attachments. */
@@ -272,10 +272,10 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
}
private String getSoapEnvelopeNamespace(String contentType) {
if (contentType.indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) != -1) {
if (contentType.contains(SOAP11Constants.SOAP_11_CONTENT_TYPE)) {
return SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
}
else if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) != -1) {
else if (contentType.contains(SOAP12Constants.SOAP_12_CONTENT_TYPE)) {
return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
}
else {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2005-2011 the original author or authors.
* Copyright 2005-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -81,7 +81,7 @@ public class MessageDispatcherTest {
verify(adapterMock, factoryMock);
Assert.assertEquals("getEnpointAdapter returns invalid EndpointAdapter", adapterMock, result);
Assert.assertEquals("getEndpointAdapter returns invalid EndpointAdapter", adapterMock, result);
}
@Test

View File

@@ -67,8 +67,7 @@ public abstract class AbstractSoap11MessageFactoryTestCase extends AbstractSoapM
headers.put("Content-Type", "text/xml");
TransportInputStream tis = new MockTransportInputStream(is, headers);
WebServiceMessage message = messageFactory.createWebServiceMessage(tis);
message.writeTo(System.out);
messageFactory.createWebServiceMessage(tis);
}
@Override