axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hugh...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/providers/java WSIFOperation_Java.java
Date Wed, 04 Sep 2002 18:23:50 GMT
hughesj     2002/09/04 11:23:50

  Modified:    java/src/org/apache/wsif/base WSIFDefaultOperation.java
                        WSIFDefaultMessage.java
               java/src/org/apache/wsif/providers/ejb
                        WSIFOperation_EJB.java
               java/src/org/apache/wsif WSIFMessage.java
               java/src/org/apache/wsif/providers/jms
                        WSIFOperation_Jms.java
               java/src/org/apache/wsif/providers/java
                        WSIFOperation_Java.java
  Log:
  Make the javax.wsdl.Message object available from WSIFMessage.
  get/setMessageDefinition() are the accessor methods.
  When calling WSIFOperation.createXxxxMessage() the  WSIFOperation
  (actually concrete WSIFDefaultOperation class) will populate
  the messageDefinnition field in WSIFMessage.
  
  Revision  Changes    Path
  1.11      +30 -3     xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultOperation.java
  
  Index: WSIFDefaultOperation.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultOperation.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WSIFDefaultOperation.java	19 Aug 2002 09:19:32 -0000	1.10
  +++ WSIFDefaultOperation.java	4 Sep 2002 18:23:50 -0000	1.11
  @@ -63,6 +63,7 @@
   import java.util.Map;
   
   import javax.xml.namespace.QName;
  +import javax.wsdl.Operation;
   
   import org.apache.wsif.WSIFCorrelationId;
   import org.apache.wsif.WSIFException;
  @@ -162,8 +163,16 @@
       public WSIFMessage createInputMessage(String name) {
           Trc.entry(this, name);
           WSIFMessage msg = new WSIFDefaultMessage();
  -        if (msg != null)
  +        if (msg != null) {
               msg.setName(name);
  +            // Now find the javax.wsdl.Message & set it on the WSIFMessage
  +            try {
  +                msg.setMessageDefinition(
  +                    getOperation().getInput().getMessage());
  +            } catch (Exception e) {
  +                Trc.exception(e);
  +            }
  +        }
           Trc.exit(msg);
           return msg;
       }
  @@ -184,8 +193,16 @@
       public WSIFMessage createOutputMessage(String name) {
           Trc.entry(this, name);
           WSIFMessage msg = new WSIFDefaultMessage();
  -        if (msg != null)
  +        if (msg != null) {
               msg.setName(name);
  +            // Now find the javax.wsdl.Message & set it on the WSIFMessage
  +            try {
  +                msg.setMessageDefinition(
  +                    getOperation().getOutput().getMessage());
  +            } catch (Exception e) {
  +                Trc.exception(e);
  +            }
  +        }
           Trc.exit(msg);
           return msg;
       }
  @@ -206,8 +223,16 @@
       public WSIFMessage createFaultMessage(String name) {
           Trc.entry(this, name);
           WSIFMessage msg = new WSIFDefaultMessage();
  -        if (msg != null)
  +        if (msg != null) {
               msg.setName(name);
  +            // Now find the javax.wsdl.Message & set it on the WSIFMessage
  +            try {
  +                msg.setMessageDefinition(
  +                    getOperation().getFault(name).getMessage());
  +            } catch (Exception e) {
  +                Trc.exception(e);
  +            }
  +        }
           Trc.exit(msg);
           return msg;
       }
  @@ -399,6 +424,8 @@
           Trc.exit(context);
           return context;
       }
  +    
  +    abstract protected Operation getOperation() throws Exception;
       
       protected void close() throws WSIFException {
       	Trc.entry(this);
  
  
  
  1.7       +16 -0     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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WSIFDefaultMessage.java	27 Aug 2002 13:34:45 -0000	1.6
  +++ WSIFDefaultMessage.java	4 Sep 2002 18:23:50 -0000	1.7
  @@ -66,6 +66,7 @@
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
  +import javax.wsdl.Message;
   
   import org.apache.wsif.WSIFConstants;
   import org.apache.wsif.WSIFException;
  @@ -92,6 +93,7 @@
       protected Map parts;
       protected String name;
       protected String style;
  +    protected Message msgDefinition;
   
       public WSIFDefaultMessage() {
           Trc.entry(this);
  @@ -164,6 +166,18 @@
           Trc.exit();
       }
   
  +    public Message getMessageDefinition() {
  +        Trc.entry(this);
  +        Trc.exit(msgDefinition);
  +        return msgDefinition;
  +    }
  +        
  +    public void setMessageDefinition(Message msgDef) {
  +        Trc.entry(this, msgDefinition);
  +        msgDefinition = msgDef;
  +        Trc.exit();
  +    }
  +
       public void setObjectPart(String name, Object part) throws WSIFException {
           Trc.entry(this, name, part);
           if (parts == null) {
  @@ -476,6 +490,8 @@
           Trc.entry(this);
           WSIFDefaultMessage dm = new WSIFDefaultMessage();
           dm.setName(this.name);
  +        dm.setRepresentationStyle(this.style);
  +        dm.setMessageDefinition(this.msgDefinition);
           Iterator it = getPartNames();
           while (it.hasNext()) {
               String pn = (String) it.next();
  
  
  
  1.14      +1 -1      xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java
  
  Index: WSIFOperation_EJB.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFOperation_EJB.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- WSIFOperation_EJB.java	23 Aug 2002 14:12:59 -0000	1.13
  +++ WSIFOperation_EJB.java	4 Sep 2002 18:23:50 -0000	1.14
  @@ -476,7 +476,7 @@
           Trc.exit();
       }
   
  -    private Operation getOperation() throws Exception {
  +    protected Operation getOperation() throws Exception {
           Trc.entry(this);
           Operation operation = null;
           buildTypeMap();
  
  
  
  1.2       +23 -2     xml-axis-wsif/java/src/org/apache/wsif/WSIFMessage.java
  
  Index: WSIFMessage.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/WSIFMessage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WSIFMessage.java	6 Jun 2002 08:28:48 -0000	1.1
  +++ WSIFMessage.java	4 Sep 2002 18:23:50 -0000	1.2
  @@ -57,9 +57,18 @@
   
   package org.apache.wsif;
   
  -import java.util.*;
  +import java.util.Iterator;
  +import java.util.Map;
  +
  +import javax.wsdl.Message;
   
   /**
  + * @author hughesj
  + *
  + * To change this generated comment edit the template variable "typecomment":
  + * Window>Preferences>Java>Templates.
  + */
  +/**
    * A WSIFMessage is a an interface representing a message.
    *
    * @author Paul Fremantle
  @@ -103,9 +112,21 @@
        */
       public void setParts(Map sourceParts);
   
  +    /**
  +     * Get the underlying WSDL model for this message.
  +     * @return javax.wsdl.Message
  +     */
  +    public Message getMessageDefinition();
  +    
  +    /**
  +     * Set the underlying WSDL model for this message.
  +     * @param msgDefinition
  +     */
  +    public void setMessageDefinition(Message msgDef);
  +
       public String getRepresentationStyle();
       public void setRepresentationStyle(String rStyle);
  -
  +    
       public Object getObjectPart(String name) throws WSIFException;
       public Object getObjectPart(String name, Class sourceClass)
           throws WSIFException;
  
  
  
  1.22      +1 -1      xml-axis-wsif/java/src/org/apache/wsif/providers/jms/WSIFOperation_Jms.java
  
  Index: WSIFOperation_Jms.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/jms/WSIFOperation_Jms.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- WSIFOperation_Jms.java	3 Sep 2002 14:04:43 -0000	1.21
  +++ WSIFOperation_Jms.java	4 Sep 2002 18:23:50 -0000	1.22
  @@ -641,7 +641,7 @@
       /**
        * get the specified operation (w/ input and output message)
        */
  -    private Operation getOperation() throws Exception {
  +    protected Operation getOperation() throws Exception {
   
           if (fieldOperation == null) {
               // <input> and <output> tags in binding operations are not mandatory
  
  
  
  1.18      +1 -1      xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
  
  Index: WSIFOperation_Java.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- WSIFOperation_Java.java	20 Aug 2002 11:52:07 -0000	1.17
  +++ WSIFOperation_Java.java	4 Sep 2002 18:23:50 -0000	1.18
  @@ -487,7 +487,7 @@
           }
       }
   
  -    private Operation getOperation() throws Exception {
  +    protected Operation getOperation() throws Exception {
       	Trc.entry(this);
           Operation operation = null;
   
  
  
  

Mime
View raw message