Hmm...   I wonder if this is related to:

https://issues.apache.org/jira/browse/CXF-941

I think the Dispatch.invokeOneWay stuff isn't letting the transport know 
not to expect a response.  

Dan



On Wednesday 12 December 2007, Amah Ahite wrote:
> Hi,
> I am trying to configure CXF to redirect an asynchronous call response
> to a queue an MDB listen on but it does not work as expected.
> I started from the java_first_jaxws example code where I change the
> server configuration as following :
>
>
> <jms:address destinationStyle="queue"
>       jndiConnectionFactoryName="ConnectionFactory"
>       jndiDestinationName="dynamicQueues/test.cxf.jmstransport.queue"
>       jndiReplyDestinationName="dynamicQueues/test.cxf.jmstransport.queue.r
>eply" connectionUserName="testUser" connectionPassword="testPassword">
> <jms:JMSNamingProperty name="java.naming.factory.initial"
>               value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" 
> />
>       <jms:JMSNamingProperty name="java.naming.provider.url"
>               value="tcp://localhost:61616" />
> </jms:address>
>
>
>
> and create a client that call the server using the Dispatch interface:
>
>
>
> package test.client;
> import java.io.StringReader;
>
> import javax.wsdl.extensions.soap12.SOAP12Binding;
> import javax.xml.namespace.QName;
> import javax.xml.transform.stream.StreamSource;
> import javax.xml.ws.Dispatch;
> import javax.xml.ws.Service;
>
> import org.apache.cxf.binding.soap.SoapBindingFactory;
> import org.apache.cxf.helpers.IOUtils;
> import org.apache.cxf.jaxws.support.BindingID;
>
> public class DispatchClientJMS {
>       public static void main(String[] args) throws Exception{
>               QName serviceName = new QName("http://service.test/";, 
> "HelloWorld");
>               Service s = Service.create(serviceName);
>
>               QName portName = new QName("http://service.test/";,
> "HelloWorldPort");
> s.addPort(portName,SoapBindingFactory.SOAP_11_BINDING , "jms://");
> Dispatch<StreamSource> dispatch = s.createDispatch(portName,
> StreamSource.class, Service.Mode.PAYLOAD);
>
>               String req = "<ns1:sayHi
> xmlns:ns1='http://service.test/'><name>HI</name></ns1:sayHi>";
>               dispatch.invokeOneWay(new StreamSource(new StringReader(req)));
> //            StreamSource response = dispatch.invoke(new StreamSource(new
> StringReader(req)));
>               System.out.println(IOUtils.toString(response.getInputStream()));
>       }
> }
>
>
>
> The response is sent to the
> dynamicQueues/test.cxf.jmstransport.queue.reply queue as expected but
> the client does not return from
> dispatch.invokeOneWay() method.
>
> Please could you tell me what I missing.
>
> Thanks you.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to