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)" <de...@tuscany.apache.org> on 2008/08/20 20:20:44 UTC

[jira] Created: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Generated WSDL fails to resolve when packaged in contribution 
--------------------------------------------------------------

                 Key: TUSCANY-2558
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
             Project: Tuscany
          Issue Type: Bug
    Affects Versions: Java-SCA-1.3
            Reporter: Lou Amodeo
         Attachments: calculator.CalculatorService.wsdl

I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 

org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  

In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
           targetNamespace="http://www.ibm.com/samples/sca/calculator"
           name="CalculatorLocatorComposite">

    <component name="CalculatorLocatorComponent">
      <implementation.java class="calculator.CalculatorLocatorImpl"/>
            <reference name="calculator" target="CalculatorComponent">
        <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
        <binding.ws/>
      </reference>
    </component>

</composite>




The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor

private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {

        if (wsdlInterface != null && wsdlInterface.isUnresolved()) {

            // Resolve the WSDL interface
            wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
            if (wsdlInterface.isUnresolved()) {

                // If the WSDL interface has never been resolved yet, do it now
                // First, resolve the WSDL definition for the given namespace
                WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
                wsdlDefinition.setUnresolved(true);
                wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
                WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
                if (!resolved.isUnresolved()) {
                    wsdlDefinition.setDefinition(resolved.getDefinition());
                    wsdlDefinition.setLocation(resolved.getLocation());
                    wsdlDefinition.setURI(resolved.getURI());
                    wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
                    wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
                    wsdlDefinition.setUnresolved(false);
                    WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
                    if (portType != null) {                        
                        // Introspect the WSDL portType and add the resulting
                        // WSDLInterface to the resolver
                        try {
                            wsdlDefinition.setDefinition(portType.getDefinition());
                            wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
                            wsdlInterface.setWsdlDefinition(wsdlDefinition);
                            resolver.addModel(wsdlInterface);
                        } catch (InvalidInterfaceException e) {
                        	ContributionResolveException ce = new ContributionResolveException(e);
                        	error("ContributionResolveException", wsdlFactory, ce);
                            //throw ce;
                        }                        
                    }
  

I am attaching the generated WSDL.   

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


[jira] Updated: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Lou Amodeo (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lou Amodeo updated TUSCANY-2558:
--------------------------------

    Attachment: calculator.zip

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl, calculator.zip
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Resolved: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Raymond Feng (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng resolved TUSCANY-2558.
-----------------------------------

    Resolution: Fixed

I think I have fixed the type attribute issue as part of TUSCANY-2398 under rr689587. Can you verify?

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl, calculator.zip, TUSCANY-2558.patch
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Assigned: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Ramkumar Ramalingam (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramkumar Ramalingam reassigned TUSCANY-2558:
--------------------------------------------

    Assignee: Ramkumar Ramalingam

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Commented: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Ramkumar Ramalingam (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626835#action_12626835 ] 

Ramkumar Ramalingam commented on TUSCANY-2558:
----------------------------------------------

Hi Raymond,
Yeah this fix is available as part of TUSCANY-2398. Let me make this JIRA as a duplicate of TUSCANY-2398.

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl, calculator.zip, TUSCANY-2558.patch
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Commented: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Ramkumar Ramalingam (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625332#action_12625332 ] 

Ramkumar Ramalingam commented on TUSCANY-2558:
----------------------------------------------

Hi Lou,
I could see that the problem in your case with the fault type definitions generated in the WSDL document. 

Please provide/attach the implementation code you used to generate the WSDL document for the verifying the same.



> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Commented: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Lou Amodeo (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624096#action_12624096 ] 

Lou Amodeo commented on TUSCANY-2558:
-------------------------------------

I ran this wsdl through wsimport and here is output


  [WARNING] src-resolve.4.1: Error resolving component 'int'. It was detected that
 'int' has no namespace, but components with no target namespace are not referen
ceable from schema document 'file:/C:/WASV7I5/AppServer/bin/calculator.Calculato
rService.wsdl#types?schema2'. If 'int' is intended to have a namespace, perhaps
a prefix needs to be provided. If it is intended that 'int' has no namespace, th
en an 'import' without a "namespace" attribute should be added to 'file:/C:/WASV
7I5/AppServer/bin/calculator.CalculatorService.wsdl#types?schema2'.
  line 5 of file:/C:/WASV7I5/AppServer/bin/calculator.CalculatorService.wsdl#typ
es?schema2

[ERROR] undefined simple or complex type 'int'
  line 5 of file:/C:/WASV7I5/AppServer/bin/calculator.CalculatorService.wsd

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>         Attachments: calculator.CalculatorService.wsdl
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Commented: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Lou Amodeo (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626152#action_12626152 ] 

Lou Amodeo commented on TUSCANY-2558:
-------------------------------------

I attached the impl code.  What I did was install this application as WSDlless.  Capture the generated wsdl.  Then using the generated wsdl repackage with generated WSDL adding a wsdlElement.   

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl, calculator.zip
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Updated: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Lou Amodeo (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lou Amodeo updated TUSCANY-2558:
--------------------------------

    Attachment: calculator.CalculatorService.wsdl

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>         Attachments: calculator.CalculatorService.wsdl
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Commented: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624093#action_12624093 ] 

Scott Kurz commented on TUSCANY-2558:
-------------------------------------

Looks like a problem originally generating the WSDL in the first place rather than a problem parsing it once it's packaged.

The fault message in the portType operation has the wrong NS:

it is:
      <wsdl:fault name="divideByZeroFault" message="ns4:divideByZeroFault">
should be:
      <wsdl:fault name="divideByZeroFault" message="tns:divideByZeroFault">

The fault elem def has a problem too. It's:
   <xs:element name="divideByZeroFault" type="int"/>
rather than:
  <xs:element name="divideByZeroFault" type="xs:int"/>




> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>         Attachments: calculator.CalculatorService.wsdl
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Updated: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Ramkumar Ramalingam (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramkumar Ramalingam updated TUSCANY-2558:
-----------------------------------------

    Attachment: TUSCANY-2558.patch

Hi Lou,
The issue seem to be with the fault element definition
   <xs:element name="divideByZeroFault" type="int"/>
rather than:
  <xs:element name="divideByZeroFault" type="xs:int"/>

I have attached a patch to fix the same, but I could not reproduce the same error with Tuscany environment. Will have to figure out the reason for the same.

In the mean time, please verify if this fix works for you and would suggest you to re-open this issue if required.

Thanks,
Ramkumar R

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl, calculator.zip, TUSCANY-2558.patch
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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


[jira] Updated: (TUSCANY-2558) Generated WSDL fails to resolve when packaged in contribution

Posted by "Ramkumar Ramalingam (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramkumar Ramalingam updated TUSCANY-2558:
-----------------------------------------

    Patch Info: [Patch Available]

> Generated WSDL fails to resolve when packaged in contribution 
> --------------------------------------------------------------
>
>                 Key: TUSCANY-2558
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2558
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>            Reporter: Lou Amodeo
>            Assignee: Ramkumar Ramalingam
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator.CalculatorService.wsdl, calculator.zip, TUSCANY-2558.patch
>
>
> I attempted to package a WSDL in a contribution that was previously generated using the WSDL deployment process of binding.ws  and received a ContributionException with the following cause: 
> org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The fault message MUST have a single part .  
> In this case I was attempting to use interface.wsdl with empty binding.ws with the following SCDL: 
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>            targetNamespace="http://www.ibm.com/samples/sca/calculator"
>            name="CalculatorLocatorComposite">
>     <component name="CalculatorLocatorComponent">
>       <implementation.java class="calculator.CalculatorLocatorImpl"/>
>             <reference name="calculator" target="CalculatorComponent">
>         <interface.wsdl interface="http://calculator/#wsdl.interface(CalculatorService)"/>
>         <binding.ws/>
>       </reference>
>     </component>
> </composite>
> The failure occurs during  wsdlFactory.createWSDLInterface in WSDLInterfaceProcessor
> private WSDLInterface resolveWSDLInterface(WSDLInterface wsdlInterface, ModelResolver resolver) throws ContributionResolveException {
>         if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
>             // Resolve the WSDL interface
>             wsdlInterface = resolver.resolveModel(WSDLInterface.class, wsdlInterface);
>             if (wsdlInterface.isUnresolved()) {
>                 // If the WSDL interface has never been resolved yet, do it now
>                 // First, resolve the WSDL definition for the given namespace
>                 WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
>                 wsdlDefinition.setUnresolved(true);
>                 wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
>                 WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition);
>                 if (!resolved.isUnresolved()) {
>                     wsdlDefinition.setDefinition(resolved.getDefinition());
>                     wsdlDefinition.setLocation(resolved.getLocation());
>                     wsdlDefinition.setURI(resolved.getURI());
>                     wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());
>                     wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
>                     wsdlDefinition.setUnresolved(false);
>                     WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
>                     if (portType != null) {                        
>                         // Introspect the WSDL portType and add the resulting
>                         // WSDLInterface to the resolver
>                         try {
>                             wsdlDefinition.setDefinition(portType.getDefinition());
>                             wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver);
>                             wsdlInterface.setWsdlDefinition(wsdlDefinition);
>                             resolver.addModel(wsdlInterface);
>                         } catch (InvalidInterfaceException e) {
>                         	ContributionResolveException ce = new ContributionResolveException(e);
>                         	error("ContributionResolveException", wsdlFactory, ce);
>                             //throw ce;
>                         }                        
>                     }
>   
> I am attaching the generated WSDL.   

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