JCall.java

00001 
00021 package org.objectweb.jonas.ws.axis;
00022 
00023 import java.util.Enumeration;
00024 import java.util.Properties;
00025 
00026 import javax.xml.namespace.QName;
00027 import javax.xml.rpc.Stub;
00028 
00029 import org.apache.axis.client.Call;
00030 
00036 public class JCall extends Call {
00037 
00041     public JCall(JService service) {
00042         super(service);
00043     }
00044 
00052     public void setPortName(QName portName) {
00053         super.setPortName(portName);
00054         JService service = (JService) this.getService();
00055         Properties propCall = service.getCallProperties(portName.getLocalPart());
00056         if (propCall != null) {
00057             for (Enumeration e = propCall.propertyNames(); e.hasMoreElements();) {
00058                 String name = (String) e.nextElement();
00059                 Object value = propCall.getProperty(name);
00060                 if (Call.SESSION_MAINTAIN_PROPERTY.equals(name)) {
00061                     value = Boolean.valueOf((String) value);
00062                 }
00063                 this.setProperty(name, value);
00064 
00065             }
00066         }
00067         Properties propStub = service.getStubProperties(portName.getLocalPart());
00068         if (propStub != null) {
00069             for (Enumeration e = propStub.propertyNames(); e.hasMoreElements();) {
00070                 String name = (String) e.nextElement();
00071                 if (!Stub.ENDPOINT_ADDRESS_PROPERTY.equals(name)) {
00072                     Object value = propStub.getProperty(name);
00073                     if (Call.SESSION_MAINTAIN_PROPERTY.equals(name)) {
00074                         value = Boolean.valueOf((String) value);
00075                     }
00076                     this.setProperty(name, value);
00077                 }
00078             }
00079 
00080         }
00081     }
00082 }

Generated on Tue Feb 15 15:05:35 2005 for JOnAS by  doxygen 1.3.9.1