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 ga...@apache.org on 2004/11/10 16:57:10 UTC
cvs commit: ws-axis/java/src/org/apache/axis/message RPCElement.java
gawor 2004/11/10 07:57:10
Modified: java/src/org/apache/axis/message RPCElement.java
Log:
just factored out a bit of code into an operation
Revision Changes Path
1.96 +36 -17 ws-axis/java/src/org/apache/axis/message/RPCElement.java
Index: RPCElement.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/RPCElement.java,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- RPCElement.java 22 Sep 2004 12:27:33 -0000 1.95
+++ RPCElement.java 10 Nov 2004 15:57:09 -0000 1.96
@@ -65,24 +65,11 @@
MessageContext msgContext = context.getMessageContext();
// Obtain our possible operations
- if (operations == null && msgContext != null) {
- SOAPService service = msgContext.getService();
- if (service != null) {
- ServiceDesc serviceDesc =
- service.getInitializedServiceDesc(msgContext);
-
- String lc = Utils.xmlNameToJava(name);
- if (serviceDesc == null) {
- throw AxisFault.makeFault(
- new ClassNotFoundException(
- Messages.getMessage("noClassForService00",
- lc)));
- }
-
- operations = serviceDesc.getOperationsByName(lc);
- }
+ if (operations == null) {
+ updateOperations();
+ } else {
+ this.operations = operations;
}
- this.operations = operations;
}
public RPCElement(String namespace, String methodName, Object [] args)
@@ -104,6 +91,38 @@
public RPCElement(String methodName)
{
this.name = methodName;
+ }
+
+ public void updateOperations() throws AxisFault
+ {
+ if (context == null) {
+ return;
+ }
+
+ MessageContext msgContext = context.getMessageContext();
+
+ if (msgContext == null) {
+ return;
+ }
+
+ // Obtain our possible operations
+ SOAPService service = msgContext.getService();
+ if (service == null) {
+ return;
+ }
+
+ ServiceDesc serviceDesc =
+ service.getInitializedServiceDesc(msgContext);
+
+ String lc = Utils.xmlNameToJava(name);
+ if (serviceDesc == null) {
+ throw AxisFault.makeFault(
+ new ClassNotFoundException(
+ Messages.getMessage("noClassForService00",
+ lc)));
+ }
+
+ this.operations = serviceDesc.getOperationsByName(lc);
}
public String getMethodName()