Fixed typo: langAttributeOnSoap11FaulString -> langAttributeOnSoap11FaultString

This commit is contained in:
Arjen Poutsma
2009-11-10 10:11:08 +00:00
parent 351ebcc251
commit a9ebd6785c
8 changed files with 60 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006 the original author or authors.
* Copyright 2002-2009 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.
@@ -45,14 +45,14 @@ import org.springframework.xml.namespace.QNameUtils;
*/
class AxiomSoap11Body extends AxiomSoapBody implements Soap11Body {
private final boolean langAttributeOnSoap11FaulString;
private final boolean langAttributeOnSoap11FaultString;
AxiomSoap11Body(SOAPBody axiomBody,
SOAPFactory axiomFactory,
boolean payloadCaching,
boolean langAttributeOnSoap11FaulString) {
boolean langAttributeOnSoap11FaultString) {
super(axiomBody, axiomFactory, payloadCaching);
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
}
public SoapFault addMustUnderstandFault(String faultString, Locale locale) {
@@ -82,7 +82,7 @@ class AxiomSoap11Body extends AxiomSoapBody implements Soap11Body {
throw new IllegalArgumentException(
"A fault code with namespace and local part must be specific for a custom fault code");
}
if (!langAttributeOnSoap11FaulString) {
if (!langAttributeOnSoap11FaultString) {
faultStringLocale = null;
}
try {

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2002-2009 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
*
* 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.springframework.ws.soap.axiom;
import org.apache.axiom.om.OMException;
@@ -24,15 +40,15 @@ class AxiomSoapEnvelope extends AxiomSoapElement implements SoapEnvelope {
private AxiomSoapBody body;
private final boolean langAttributeOnSoap11FaulString;
private final boolean langAttributeOnSoap11FaultString;
AxiomSoapEnvelope(SOAPEnvelope axiomEnvelope,
SOAPFactory axiomFactory,
boolean payloadCaching,
boolean langAttributeOnSoap11FaulString) {
boolean langAttributeOnSoap11FaultString) {
super(axiomEnvelope, axiomFactory);
this.payloadCaching = payloadCaching;
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
}
public SoapHeader getHeader() {
@@ -66,7 +82,7 @@ class AxiomSoapEnvelope extends AxiomSoapElement implements SoapEnvelope {
String namespaceURI = getAxiomEnvelope().getNamespace().getNamespaceURI();
if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(namespaceURI)) {
body = new AxiomSoap11Body(axiomBody, getAxiomFactory(), payloadCaching,
langAttributeOnSoap11FaulString);
langAttributeOnSoap11FaultString);
}
else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(namespaceURI)) {
body = new AxiomSoap12Body(axiomBody, getAxiomFactory(), payloadCaching);

View File

@@ -71,7 +71,7 @@ public class AxiomSoapMessage extends AbstractSoapMessage {
private String soapAction;
private final boolean langAttributeOnSoap11FaulString;
private final boolean langAttributeOnSoap11FaultString;
private OMOutputFormat outputFormat;
@@ -89,13 +89,13 @@ public class AxiomSoapMessage extends AbstractSoapMessage {
*
* @param soapFactory the AXIOM SOAPFactory
*/
public AxiomSoapMessage(SOAPFactory soapFactory, boolean payloadCaching, boolean langAttributeOnSoap11FaulString) {
public AxiomSoapMessage(SOAPFactory soapFactory, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) {
SOAPEnvelope soapEnvelope = soapFactory.getDefaultEnvelope();
axiomFactory = soapFactory;
axiomMessage = axiomFactory.createSOAPMessage(soapEnvelope, soapEnvelope.getBuilder());
attachments = new Attachments();
this.payloadCaching = payloadCaching;
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
soapAction = EMPTY_SOAP_ACTION;
}
@@ -109,8 +109,8 @@ public class AxiomSoapMessage extends AbstractSoapMessage {
public AxiomSoapMessage(SOAPMessage soapMessage,
String soapAction,
boolean payloadCaching,
boolean langAttributeOnSoap11FaulString) {
this(soapMessage, new Attachments(), soapAction, payloadCaching, langAttributeOnSoap11FaulString);
boolean langAttributeOnSoap11FaultString) {
this(soapMessage, new Attachments(), soapAction, payloadCaching, langAttributeOnSoap11FaultString);
}
/**
@@ -125,7 +125,7 @@ public class AxiomSoapMessage extends AbstractSoapMessage {
Attachments attachments,
String soapAction,
boolean payloadCaching,
boolean langAttributeOnSoap11FaulString) {
boolean langAttributeOnSoap11FaultString) {
Assert.notNull(soapMessage, "'soapMessage' must not be null");
Assert.notNull(attachments, "'attachments' must not be null");
axiomMessage = soapMessage;
@@ -136,7 +136,7 @@ public class AxiomSoapMessage extends AbstractSoapMessage {
}
this.soapAction = soapAction;
this.payloadCaching = payloadCaching;
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
}
/** Return the AXIOM <code>SOAPMessage</code> that this <code>AxiomSoapMessage</code> is based on. */
@@ -169,7 +169,7 @@ public class AxiomSoapMessage extends AbstractSoapMessage {
if (envelope == null) {
try {
envelope = new AxiomSoapEnvelope(axiomMessage.getSOAPEnvelope(), axiomFactory, payloadCaching,
langAttributeOnSoap11FaulString);
langAttributeOnSoap11FaultString);
}
catch (SOAPProcessingException ex) {
throw new AxiomSoapEnvelopeException(ex);

View File

@@ -102,7 +102,7 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
// use SOAP 1.1 by default
private SOAPFactory soapFactory = new SOAP11Factory();
private boolean langAttributeOnSoap11FaulString = true;
private boolean langAttributeOnSoap11FaultString = true;
/** Default constructor. */
public AxiomSoapMessageFactory() {
@@ -176,8 +176,8 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
*
* @see <a href="http://www.ws-i.org/Profiles/BasicProfile-1.1.html#SOAP_Fault_Language">WS-I Basic Profile 1.1</a>
*/
public void setLangAttributeOnSoap11FaulString(boolean langAttributeOnSoap11FaulString) {
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
public void setlangAttributeOnSoap11FaultString(boolean langAttributeOnSoap11FaultString) {
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
}
public void afterPropertiesSet() throws Exception {
@@ -191,7 +191,7 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
}
public WebServiceMessage createWebServiceMessage() {
return new AxiomSoapMessage(soapFactory, payloadCaching, langAttributeOnSoap11FaulString);
return new AxiomSoapMessage(soapFactory, payloadCaching, langAttributeOnSoap11FaultString);
}
public WebServiceMessage createWebServiceMessage(InputStream inputStream) throws IOException {
@@ -247,7 +247,7 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
String envelopeNamespace = getSoapEnvelopeNamespace(contentType);
StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(reader, soapFactory, envelopeNamespace);
SOAPMessage soapMessage = builder.getSoapMessage();
return new AxiomSoapMessage(soapMessage, soapAction, payloadCaching, langAttributeOnSoap11FaulString);
return new AxiomSoapMessage(soapMessage, soapAction, payloadCaching, langAttributeOnSoap11FaultString);
}
/** Creates an AxiomSoapMessage with attachments. */
@@ -273,7 +273,7 @@ public class AxiomSoapMessageFactory implements SoapMessageFactory, Initializing
"Unknown attachment type: [" + attachments.getAttachmentSpecType() + "]");
}
return new AxiomSoapMessage(builder.getSoapMessage(), attachments, soapAction, payloadCaching,
langAttributeOnSoap11FaulString);
langAttributeOnSoap11FaultString);
}
private String getSoapEnvelopeNamespace(String contentType) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006 the original author or authors.
* Copyright 2002-2009 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.
@@ -36,11 +36,11 @@ import org.springframework.ws.soap.soap11.Soap11Fault;
*/
class SaajSoap11Body extends SaajSoapBody implements Soap11Body {
private final boolean langAttributeOnSoap11FaulString;
private final boolean langAttributeOnSoap11FaultString;
SaajSoap11Body(SOAPBody body, boolean langAttributeOnSoap11FaulString) {
SaajSoap11Body(SOAPBody body, boolean langAttributeOnSoap11FaultString) {
super(body);
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
}
public SoapFault getFault() {
@@ -53,7 +53,7 @@ class SaajSoap11Body extends SaajSoapBody implements Soap11Body {
Assert.hasLength(faultString, "faultString cannot be empty");
Assert.hasLength(faultCode.getLocalPart(), "faultCode's localPart cannot be empty");
Assert.hasLength(faultCode.getNamespaceURI(), "faultCode's namespaceUri cannot be empty");
if (!langAttributeOnSoap11FaulString) {
if (!langAttributeOnSoap11FaultString) {
faultStringLocale = null;
}
try {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006 the original author or authors.
* Copyright 2002-2009 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.
@@ -40,11 +40,11 @@ class SaajSoapEnvelope extends SaajSoapElement implements SoapEnvelope {
private SaajSoapHeader header;
private final boolean langAttributeOnSoap11FaulString;
private final boolean langAttributeOnSoap11FaultString;
SaajSoapEnvelope(SOAPElement element, boolean langAttributeOnSoap11FaulString) {
SaajSoapEnvelope(SOAPElement element, boolean langAttributeOnSoap11FaultString) {
super(element);
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
}
public SoapBody getBody() {
@@ -53,7 +53,7 @@ class SaajSoapEnvelope extends SaajSoapElement implements SoapEnvelope {
SOAPBody saajBody = getImplementation().getBody(getSaajEnvelope());
if (getImplementation().getName(saajBody).getNamespaceURI()
.equals(SoapVersion.SOAP_11.getEnvelopeNamespaceUri())) {
body = new SaajSoap11Body(saajBody, langAttributeOnSoap11FaulString);
body = new SaajSoap11Body(saajBody, langAttributeOnSoap11FaultString);
}
else {
body = new SaajSoap12Body(saajBody);

View File

@@ -57,7 +57,7 @@ public class SaajSoapMessage extends AbstractSoapMessage {
private SoapEnvelope envelope;
private final boolean langAttributeOnSoap11FaulString;
private final boolean langAttributeOnSoap11FaultString;
private SaajImplementation implementation;
@@ -74,13 +74,13 @@ public class SaajSoapMessage extends AbstractSoapMessage {
* Create a new <code>SaajSoapMessage</code> based on the given SAAJ <code>SOAPMessage</code>.
*
* @param soapMessage the SAAJ SOAPMessage
* @param langAttributeOnSoap11FaulString
* @param langAttributeOnSoap11FaultString
* whether a {@code xml:lang} attribute is allowed on SOAP 1.1 {@code <faultstring>} elements
*/
public SaajSoapMessage(SOAPMessage soapMessage, boolean langAttributeOnSoap11FaulString) {
public SaajSoapMessage(SOAPMessage soapMessage, boolean langAttributeOnSoap11FaultString) {
Assert.notNull(soapMessage, "soapMessage must not be null");
saajMessage = soapMessage;
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
MimeHeaders headers = getImplementation().getMimeHeaders(soapMessage);
if (ObjectUtils.isEmpty(headers.getHeader(TransportConstants.HEADER_SOAP_ACTION))) {
headers.addHeader(TransportConstants.HEADER_SOAP_ACTION, "\"\"");
@@ -103,7 +103,7 @@ public class SaajSoapMessage extends AbstractSoapMessage {
if (envelope == null) {
try {
SOAPEnvelope saajEnvelope = getImplementation().getEnvelope(getSaajMessage());
envelope = new SaajSoapEnvelope(saajEnvelope, langAttributeOnSoap11FaulString);
envelope = new SaajSoapEnvelope(saajEnvelope, langAttributeOnSoap11FaultString);
}
catch (SOAPException ex) {
throw new SaajSoapEnvelopeException(ex);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006 the original author or authors.
* Copyright 2002-2009 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.
@@ -61,7 +61,7 @@ public class SaajSoapMessageFactory implements SoapMessageFactory, InitializingB
private String messageFactoryProtocol;
private boolean langAttributeOnSoap11FaulString = true;
private boolean langAttributeOnSoap11FaultString = true;
/** Default, empty constructor. */
public SaajSoapMessageFactory() {
@@ -90,8 +90,8 @@ public class SaajSoapMessageFactory implements SoapMessageFactory, InitializingB
*
* @see <a href="http://www.ws-i.org/Profiles/BasicProfile-1.1.html#SOAP_Fault_Language">WS-I Basic Profile 1.1</a>
*/
public void setLangAttributeOnSoap11FaulString(boolean langAttributeOnSoap11FaulString) {
this.langAttributeOnSoap11FaulString = langAttributeOnSoap11FaulString;
public void setlangAttributeOnSoap11FaultString(boolean langAttributeOnSoap11FaultString) {
this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
}
public void setSoapVersion(SoapVersion version) {
@@ -154,7 +154,7 @@ public class SaajSoapMessageFactory implements SoapMessageFactory, InitializingB
public WebServiceMessage createWebServiceMessage() {
try {
return new SaajSoapMessage(messageFactory.createMessage(), langAttributeOnSoap11FaulString);
return new SaajSoapMessage(messageFactory.createMessage(), langAttributeOnSoap11FaultString);
}
catch (SOAPException ex) {
throw new SoapMessageCreationException("Could not create empty message: " + ex.getMessage(), ex);
@@ -177,7 +177,7 @@ public class SaajSoapMessageFactory implements SoapMessageFactory, InitializingB
mimeHeaders.setHeader(TransportConstants.HEADER_CONTENT_TYPE, contentType);
try {
return new SaajSoapMessage(messageFactory.createMessage(mimeHeaders, inputStream),
langAttributeOnSoap11FaulString);
langAttributeOnSoap11FaultString);
}
catch (SOAPException e) {
// fall-through