You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Lou Amodeo (JIRA)" <tu...@ws.apache.org> on 2008/05/22 16:51:56 UTC

[jira] Created: (TUSCANY-2335) binding.ws wsa:EndpointReference not honored

binding.ws wsa:EndpointReference not honored 
---------------------------------------------

                 Key: TUSCANY-2335
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2335
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Misc Binding Extensions
    Affects Versions: Java-SCA-1.1
            Reporter: Lou Amodeo


I see some issues with using the wsa:EndpointReferecne with wsdl.binding.  

1) EndpointReferecneHelper  does not write out the Endpoint reference information to the SCDL.  

    The writer passed into the method  is not used to write the endpoint information.  

     public static void writeEndPointReference(Element element, XMLStreamWriter writer)  {
        try {

            Source domSource = new DOMSource(element);
            StreamResult result = new StreamResult(new StringWriter());
            javax.xml.transform.Transformer transformer = TransformerFactory.newInstance().newTransformer();
            transformer.transform(domSource , result);
         
        } catch (TransformerException e) {
            throw new RuntimeException(e);
        }
    }

  


2) Small issue with the test on whether the wsdl.binding was specified with wsa:EndpointReference.   The code checks for presence of 
    wsdl.binding then throws exception.  This should thow an exception if  wsdl.binding is NOT found.    

       while (reader.hasNext()) {
            int event = reader.next();
            switch (event) {
                case START_ELEMENT: {
                    if (END_POINT_REFERENCE.equals(reader.getName().getLocalPart())) {
                        if (wsdlElementIsBinding != null && wsdlElementIsBinding) {
                            throw new ContributionReadException(
                                                                wsdlElement + " must use wsdl.binding when using wsa:EndpointReference");
                        }
                        wsBinding.setEndPointReference(EndPointReferenceHelper.readEndPointReference(reader));
                    } else if (Constants.OPERATION_QNAME.equals(reader.getName())) {
                        confOp = configuredOperationProcessor.read(reader);
                        if (confOp != null) {
                            ((OperationsConfigurator)wsBinding).getConfiguredOperations().add(confOp);
                        }
                    }
                }
                    break;

            }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TUSCANY-2335) binding.ws wsa:EndpointReference not honored

Posted by "Simon Laws (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws resolved TUSCANY-2335.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-Next

Fix committed at r659574. The problem with the test for wsdl.binding was fixed under TUSCANY-2241

> binding.ws wsa:EndpointReference not honored 
> ---------------------------------------------
>
>                 Key: TUSCANY-2335
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2335
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Misc Binding Extensions
>    Affects Versions: Java-SCA-1.1
>            Reporter: Lou Amodeo
>             Fix For: Java-SCA-Next
>
>
> I see some issues with using the wsa:EndpointReferecne with wsdl.binding.  
> 1) EndpointReferecneHelper  does not write out the Endpoint reference information to the SCDL.  
>     The writer passed into the method  is not used to write the endpoint information.  
>      public static void writeEndPointReference(Element element, XMLStreamWriter writer)  {
>         try {
>             Source domSource = new DOMSource(element);
>             StreamResult result = new StreamResult(new StringWriter());
>             javax.xml.transform.Transformer transformer = TransformerFactory.newInstance().newTransformer();
>             transformer.transform(domSource , result);
>          
>         } catch (TransformerException e) {
>             throw new RuntimeException(e);
>         }
>     }
>   
> 2) Small issue with the test on whether the wsdl.binding was specified with wsa:EndpointReference.   The code checks for presence of 
>     wsdl.binding then throws exception.  This should thow an exception if  wsdl.binding is NOT found.    
>        while (reader.hasNext()) {
>             int event = reader.next();
>             switch (event) {
>                 case START_ELEMENT: {
>                     if (END_POINT_REFERENCE.equals(reader.getName().getLocalPart())) {
>                         if (wsdlElementIsBinding != null && wsdlElementIsBinding) {
>                             throw new ContributionReadException(
>                                                                 wsdlElement + " must use wsdl.binding when using wsa:EndpointReference");
>                         }
>                         wsBinding.setEndPointReference(EndPointReferenceHelper.readEndPointReference(reader));
>                     } else if (Constants.OPERATION_QNAME.equals(reader.getName())) {
>                         confOp = configuredOperationProcessor.read(reader);
>                         if (confOp != null) {
>                             ((OperationsConfigurator)wsBinding).getConfiguredOperations().add(confOp);
>                         }
>                     }
>                 }
>                     break;
>             }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.