Ooops Forgot to check in the new classes. Should be ok now..

Chathura

> -----Original Message-----
> From: Ajith Ranabahu [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 13, 2005 5:33 PM
> To: Axis developer list
> Subject: Build broken: svn commit: r190373 - in
> /webservices/axis/trunk/java/modules/wsdl/src/org/apache:
> axis/wsdl/builder/ axis/wsdl/builder/wsdl4j/ wsdl/ wsdl/impl/
> 
> Hi,
> Seems the build is broken, probably due to this change!!
> 
> ---------- Forwarded message ----------
> From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Jun 13, 2005 3:12 PM
> Subject: svn commit: r190373 - in
> /webservices/axis/trunk/java/modules/wsdl/src/org/apache:
> axis/wsdl/builder/ axis/wsdl/builder/wsdl4j/ wsdl/ wsdl/impl/
> To: axis-cvs@ws.apache.org
> 
> 
> Author: chathura
> Date: Mon Jun 13 02:12:06 2005
> New Revision: 190373
> 
> URL: http://svn.apache.org/viewcvs?rev=190373&view=rev
> Log:
> Improved fault Handling ..
> 
> Removed:
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/FaultReferenc
> e.java
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLFault.jav
> a
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/FaultRef
> erenceImpl.java
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLFaul
> tImpl.java
> Modified:
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> WSDLComponentFactory.java
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> wsdl4j/WSDLPump.java
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLDescripti
> on.java
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLOperation
> .java
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLDesc
> riptionImpl.java
> 
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOper
> ationImpl.java
> 
> Modified:
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> WSDLComponentFactory.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src
> /org/apache/axis/wsdl/builder/WSDLComponentFactory.java?rev=190373&r1=1903
> 72&r2=190373&view=diff
> ==========================================================================
> ====
> ---
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> WSDLComponentFactory.java
> (original)
> +++
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> WSDLComponentFactory.java
> Mon Jun 13 02:12:06 2005
> @@ -7,7 +7,7 @@
>  import org.apache.wsdl.WSDLDescription;
>  import org.apache.wsdl.WSDLEndpoint;
>  import org.apache.wsdl.WSDLExtensibilityAttribute;
> -import org.apache.wsdl.WSDLFault;
> +import org.apache.wsdl.WSDLFaultReference;
>  import org.apache.wsdl.WSDLFeature;
>  import org.apache.wsdl.WSDLImport;
>  import org.apache.wsdl.WSDLInclude;
> @@ -62,7 +62,7 @@
>         /**
>          * @return A new instance of type <code>WSDLFault</code>
>          */
> -       public WSDLFault createFault();
> +       public WSDLFaultReference createFaultReference();
> 
>         /**
>          * @return A new instance of type <code>WSDLFeature</code>
> 
> Modified:
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> wsdl4j/WSDLPump.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src
> /org/apache/axis/wsdl/builder/wsdl4j/WSDLPump.java?rev=190373&r1=190372&r2
> =190373&view=diff
> ==========================================================================
> ====
> ---
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> wsdl4j/WSDLPump.java
> (original)
> +++
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/builder/
> wsdl4j/WSDLPump.java
> Mon Jun 13 02:12:06 2005
> @@ -21,10 +21,12 @@
>  import java.util.Map;
> 
>  import javax.wsdl.Binding;
> +import javax.wsdl.BindingFault;
>  import javax.wsdl.BindingInput;
>  import javax.wsdl.BindingOperation;
>  import javax.wsdl.BindingOutput;
>  import javax.wsdl.Definition;
> +import javax.wsdl.Fault;
>  import javax.wsdl.Input;
>  import javax.wsdl.Message;
>  import javax.wsdl.Operation;
> @@ -52,6 +54,7 @@
>  import org.apache.wsdl.WSDLEndpoint;
>  import org.apache.wsdl.WSDLExtensibilityAttribute;
>  import org.apache.wsdl.WSDLExtensibilityElement;
> +import org.apache.wsdl.WSDLFaultReference;
>  import org.apache.wsdl.WSDLInterface;
>  import org.apache.wsdl.WSDLOperation;
>  import org.apache.wsdl.WSDLService;
> @@ -299,43 +302,63 @@
>                 //defined in the WSDL 2.0. eg like #any, #none
>                 // Create the Input Message and add
>                 Input wsdl4jInputMessage = wsdl4jOperation.getInput();
> -               MessageReference wsdlInputMessage =
> this.wsdlComponenetFactory
> -                               .createMessageReference();
> -
> wsdlInputMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
> -
> wsdlInputMessage.setMessageLabel(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> -               this.populateMessageReference(wsdlInputMessage,
> wsdl4jInputMessage.getMessage());
> -               this.copyExtensibleElements(
> -
> (wsdl4jInputMessage.getMessage()).getExtensibilityElements(),
> -                               wsdlInputMessage
> -                               );
> -
> this.copyExtensibilityAttribute(wsdl4jInputMessage.getExtensionAttributes(
> ),
> -                               wsdlInputMessage);
> -               wsdlOperation.setInputMessage(wsdlInputMessage);
> 
> +               if(null != wsdl4jInputMessage){
> +                       MessageReference wsdlInputMessage =
> this.wsdlComponenetFactory
> +                       .createMessageReference();
> +
> wsdlInputMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
> +
> wsdlInputMessage.setMessageLabel(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> +
> wsdlInputMessage.setElement(this.generateReferenceQname(wsdl4jInputMessage
> .getMessage()));
> +                       this.copyExtensibleElements(
> +
> (wsdl4jInputMessage.getMessage()).getExtensibilityElements(),
> +                                       wsdlInputMessage
> +                                       );
> +
> this.copyExtensibilityAttribute(wsdl4jInputMessage.getExtensionAttributes(
> ),
> +                                       wsdlInputMessage);
> +                       wsdlOperation.setInputMessage(wsdlInputMessage);
> +               }
> 
>                 //Create an output message and add
>                 Output wsdl4jOutputMessage = wsdl4jOperation.getOutput();
> -               MessageReference wsdlOutputMessage =
> -
> this.wsdlComponenetFactory.createMessageReference();
> -
> wsdlOutputMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
> -
> wsdlOutputMessage.setMessageLabel(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
> -
> -               this.populateMessageReference(wsdlOutputMessage,
> wsdl4jOutputMessage.getMessage());
> -               this.copyExtensibleElements(
> -
> (wsdl4jOutputMessage.getMessage()).getExtensibilityElements(),
> -                               wsdlOutputMessage
> -                               );
> -
> this.copyExtensibilityAttribute(wsdl4jOutputMessage.getExtensionAttributes
> (),
> -                               wsdlOutputMessage);
> -               wsdlOperation.setOutputMessage(wsdlOutputMessage);
> +               if(null != wsdl4jOutputMessage){
> +                       MessageReference wsdlOutputMessage =
> +
> this.wsdlComponenetFactory.createMessageReference();
> +
> wsdlOutputMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
> +
> wsdlOutputMessage.setMessageLabel(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
> +
> +
> wsdlOutputMessage.setElement(this.generateReferenceQname(wsdl4jOutputMessa
> ge.getMessage()));
> +                       this.copyExtensibleElements(
> +
> (wsdl4jOutputMessage.getMessage()).getExtensibilityElements(),
> +                                       wsdlOutputMessage
> +                                       );
> +
> this.copyExtensibilityAttribute(wsdl4jOutputMessage.getExtensionAttributes
> (),
> +                                       wsdlOutputMessage);
> +                       wsdlOperation.setOutputMessage(wsdlOutputMessage);
> +               }
> +
> +               Map faults = wsdl4jOperation.getFaults();
> +               Iterator faultKeyIterator = faults.keySet().iterator();
> +               WSDLFaultReference faultReference = null;
> +
> +               while(faultKeyIterator.hasNext()){
> 
> +                       Fault fault =
> (Fault)faults.get(faultKeyIterator.next());
> +                       faultReference =
> wsdlComponenetFactory.createFaultReference();
> +
> faultReference.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
> +
> faultReference.setRef(this.generateReferenceQname(fault.getMessage()));
> +                       wsdlOperation.addOutFault(faultReference);
> +
> this.copyExtensibilityAttribute(fault.getExtensionAttributes(),
> faultReference);
> +                       //TODO Fault Message lable
> +
> +               }
> 
>                 //Set the MEP
>                 wsdlOperation.setMessageExchangePattern(WSDL11MEPFinder
>                                 .getMEP(wsdl4jOperation));
> 
>         }
> -       private void populateMessageReference(MessageReference
> womMessage, Message wsdl4jMessage){
> +       private QName generateReferenceQname(Message wsdl4jMessage){
> +               QName referenceQName = null;
>                 if (wsdl4jMessage.getParts().size() > 1){
>                         // Multipart Message
> 
> @@ -351,7 +374,7 @@
>                                 //made out of it earlier.
>                                 //FIXME Actual element name should it
> be xs:, if yes change the qname added to the
>                                 //resolvedmessage list too.
> -
> womMessage.setElement(wsdl4jMessage.getQName());
> +                               referenceQName = wsdl4jMessage.getQName();
>                         }else{
>                                 //Get the list of multiparts of the
> message and create a new Element
>                                 //out of it and add it to the schema.
> @@ -406,7 +429,7 @@
>                                 element.appendChild(newElement);
>                                 //Now since  a new type is created
> augmenting the parts add the QName
>                                 //of the newly created type as the
> messageReference's name.
> -
> womMessage.setElement(wsdl4jMessage.getQName());
> +                               referenceQName = wsdl4jMessage.getQName();
>                                 //Add this message as a resolved
> message, so that incase some other
>                                 //operation refer to the same message
> the if above will take a hit
>                                 //and the cashed QName can be used
> instead of crating another type
> @@ -423,12 +446,13 @@
>                                 Part outPart = ((Part)
> outputIterator.next());
>                                 QName typeName;
>                                 if (null != (typeName =
> outPart.getTypeName())) {
> -                                       womMessage.setElement(typeName);
> +                                       referenceQName = typeName;
>                                 } else {
> -
> womMessage.setElement(outPart.getElementName());
> +                                       referenceQName =
> outPart.getElementName();
>                                 }
>                         }
>                 }
> +               return referenceQName;
>         }
> 
>         private void populateBindingOperation(
> @@ -462,6 +486,15 @@
> 
>  wsdlOutputBinding);
>                         wsdlBindingOperation.setOutput(wsdlOutputBinding);
>                 }
> +
> +
> +//             Map bindingFaults =
> wsdl4jBindingOperation.getBindingFaults();
> +//             Iterator keyIterator = bindingFaults.keySet().iterator();
> +//             while(keyIterator.hasNext()){
> +//                     BindingFault bindingFault =
> (BindingFault)bindingFaults.get(keyIterator.next());
> +//                     bindingFault.getName()
> +//
> +//             }
> 
>         }
> 
> 
> Modified:
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLDescripti
> on.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src
> /org/apache/wsdl/WSDLDescription.java?rev=190373&r1=190372&r2=190373&view=
> diff
> ==========================================================================
> ====
> ---
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLDescripti
> on.java
> (original)
> +++
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLDescripti
> on.java
> Mon Jun 13 02:12:06 2005
> @@ -15,12 +15,13 @@
>   */
>  package org.apache.wsdl;
> 
> -import org.apache.axis.wsdl.builder.WSDLComponentFactory;
> -
> -import javax.xml.namespace.QName;
>  import java.util.ArrayList;
>  import java.util.HashMap;
> 
> +import javax.xml.namespace.QName;
> +
> +import org.apache.axis.wsdl.builder.WSDLComponentFactory;
> +
>  /**
>   * @author [EMAIL PROTECTED]
>   */
> @@ -267,11 +268,6 @@
>       * @return A new instance of type <code>WSDLEndpoint</code>
>       */
>      public WSDLEndpoint createEndpoint();
> -
> -    /**
> -     * @return A new instance of type <code>WSDLFault</code>
> -     */
> -    public WSDLFault createFault();
> 
>      /**
>       * @return A new instance of type <code>WSDLFeature</code>
> 
> Modified:
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLOperation
> .java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src
> /org/apache/wsdl/WSDLOperation.java?rev=190373&r1=190372&r2=190373&view=di
> ff
> ==========================================================================
> ====
> ---
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLOperation
> .java
> (original)
> +++
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/WSDLOperation
> .java
> Mon Jun 13 02:12:06 2005
> @@ -129,4 +129,16 @@
>       * @return
>       */
>      public String getTargetnamespace();
> +
> +    /**
> +     * Add the InFault to the Components InFaults
> +     * @param inFault
> +     */
> +    public void addInFault(WSDLFaultReference inFault);
> +
> +    /**
> +     * Add the OutFault to the Component OutFaults
> +     * @param outFault
> +     */
> +    public void addOutFault(WSDLFaultReference outFault);
>  }
> 
> Modified:
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLDesc
> riptionImpl.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src
> /org/apache/wsdl/impl/WSDLDescriptionImpl.java?rev=190373&r1=190372&r2=190
> 373&view=diff
> ==========================================================================
> ====
> ---
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLDesc
> riptionImpl.java
> (original)
> +++
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLDesc
> riptionImpl.java
> Mon Jun 13 02:12:06 2005
> @@ -28,7 +28,7 @@
>  import org.apache.wsdl.WSDLDescription;
>  import org.apache.wsdl.WSDLEndpoint;
>  import org.apache.wsdl.WSDLExtensibilityAttribute;
> -import org.apache.wsdl.WSDLFault;
> +import org.apache.wsdl.WSDLFaultReference;
>  import org.apache.wsdl.WSDLFeature;
>  import org.apache.wsdl.WSDLImport;
>  import org.apache.wsdl.WSDLInclude;
> @@ -438,12 +438,6 @@
>          return new WSDLEndpointImpl();
>      }
> 
> -    /**
> -     * @return A new instance of type <code>WSDLFault</code>
> -     */
> -    public WSDLFault createFault() {
> -        return new WSDLFaultImpl();
> -    }
> 
>      /**
>       * @return A new instance of type <code>WSDLFeature</code>
> @@ -508,5 +502,9 @@
> 
>         public WSDLExtensibilityAttribute
> createWSDLExtensibilityAttribute(){
>                 return new WSDLExtensibilityAttributeImpl();
> +       }
> +
> +       public WSDLFaultReference createFaultReference(){
> +               return  new WSDLFaultReferenceImpl();
>         }
>  }
> 
> Modified:
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOper
> ationImpl.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src
> /org/apache/wsdl/impl/WSDLOperationImpl.java?rev=190373&r1=190372&r2=19037
> 3&view=diff
> ==========================================================================
> ====
> ---
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOper
> ationImpl.java
> (original)
> +++
> webservices/axis/trunk/java/modules/wsdl/src/org/apache/wsdl/impl/WSDLOper
> ationImpl.java
> Mon Jun 13 02:12:06 2005
> @@ -16,6 +16,7 @@
>  package org.apache.wsdl.impl;
> 
>  import org.apache.wsdl.MessageReference;
> +import org.apache.wsdl.WSDLFaultReference;
>  import org.apache.wsdl.WSDLOperation;
>  import org.apache.wsdl.WSDLService;
> 
> @@ -214,5 +215,21 @@
>              return this.name.getNamespaceURI();
>          }
>          return null;
> +    }
> +
> +    /**
> +     * Add the InFault to the Components InFaults
> +     * @param inFault
> +     */
> +    public void addInFault(WSDLFaultReference inFault){
> +       this.infaults.add(inFault);
> +    }
> +
> +    /**
> +     * Add the OutFault to the Component OutFaults
> +     * @param outFault
> +     */
> +    public void addOutFault(WSDLFaultReference outFault){
> +       this.outfaults.add(outFault);
>      }
>  }
> 
> 
> 
> 
> --
> Ajith Ranabahu


Reply via email to