Exposing BPEL process as a webservice inside a webapp -----------------------------------------------------
Key: TUSCANY-2313 URL: https://issues.apache.org/jira/browse/TUSCANY-2313 Project: Tuscany Issue Type: Test Components: Java SCA Samples Affects Versions: Java-SCA-1.2 Environment: Windows under Tomcat 5.5.25 Reporter: Dalys Sebastian The goal is to get a bpel process exposed as a webservice and running as part of a web application. The following method was followed, but an exception was reported when tested. (The exception is at the end) The method I followed: 1) I took the sample-helloworld-bpel in your sample and made the following changes to the maven pom. a) Added axis-ws binding jar b) Replaced the host-embedded dependency with host-webapp c) Created src/main/webapp folder and changed the packaging of pom to war. 2) The WSDL, the BPEL process and the composite file are exactly same as what's given by Tuscany sample helloworld-bpel 3) Added webapp/META-INF/sca-contribution.xml file 4) Introduced the "<binding.ws/>" element in the componentType file. 5) After maven packaged it, it was unpacked into Tomcat. 6) I copied the derby database directories (came with ode-1.1) into WEB-INF/classes. And when I started up the webapp I get an exception. On removing the binding.ws element, it starts up correctly. I am pasting below the contents of sca-contribution file and componentType file which are the only new additions I made. sca-contribution.xml file: <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://bpel" xmlns:bpel="http://bpel"> <deployable composite="bpel:bpel"/> </contribution> componentType file: <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <service name="HelloService" promote="BPELHelloWorldComponent"> <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" /> <binding.ws/> </service> </componentType> Reported Exception: Caused by: java.lang.NullPointerException at org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor.resolvePolicies(PolicyAttachPointProcessor.java:243) at org.apache.tuscany.sca.binding.ws.xml.WebServiceBindingProcessor.resolve(WebServiceBindingProcessor.java:310) at org.apache.tuscany.sca.binding.ws.xml.WebServiceBindingProcessor.resolve(WebServiceBindingProcessor.java:59) at org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcess orExtensionPoint.java:252) at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:109) at org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveContracts(BaseAssemblyProcessor.java:362) at org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveContracts(BaseAssemblyProcessor.java:311) at org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor.resolve(ComponentTypeProcessor.java:340) at org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor.resolve(ComponentTypeProcessor.java:57) at org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:109) at org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor.resolve(ComponentTypeDocumentProcessor.java:112) at org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor.resolve(ComponentTypeDocumentProcessor.java:44) at org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve(ExtensibleURLArtifactProcessor.java:86) at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase(ContributionServiceImpl.java:454) at org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:348) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.