owenb 2002/06/27 07:46:42
Modified: java/src/org/apache/wsif/providers/soap/apachesoap
WSIFPort_ApacheSOAP.java
WSIFOperation_ApacheSOAP.java
java/src/org/apache/wsif/base WSIFServiceImpl.java
WSIFDefaultMessage.java
java build.xml
java/test/util WSIFTestRunner.java
java/src/org/apache/wsif WSIFConstants.java
Removed: java/src/org/apache/wsif/providers/soap/apachesoap
JROMSOAPMappingRegistry.java JROMSerializer.java
java/src/org/apache/wsif/compiler/schema/tools
Schema2JROM.java
java/test/jrom JROMTests.java
Log:
Temporary removal of support for JROM
Revision Changes Path
1.7 +0 -46
xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apachesoap/WSIFPort_ApacheSOAP.java
Index: WSIFPort_ApacheSOAP.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apachesoap/WSIFPort_ApacheSOAP.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- WSIFPort_ApacheSOAP.java 25 Jun 2002 15:09:37 -0000 1.6
+++ WSIFPort_ApacheSOAP.java 27 Jun 2002 14:46:41 -0000 1.7
@@ -114,8 +114,6 @@
protected Definition definition;
protected SOAPMappingRegistry smr;
- protected JROMSOAPMappingRegistry jromSMR;
-
protected SOAPTransport st;
protected URL url;
protected String style = "document";
@@ -319,27 +317,14 @@
this.smr = smr;
Tr.exit();
}
-
- protected JROMSOAPMappingRegistry getJROMSOAPMappingRegistry() {
- Tr.entry(this);
- Tr.exit(jromSMR);
- return jromSMR;
- }
protected HashMap getLocalTypeMap() {
return localTypeMap;
}
private void prepareTypeMappings() {
- boolean jromAvailable = WSIFServiceImpl.getJROMAvailability();
- if (jromAvailable) {
- this.jromSMR = new JROMSOAPMappingRegistry(this.smr);
- } else {
- this.jromSMR = null;
- }
prepareTypeMappings(
this.smr,
- this.jromSMR,
this.wsifTypeMap,
partSerializerName,
localTypeMap);
@@ -347,7 +332,6 @@
static void prepareTypeMappings(
SOAPMappingRegistry theSMR,
- JROMSOAPMappingRegistry theJROMSMR,
WSIFDynamicTypeMap theTypeMap,
String thePartSerializerName,
HashMap theLocalTypeMap) {
@@ -373,18 +357,6 @@
Deserializer soapDeserializer = beanSer;
String soapEncoding = Constants.NS_URI_SOAP_ENC;
- boolean jromAvailable = WSIFServiceImpl.getJROMAvailability();
-
- JROMSerializer jromSer = null;
-
- // Only deal with JROM if it's available
- if (jromAvailable) {
- if (theJROMSMR == null) {
- theJROMSMR = new JROMSOAPMappingRegistry(theSMR);
- }
- jromSer = new JROMSerializer();
- }
-
// initialize ApacheSOAP specific mappings here
for (Iterator i = theTypeMap.iterator(); i.hasNext();) {
WSIFDynamicTypeMapping mapping = (WSIFDynamicTypeMapping) i.next();
@@ -398,23 +370,6 @@
// Add mappings to a local hashmap for use in preparation of the
operation
theLocalTypeMap.put(typeName, javaClass);
- if (jromAvailable) {
- // JROM SOAP mapping registry should return a JROMSerializer for all
- // type mappings
- theJROMSMR.mapTypes(
- soapEncoding,
- typeName,
- javaClass,
- jromSer,
- jromSer);
- theJROMSMR.mapTypes(
- literalEncoding,
- typeName,
- javaClass,
- jromSer,
- jromSer);
- }
-
Serializer ser = null;
// Set up SOAP encoding mappings
try {
@@ -797,7 +752,6 @@
buff += "\nport:" + Tr.brief(port);
buff += " definition:" + Tr.brief(definition);
buff += " soapMappingRegistry:" + smr;
- buff += " jromSoapMappingRegistry:" + jromSMR;
buff += " soapTransport:" + st;
buff += " url:" + url;
buff += " style:" + style;
1.12 +24 -66
xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apachesoap/WSIFOperation_ApacheSOAP.java
Index: WSIFOperation_ApacheSOAP.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apachesoap/WSIFOperation_ApacheSOAP.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WSIFOperation_ApacheSOAP.java 25 Jun 2002 11:04:40 -0000 1.11
+++ WSIFOperation_ApacheSOAP.java 27 Jun 2002 14:46:41 -0000 1.12
@@ -150,7 +150,6 @@
protected String inputUse = null;
protected String outputUse = null;
protected String partSerializerName = null;
- protected boolean usingJROM = false;
/**
* Create Apache SOAP operation instance that encapsultes all necessary
@@ -270,10 +269,6 @@
Tr.entry(this, inputMessage, outputMessage);
HashMap mapOfUserTypes = portInstance.getLocalTypeMap();
SOAPMappingRegistry smr = portInstance.getSOAPMappingRegistry();
- usingJROM =
-
(WSIFConstants.JROM_REPR_STYLE.equals(inputMessage.getRepresentationStyle()))
- ? true
- : false;
// first determine list of arguments
Input input = operation.getInput();
@@ -369,8 +364,7 @@
private void setupTypeMappings(
HashMap mapOfUserTypes,
- SOAPMappingRegistry smr,
- JROMSOAPMappingRegistry jromSMR)
+ SOAPMappingRegistry smr)
throws WSIFException {
// Mappings are set in the WSIFPort_ApacheSOAP which created this operation.
@@ -381,7 +375,6 @@
HashMap tempMap = new HashMap();
WSIFPort_ApacheSOAP.prepareTypeMappings(
smr,
- jromSMR,
typeMap,
partSerializerName,
tempMap);
@@ -428,11 +421,6 @@
if (!prepared)
prepare(input, output);
- usingJROM =
- (WSIFConstants.JROM_REPR_STYLE.equals(input.getRepresentationStyle()))
- ? true
- : false;
-
String encodingStyleURI = inputEncodingStyle;
Call call = new Call();
@@ -440,11 +428,7 @@
SOAPMappingRegistry reg = null;
- if (usingJROM) {
- reg = portInstance.getJROMSOAPMappingRegistry();
- } else {
- reg = portInstance.getSOAPMappingRegistry();
- }
+ reg = portInstance.getSOAPMappingRegistry();
if (reg != null) {
call.setSOAPMappingRegistry(reg);
@@ -485,20 +469,16 @@
Object value = partInst;
// some runtime param validity check
- if (usingJROM) {
- types[i] = com.ibm.jrom.JROMValue.class;
- } else {
- if (value != null
- && !types[i].isPrimitive()
- && !(types[i].isAssignableFrom(value.getClass()))) {
- throw new WSIFException(
- "value "
- + value
- + " has unexpected type "
- + value.getClass()
- + " instead of "
- + types[i]);
- }
+ if (value != null
+ && !types[i].isPrimitive()
+ && !(types[i].isAssignableFrom(value.getClass()))) {
+ throw new WSIFException(
+ "value "
+ + value
+ + " has unexpected type "
+ + value.getClass()
+ + " instead of "
+ + types[i]);
}
if (inJmsProps.containsKey(names[i]))
@@ -555,29 +535,16 @@
Parameter retValue = resp.getReturnValue();
Object result = retValue.getValue();
- if (usingJROM) {
- output.setRepresentationStyle(WSIFConstants.JROM_REPR_STYLE);
- if (result != null
- &&
!com.ibm.jrom.JROMValue.class.isAssignableFrom(result.getClass())) {
- throw new WSIFException(
- "return value "
- + result
- + " has unexpected type "
- + result.getClass()
- + " instead of an implementation of
com.ibm.jrom.JROMValue");
- }
- } else {
- if (result != null
- && !returnType.isPrimitive()
- && !(returnType.isAssignableFrom(result.getClass()))) {
- throw new WSIFException(
- "return value "
- + result
- + " has unexpected type "
- + result.getClass()
- + " instead of "
- + returnType);
- }
+ if (result != null
+ && !returnType.isPrimitive()
+ && !(returnType.isAssignableFrom(result.getClass()))) {
+ throw new WSIFException(
+ "return value "
+ + result
+ + " has unexpected type "
+ + result.getClass()
+ + " instead of "
+ + returnType);
}
output.setObjectPart(returnName, result);
}
@@ -856,13 +823,8 @@
HashMap mapOfUserTypes = new HashMap();
SOAPMappingRegistry smr = WSIFPort_ApacheSOAP.createSOAPMappingRegistry();
- JROMSOAPMappingRegistry jromSMR = null;
- boolean jromAvailable = WSIFServiceImpl.getJROMAvailability();
- if (jromAvailable) {
- jromSMR = new JROMSOAPMappingRegistry(smr);
- }
- setupTypeMappings(mapOfUserTypes, smr, jromSMR);
+ setupTypeMappings(mapOfUserTypes, smr);
try {
@@ -890,12 +852,8 @@
Envelope respEnv = Envelope.unmarshall(payload, respCtx);
Response resp = null;
- if (usingJROM) {
- resp = Response.extractFromEnvelope(respEnv, jromSMR,
respCtx);
- } else {
// Extract the response from the response envelope.
- resp = Response.extractFromEnvelope(respEnv, smr, respCtx);
- }
+ resp = Response.extractFromEnvelope(respEnv, smr, respCtx);
return resp;
1.5 +0 -38 xml-axis-wsif/java/src/org/apache/wsif/base/WSIFServiceImpl.java
Index: WSIFServiceImpl.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFServiceImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WSIFServiceImpl.java 24 Jun 2002 13:11:20 -0000 1.4
+++ WSIFServiceImpl.java 27 Jun 2002 14:46:41 -0000 1.5
@@ -140,8 +140,6 @@
private String preferredPort = null;
private static final Class WSIF_DYNAMIC_PROVIDER_CLASS =
org.apache.wsif.spi.WSIFProvider.class;
- private static boolean jromAvailable = false;
- private static boolean jromChecked = false;
private Port chosenPort = null;
/**
@@ -1237,40 +1235,6 @@
}
/**
- * Returns a boolean to indicate if JROM is available to wsif
- * @return The flag
- */
- public static boolean getJROMAvailability() {
- Tr.entry(null);
-
- // Return the static field via this method rather than make the
- // field itself public. This way the field cannot be set by any
- // classes we don't want to give access to.
- // Check for JROM and set flag
- if (!jromChecked) {
- jromAvailable =
- ((Boolean) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- try {
- Class c =
- Class.forName(
- "com.ibm.jrom.JROMValue",
- true,
- Thread.currentThread().getContextClassLoader());
- return new Boolean(true);
- } catch (ClassNotFoundException ignored) {
- }
- return new Boolean(false);
- }
- })).booleanValue();
-
- jromChecked = true;
- }
- Tr.exit(jromAvailable);
- return jromAvailable;
- }
-
- /**
* Get the Definition object representing the wsdl document
* @return The Definition object
*/
@@ -1300,8 +1264,6 @@
buff += " typeMap:" + (typeMap == null ? "null" : typeMap.toString());
buff += " typeMapInitialised:" + typeMapInitialised;
buff += " preferredPort:" + (preferredPort == null ? "null" :
preferredPort);
- buff += " jromAvailable:" + jromAvailable;
- buff += " jromChecked:" + jromChecked;
buff += " chosenPort:" + Tr.brief(chosenPort);
} catch (Exception e) {
Tr.exceptionInTrace(e);
1.3 +0 -13
xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultMessage.java
Index: WSIFDefaultMessage.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultMessage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WSIFDefaultMessage.java 18 Jun 2002 13:58:26 -0000 1.2
+++ WSIFDefaultMessage.java 27 Jun 2002 14:46:41 -0000 1.3
@@ -93,11 +93,9 @@
protected Map parts;
protected String name;
protected String style;
- private boolean JROMAvailable = false;
public WSIFDefaultMessage() {
Tr.entry(this);
- JROMAvailable = WSIFServiceImpl.getJROMAvailability();
Tr.exit();
}
@@ -172,16 +170,6 @@
if (parts == null) {
parts = new HashMap();
}
- if (JROMAvailable && (part instanceof com.ibm.jrom.JROMValue)) {
- if (parts.size() > 0 && !WSIFConstants.JROM_REPR_STYLE.equals(style)) {
- throw new WSIFException(
- "Mixed representation" + "styles are not permitted in a
message");
- }
- style = WSIFConstants.JROM_REPR_STYLE;
- } else if (WSIFConstants.JROM_REPR_STYLE.equals(style)) {
- throw new WSIFException(
- "Mixed representation" + "styles are not permitted in a message");
- }
parts.put(name, part);
Tr.exit();
}
@@ -566,7 +554,6 @@
try {
buff = new String(super.toString());
buff += " name:" + name;
- buff += " JROM:" + JROMAvailable;
if (parts==null)
buff += " parts:null";
else
1.3 +0 -1 xml-axis-wsif/java/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis-wsif/java/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 6 Jun 2002 17:24:56 -0000 1.2
+++ build.xml 27 Jun 2002 14:46:41 -0000 1.3
@@ -122,7 +122,6 @@
<patternset id="dynamic.source.files">
<include name="**/wsif/**/*.java"/>
<include name="**/wsdl/**/*.java"/>
- <include name="**/jrom/**/*.java"/>
<exclude name="**/compiler/**/*.java"/>
<exclude name="**/wsif/**/*SoapRMI.java"/>
</patternset>
1.12 +0 -2 xml-axis-wsif/java/test/util/WSIFTestRunner.java
Index: WSIFTestRunner.java
===================================================================
RCS file: /home/cvs/xml-axis-wsif/java/test/util/WSIFTestRunner.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WSIFTestRunner.java 21 Jun 2002 11:14:02 -0000 1.11
+++ WSIFTestRunner.java 27 Jun 2002 14:46:42 -0000 1.12
@@ -64,7 +64,6 @@
import jms.JmsTest;
import jndi.JNDIAddressBookTest;
-import jrom.JROMTests;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -119,7 +118,6 @@
suite.addTest(new TestSuite(ZIPCodeTest.class));
suite.addTest(new TestSuite(InteropTest.class));
suite.addTest(new TestSuite(JNDIAddressBookTest.class));
- suite.addTest(new TestSuite(JROMTests.class));
if (TestUtilities.areWeTesting("jms"))
suite.addTest(new TestSuite(JmsTest.class));
1.6 +0 -4 xml-axis-wsif/java/src/org/apache/wsif/WSIFConstants.java
Index: WSIFConstants.java
===================================================================
RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/WSIFConstants.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- WSIFConstants.java 18 Jun 2002 11:11:54 -0000 1.5
+++ WSIFConstants.java 27 Jun 2002 14:46:42 -0000 1.6
@@ -105,10 +105,6 @@
public static final String CORRELATION_SERVICE_NAMESPACE =
"wsif/WSIFCorrelationService";
- // JROM representation style
- public static final String JROM_REPR_STYLE =
- "http://www.apache.org/namespaces/jrom";
-
// WSIF context part name for HTTP basic authentication userid
public static final String CONTEXT_HTTP_USER =
"org.apache.wsif.http.UserName";