Hi Jim

On 9/14/10 1:27 PM, Jim Ma wrote:
Hi all ,
After this commit,  the SoapJMSInInterceptor is added to check the
"SOAPJMS_conentType" and other key/value pairs in message header .  It
requires the "SOAPJMS_contentType" and other properties added in the
jms message. Are such header (jms message property) checks in
SoapJMSInInterceptor  required in SOAP JMS specification ?  If the
answer is yes , do we actually need to require user to add these
properties to each jms request message as we do in
SOAPJMSTestSuiteTest now ?

SoapJMSInInterceptor is used to check if the message headers meet the requirements of SOAP over JMS specification.



I also want to keep the following java first jms test case work
without properties setting in jms message ? Can the SoapJMSInteceptor
automatically be disabled for this test case ?

If you don't want to use it, you just need to make sure you don't use the transportId for the SOAP over JMS. You can change the use other JMS transportId such as "http://cxf.apache.org/transports/jms/configuration";


Willem

------SEI impl-----------
@javax.jws.WebService(portName = "GreeterPort",
                       serviceName = "JMSGreeterService",
                       targetNamespace = "http://cxf.apache.org/jms_greeter";,
public class GreeterJMSImpl {
     public String greetMe(String me) {
         LOG.info("Executing operation greetMe");
         System.out.println("Executing operation greetMe");
         System.out.println("Message received: " + me + "\n");
         return "Hello " + me;
     }


-----------------cxf.xml ------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans
   ....
   http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
   http://cxf.apache.org/transports/jms
http://cxf.apache.org/schemas/configuration/jms.xsd'>

   <jaxws:endpoint
     implementor='org.apache.cxf.jms_greeter.GreeterJMSImpl'
     transportId="http://www.w3.org/2010/soapjms/";>
   </jaxws:endpoint>

   <jms:destination
name="{http://cxf.apache.org/jms_greeter}GreeterPort.jms-destination";>
     <jms:address
       destinationStyle="queue"
       jndiConnectionFactoryName="ConnectionFactory"
       jndiDestinationName="queue/RequestQueue"
       jndiReplyDestinationName="queue/ResponseQueue">
     </jms:address>
   </jms:destination>

   <jms:conduit 
name="{http://cxf.apache.org/jms_greeter}GreeterPort..jms-conduit";>
     <jms:address
       destinationStyle="queue"
       jndiConnectionFactoryName="ConnectionFactory"
       jndiDestinationName="queue/RequestQueue"
       jndiReplyDestinationName="queue/ResponseQueue">
     </jms:address>
   </jms:conduit>
</beans>

---Client code -------
String reqMessage ="<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>...</env:Envelope>";
InitialContext context = new InitialContext();
QueueConnectionFactory connectionFactory
(QueueConnectionFactory)context.lookup("ConnectionFactory");
Queue reqQueue = (Queue)context.lookup("queue/RequestQueue");
Queue resQueue = (Queue)context.lookup("queue/ResponseQueue");
QueueConnection con = connectionFactory.createQueueConnection();
QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueReceiver receiver = session.createReceiver(resQueue);
ResponseListener responseListener = new ResponseListener();
receiver.setMessageListener(responseListener);
con.start();

TextMessage message = session.createTextMessage(reqMessage);
message.setJMSReplyTo(resQueue);
waitForResponse = true;
QueueSender sender = session.createSender(reqQueue);
sender.send(message);
sender.close();
int timeout = 5;
while (waitForResponse&&  timeout>  0)
  {
      Thread.sleep(1000);
       timeout = timeout -1;
  }


Cheers,
Jim




On Wed, Aug 18, 2010 at 1:53 PM,<[email protected]>  wrote:
Author: ningjiang
Date: Wed Aug 18 05:53:13 2010
New Revision: 986571

URL: http://svn.apache.org/viewvc?rev=986571&view=rev
Log:
CXF-2949, CXF-2950, CXF-2951, applied Peter's patch of soapjms

Modified:
    
cxf/trunk/distribution/src/main/release/samples/jms-spec-demo/wsdl/jms_greeter.wsdl
    
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
    
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapFaultFactory.java
    
cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/bus-extensions.xml
    
cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
    
cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/jms/interceptor/SoapFaultFactoryTest.java
    
cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spec/JMSSpecConstants.java
    
cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/spec/jms-spec-wsdl.xsd
    
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
    
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
    
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml
    cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_test.wsdl
    cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl

Reply via email to