Hi
I built my webservice on axis2 server.
-------------------------------------
TestInterface.class
public class TestInterface {
public String getInfo(String str) {
return "webservice:" + str;
}
}
------------------------------------------
--------------------------------------------------------------------------
And i modified the sample_250.xml and sample_251.xml.
1)http/s to JMS
<definitions xmlns="http://ws.apache.org/ns/synapse"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ws.apache.org/ns/synapse
http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd">
<proxy name="Proxy1" transports="http">
<target>
<endpoint>
<address
uri="jms:/Proxy2?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue"/>
</endpoint>
<inSequence>
<property action="set" name="OUT_ONLY" value="true"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<publishWSDL uri="
http://10.16.64.14:8088/axis2/services/TestInterface?wsdl"/>
</proxy>
</definitions>
2)JMS to http/s
<definitions xmlns="http://ws.apache.org/ns/synapse"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ws.apache.org/ns/synapse
http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd">
<proxy name="Proxy2" transports="jms">
<target>
<inSequence>
<property action="set" name="OUT_ONLY" value="true"/>
</inSequence>
<endpoint>
<address uri="
http://10.16.64.14:8088/axis2/services/TestInterface"/>
</endpoint>
<outSequence>
<send/>
</outSequence>
</target>
<publishWSDL uri="
http://10.16.64.14:8088/axis2/services/TestInterface?wsdl"/>
</proxy>
</definitions>
3)My Java client:
final String endPointReference = "http://10.16.64.14:8280/services/Proxy1";
final String targetNamespace = "http://proxy1";
Axis2Client client = new Axis2Client(endPointReference);
String opName = "getInfo";
Object[] opArgs = new Object[] { "hello" };
Class<?>[] opReturnType = new Class[] { String[].class };
Object[] response = client.invokeOp(targetNamespace, opName, opArgs,
opReturnType);
System.out.println(((String[]) response[0])[0]);
4) I sent a request by my client without response.(http/s to JMS)
And the request message has been stored in the queue(it can be seen in the
ActiveMQ).
So how can i get a response/message by synapse (JMS to http/s)?
Best Regards
Vincent