Question

I am trying to setup an HelloWorld bpel process with Apache-ODE. I have put the ode.war(1.3.5/1.3.6) into an Tomcat 7.0.50, and deployed my helloworld process using the web-interface of ODE.

My process simply receive an message. Then the the message is translate into the namespace of another webservice and invoke it. The result is then translate back to the first namespace and used as reply. All wsdl files and portLinkType are packed with the process. Here is my process:

<bpel:assign name="myInputInitialization">
    <bpel:copy>
        <bpel:from>
            <bpel:literal>
                <ns2:sayHi xmlns:ns2="http://samples.orchestrator.intrinsec.com/">
                    <text>NoBody</text>
                </ns2:sayHi>
            </bpel:literal>
        </bpel:from>
        <bpel:to variable="myInput" part="parameters"/>
    </bpel:copy>
</bpel:assign>
<bpel:assign name="sayHiResponseInitialization">
    <bpel:copy>
        <bpel:from>
            <bpel:literal>
                <ns2:sayHiResponse xmlns:ns2="http://samples.orchestrator.intrinsec.com/">
                    <myHelloText>
                        <text>Bye</text>
                    </myHelloText>
                </ns2:sayHiResponse>
            </bpel:literal>
        </bpel:from>
        <bpel:to variable="sayHiResponse" part="parameters"/>
    </bpel:copy>
</bpel:assign>

<bpel:assign validate="no" name="myAssignIn"> <!-- validate="yes" is not supported by ODE.  -->
    <bpel:copy>
        <bpel:from variable="sayHiRequest" part="parameters">
            <bpel:query>text</bpel:query>
        </bpel:from>
        <bpel:to variable="myInput" part="parameters">
            <bpel:query>text</bpel:query>
        </bpel:to>
    </bpel:copy>
</bpel:assign>
<bpel:invoke
    name="myInvoke"
    partnerLink="helloWorldPartnerLinkService"
    operation="sayHi"
    portType="samples:IHelloWorld"
    inputVariable="myInput"
    outputVariable="myOutput">
</bpel:invoke>
<bpel:assign validate="no" name="myAssignOut">
    <bpel:copy>
        <bpel:from variable="myOutput" part="parameters">
            <bpel:query>myHelloText/text</bpel:query>
        </bpel:from>
        <bpel:to variable="sayHiResponse" part="parameters">
            <bpel:query>myHelloText/text</bpel:query>
        </bpel:to>
    </bpel:copy>
</bpel:assign>
<bpel:reply
    name="myReply"
    partnerLink="helloWorldPartnerLinkClient"
    operation="sayHi"
    portType="bonjourlemonde:IHelloWorld"
    variable="sayHiResponse">
</bpel:reply>

I cut the wsdl-imports, partnerLinks and variables definition because this is already very long.

The web-service that provide the implementation is define by :

@WebService(serviceName = "HelloWorldService", portName="HelloWorldPort")
public interface IHelloWorld
{
    @GET @Path("sayHi")
        public @WebResult(name = "myHelloText") HelloText sayHi(final @WebParam(name = "text") String text);
}

and

public class HelloWorld implements IHelloWorld
{
  @Override
  public HelloText sayHi(final String text)
  {
    return new HelloText((text == null)?"Hello":"Hello " + text);

  }
}

This invoked webService is code using CXF, work fine, and is deployed in the same Tomcat (a standalone server start with jetty Endpoint.publish, give the same behavior).

Then using the standard wsimport tool I create a client for the webService expose by ODE.

Calling this web service give me the expected result (Hello very very George). I can also see the deployement package, process and instance in the ODE interface. I can query ODE using the 3 managements web-services and get the same informations as in the web-interface.

Every thing until here is perfect.

Now I'm using my generated client a second time; then I get an 404 http error. All futher call to the web-service design in my BPEL process will result in a 404 http error while the wsdl corresponding to the web service (and use to generate the client) can be reach.

The only way to get the BPEL process start again is to restart the Tomcat (or undeploy ODE, redeploy ODE, redeploy the BPEL process).

No error can be seen in the catalina.out unless I activate change to DEBUG the log level of ODE (The log is too mush verbose for the question).

The first run of the process is about 800 lines of debug messages without error, and the succes of the process can be follow step by step. The second run of the process show this error :

15:35:20,866 DEBUG [DataRetrievalUtil] File does not exist in the Service Repository! File=META-INF/ServiceData.xml
15:35:20,866 DEBUG [AxisDataLocatorImpl] Check loading failure for file, META-INF/ServiceData.xml.Message = Failed to load from file, META-INF/ServiceData.xml
15:35:20,866 DEBUG [AxisDataLocatorImpl] Check loading failure for file, META-INF/ServiceData.xml
org.apache.axis2.dataretrieval.DataRetrievalException: Failed to load from file, META-INF/ServiceData.xml
    at org.apache.axis2.dataretrieval.DataRetrievalUtil.buildOM(DataRetrievalUtil.java:64)
    at org.apache.axis2.dataretrieval.AxisDataLocatorImpl.loadServiceData(AxisDataLocatorImpl.java:104)
    at org.apache.axis2.description.AxisService.getDefaultDataLocator(AxisService.java:2949)
...
Caused by: javax.xml.stream.XMLStreamException: File does not exist in the Service Repository! File=META-INF/ServiceData.xml
    at org.apache.axis2.dataretrieval.DataRetrievalUtil.getInputStream(DataRetrievalUtil.java:103)
...

The 'ServiceData.xml' error drive me to add the 'axis2' tag. In the ODE documentation/examples/UnitTests there is nothing related to service.xml/ServiceData.xml and googling on this kind of error doesn't give any road to solution.

Was it helpful?

Solution

This is a feature related to wsdl of the web-services exposes by ODE. In all wsdl, the service port location can be wrong (the require 'ode/processes' part of the url is missing.) . This is true also for all 3 embeded managements services of ODE. The wsdl can change after the first call to a process that is using an 'invoke' activity.

If you use some tools like 'wsimport' to generate client code, you must override the endpoint url of the service (by adding 'ode/process' between the two '/').

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top