We’ll likely need a more reproducible test case.    I just updated our 
ws-addressing system test to pretty much do:

        List<Long> mem = new ArrayList<Long>(12);
        for (int y = 0;  y < 10; y++) {
            for (int x = 0; x < 5000; x++) {
                greeter.greetMe("test");
            }
            System.gc(); System.gc(); 
            System.gc(); System.gc(); 
            System.gc(); System.gc(); 
            mem.add(Runtime.getRuntime().freeMemory());
        }
        int x = 0;
        for (Long l : mem) {
            System.out.println(x++ + ": " + l);
        }


and I’m not seeing any leaks:
0: 80937176
1: 80971944
2: 81026400
3: 81727120
4: 81712568
5: 81712544
6: 81712520
7: 81400968
8: 81712472
9: 81729112

I would assume with 50,000 messages that I’d see some significant decrease in 
the free memory or something.


Message sent:
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/“>
<soap:Header>
  <Action 
xmlns="http://www.w3.org/2005/08/addressing";>http://apache.org/hello_world_soap_http/Greeter/greetMeRequest</Action>
  <MessageID 
xmlns="http://www.w3.org/2005/08/addressing";>urn:uuid:64b8b662-2ff0-430c-98ea-45b57d6ce84a</MessageID>
  <To 
xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:9002/SoapContext/SoapPort</To>
  <ReplyTo xmlns="http://www.w3.org/2005/08/addressing”>
    <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
  </ReplyTo>
  <customer:CustomerKey xmlns="http://www.w3.org/2005/08/addressing"; 
xmlns:customer="http://example.org/customer"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
wsa:IsReferenceParameter="1">Key#123456789</customer:CustomerKey>
</soap:Header>
<soap:Body>
   <greetMe 
xmlns="http://apache.org/hello_world_soap_http/types";><requestType>test</requestType></greetMe>
</soap:Body>
</soap:Envelope>

Message received:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/“>
<soap:Header>
<Action 
xmlns="http://www.w3.org/2005/08/addressing";>http://apache.org/hello_world_soap_http/Greeter/greetMeResponse</Action>
<MessageID 
xmlns="http://www.w3.org/2005/08/addressing";>urn:uuid:9fc9c1b9-687d-4377-8e0c-d4e19fb70533</MessageID>
<To 
xmlns="http://www.w3.org/2005/08/addressing";>http://www.w3.org/2005/08/addressing/anonymous</To>
<RelatesTo 
xmlns="http://www.w3.org/2005/08/addressing";>urn:uuid:64b8b662-2ff0-430c-98ea-45b57d6ce84a</RelatesTo>
</soap:Header>
<soap:Body>
<greetMeResponse 
xmlns="http://apache.org/hello_world_soap_http/types";><responseType>Hello 
test</responseType></greetMeResponse>
</soap:Body></soap:Envelope>


Can you capture both the request and the response?   If you turn on logging, is 
there any warning about not being able to correlate the response?   Can you use 
jvisualvm or similar to grab a heap dump and trace down to the appropriate 
place that is holding onto the strings?   Can you double check that the returns 
“RelatesTo” header has the appropriate msg id?

Dan



On Jan 10, 2014, at 6:20 AM, Jose María Zaragoza <[email protected]> wrote:

> Hello:
> 
> I'm using CXF 2.7.8 and JAX-WS  to create a SOAP webservice
> 
> This webservice calls another webservice who requieres WS-Addressing
> 
> So, I declare a simple JAX-WS client with WS-Addressing enabled
> 
> 
> <jaxws:client id="client"
>                  serviceClass="com.external.WSPortType"
>                  address="http://extermal.com/Process.jpd";
>                  bindingId="http://schemas.xmlsoap.org/wsdl/soap/http";>
> 
>         <jaxws:features>
>             <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
>       </jaxws:features>
> </jaxws:client>
> 
> 
> I inject this bean into my webservice implementor with
> 
> @Autowired
> WSPortType client;
> 
> So, it's shared by all requests and I think is thread-safe 'in practice'
> (http://cxf.apache.org/faq.html#FAQ-AreJAX-WSclientproxiesthreadsafe?)
> 
> This client sends messages like
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> <soap:Header>
> <Action xmlns="http://www.w3.org/2005/08/addressing";>process</Action>
> <MessageID 
> xmlns="http://www.w3.org/2005/08/addressing";>urn:uuid:aebe3485-07bc-4af7-a3a5-c1df7af15adb
> </MessageID>
> <To 
> xmlns="http://www.w3.org/2005/08/addressing";>http://extermal.com/Process.jpd
> </To>
> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing";>
> <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
> </ReplyTo>
> </soap:Header>
> <soap:Body>
> <process xmlns="urn:com:external:types">
> <phone>34606958413</phone>
> <filterParams>
> <field>data</field>
> </filterParams>
> </process>
> </soap:Body>
> </soap:Envelope>
> 
> and it receives the response correctly ( with the right MessageID )
> 
> 
> Well, this is the scenario.
> In this case, JVM memory heap increases all time and grows up until OOM
> Looking at jvisualm I see a lot of string objects being used by
> WS-addressing library
> If I comment WS-Addressing feature , all works fine and the memory
> heap's behaviour is normal.
> 
> What is wrong ? Any ideas ?
> If you need more data or other test, no problem
> 
> Thanks and regads

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to