You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ru...@apache.org on 2002/08/24 20:18:18 UTC
cvs commit: xml-axis/java/src/org/apache/axis/soap SOAPConstants.java
rubys 2002/08/24 11:18:18
Modified: java/src/org/apache/axis Constants.java MessageContext.java
java/src/org/apache/axis/client Call.java
java/src/org/apache/axis/soap SOAPConstants.java
Log:
SOAP 1.2 fixes:
1) style is not particularly SOAP version aware: compensate
2) encodingStyle is not legal on the envelope in 1.2, and not
required there in 1.1
3) reduce the number of places the default version appears
Revision Changes Path
1.85 +12 -2 xml-axis/java/src/org/apache/axis/Constants.java
Index: Constants.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- Constants.java 24 Aug 2002 01:25:19 -0000 1.84
+++ Constants.java 24 Aug 2002 18:18:17 -0000 1.85
@@ -60,6 +60,8 @@
import org.apache.axis.schema.SchemaVersion2000;
import org.apache.axis.schema.SchemaVersion2001;
+import org.apache.axis.soap.SOAPConstants;
+
import javax.xml.namespace.QName;
public class Constants {
@@ -91,13 +93,20 @@
public static final String NS_URI_JAVA = "http://xml.apache.org/axis/java";
//
+ // Default SOAP version
+ //
+ public static final SOAPConstants DEFAULT_SOAP_VERSION =
+ SOAPConstants.SOAP11_CONSTANTS;
+
+ //
// SOAP-ENV Namespaces
//
public static final String URI_SOAP11_ENV =
"http://schemas.xmlsoap.org/soap/envelope/" ;
public static final String URI_SOAP12_ENV =
"http://www.w3.org/2002/06/soap-envelope";
- public static final String URI_DEFAULT_SOAP_ENV = URI_SOAP11_ENV; // SOAP 1.1 over the wire
+ public static final String URI_DEFAULT_SOAP_ENV =
+ DEFAULT_SOAP_VERSION.getEnvelopeURI();
public static final String[] URIS_SOAP_ENV = {
URI_SOAP11_ENV,
@@ -135,7 +144,8 @@
"http://schemas.xmlsoap.org/soap/encoding/" ;
public static final String URI_SOAP12_ENC =
"http://www.w3.org/2002/06/soap-encoding";
- public static final String URI_DEFAULT_SOAP_ENC = URI_SOAP11_ENC; // SOAP 1.1 over the wire
+ public static final String URI_DEFAULT_SOAP_ENC =
+ DEFAULT_SOAP_VERSION.getEncodingURI();
public static final String[] URIS_SOAP_ENC = {
URI_SOAP11_ENC,
1.117 +9 -3 xml-axis/java/src/org/apache/axis/MessageContext.java
Index: MessageContext.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- MessageContext.java 23 Aug 2002 18:07:43 -0000 1.116
+++ MessageContext.java 24 Aug 2002 18:18:17 -0000 1.117
@@ -190,8 +190,9 @@
private boolean useSOAPAction = false;
private String SOAPActionURI = null;
- /** Our SOAP namespaces and such - defaults to SOAP 1.1 */
- private SOAPConstants soapConstants = new SOAP11Constants();
+ /** Our SOAP namespaces and such */
+ private SOAPConstants soapConstants = Constants.DEFAULT_SOAP_VERSION;
+
/** Schema version information - defaults to 2001 */
private SchemaVersion schemaVersion = SchemaVersion.SCHEMA_2001;
@@ -614,7 +615,12 @@
TypeMappingRegistry tmr = service.getTypeMappingRegistry();
setTypeMappingRegistry(tmr);
setOperationStyle(service.getStyle());
- setEncodingStyle(service.getStyle().getEncoding());
+
+ // styles are not "soap version aware" so compensate...
+ String encodingStyle = service.getStyle().getEncoding();
+ if (encodingStyle.equals(Constants.URI_DEFAULT_SOAP_ENC))
+ encodingStyle = soapConstants.getEncodingURI();
+ setEncodingStyle(encodingStyle);
// This MessageContext should now defer properties it can't find
// to the Service's options.
1.171 +0 -1 xml-axis/java/src/org/apache/axis/client/Call.java
Index: Call.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -r1.170 -r1.171
--- Call.java 19 Aug 2002 15:35:21 -0000 1.170
+++ Call.java 24 Aug 2002 18:18:17 -0000 1.171
@@ -1832,7 +1832,6 @@
// Set both the envelope and the RPCElement encoding styles
try {
body.setEncodingStyle(encodingStyle);
- reqEnv.setEncodingStyle(encodingStyle);
setRequestMessage(reqMsg);
1.6 +1 -0 xml-axis/java/src/org/apache/axis/soap/SOAPConstants.java
Index: SOAPConstants.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/soap/SOAPConstants.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SOAPConstants.java 23 Aug 2002 19:07:19 -0000 1.5
+++ SOAPConstants.java 24 Aug 2002 18:18:18 -0000 1.6
@@ -79,6 +79,7 @@
* Obtain the envelope namespace for this version of SOAP
*/
public String getEnvelopeURI();
+
/**
* Obtain the encoding namespace for this version of SOAP
*/