You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Zed <cr...@freemail.hu> on 2015/04/24 11:23:55 UTC

SOAP over Jms using GlassFish 3.1

Hi!

I'm trying to implement a simple SOAP over Jms conversation using GlassFish
3.1 and a standalone client. I have downloaded the latest Apache CXF version
(3.0.4), and put the necessary JAR files under the two project. After days
of struggle the best I could come up with is a SOAPFault from the server,
signing a receive timeout after one minute. Important part of the got stack
trace:

WARNING: Interceptor for
{http://ns.com/hello}HelloService#{http://ns.com/hello}hello has thrown
exception, unwinding now
java.lang.RuntimeException: Timeout receiving message with correlationId
8d3b8de3645e4a5a99962703cf4936ce0000000000000001
    at
org.apache.cxf.transport.jms.JMSConduit.sendAndReceiveMessage(JMSConduit.java:237)
    at
org.apache.cxf.transport.jms.JMSConduit.sendExchange(JMSConduit.java:146)
    at
org.apache.cxf.transport.jms.MessageStreamUtil$SendingOutputStream.doClose(MessageStreamUtil.java:81)
    ...

I've checked the configured destination queue, and the below message is
there as expected. But somehow it hasn't been processed and transferred to
the service.

Class:          com.sun.messaging.jmq.jmsclient.BytesMessageImpl
getJMSMessageID(): 
ID:43-192.168.1.190(ec:88:d1:7b:f5:df)-54598-1429811718557
getJMSTimestamp():  1429811718557
getJMSCorrelationID():  8d3b8de3645e4a5a99962703cf4936ce0000000000000001
JMSReplyTo:     temporary_destination://queue/192.168.1.190/54598/1
JMSDestination:     TestQueue
getJMSDeliveryMode():   PERSISTENT
getJMSRedelivered():    false
getJMSType():       null
getJMSExpiration(): 0
getJMSPriority():   4
Properties:     {SOAPJMS_soapAction="", SOAPJMS_contentType=text/xml;
charset=UTF-8, SOAPJMS_requestURI=jms:queue:jms/TestQueue,
SOAPJMS_bindingVersion=1.0, SOAPJMS_isFault=false}

I'm aware that some libraries of CXF can conflict with the ones in
GlassFish, so I set class-loader delegate="false" as suggested by Apache.
Moreover, I had to configure the JNDI and Jms properties in the client code
too. They are not parsed from the WSDL, so without manually configuring them
I wouldn't even got a message. Now I've ran out of ideas. Maybe I'm just
overlooking something, so all suggestions are welcome. Thanks!

Below is the WSDL of the service:

<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:jms="http://cxf.apache.org/transports/jms"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://ns.com/hello" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:x1="http://ns.com/hello/types" name="HelloService"
targetNamespace="http://ns.com/hello">
    <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ns.com/hello/types" elementFormDefault="qualified">
            <element name="hello">
                <complexType/>
            </element>
            <element name="helloResponse">
                <complexType>
                    <sequence>
                        <element name="responseType" type="xsd:string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </wsdl:types>
    <wsdl:message name="helloRequest">
        <wsdl:part element="x1:hello" name="request"/>
    </wsdl:message>
    <wsdl:message name="helloResponse">
        <wsdl:part element="x1:helloResponse" name="response"/>
    </wsdl:message>
    <wsdl:portType name="JMSHelloPortType">
        <wsdl:operation name="hello">
            <wsdl:input message="tns:helloRequest" name="helloRequest"/>
            <wsdl:output message="tns:helloResponse" name="helloResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="JMSHelloPortBinding" type="tns:JMSHelloPortType">
        <soap:binding style="document"
transport="http://www.w3.org/2010/soapjms/"/>
        <wsdl:operation name="hello">
            <soap:operation soapAction="" style="document"/>
            <wsdl:input name="helloRequest">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="helloResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloService">
        <wsdl:port binding="tns:JMSHelloPortBinding" name="helloPort">
            <soap:address
location="http://localhost:8080/GFSoapOverJMS/HelloService"/>
            <jms:address destinationStyle="queue"
jndiConnectionFactoryName="jms/TestConnectionFactory"
jndiDestinationName="jms/TestQueue">
                <jms:JMSNamingProperty name="java.naming.factory.initial"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
                <jms:JMSNamingProperty name="java.naming.provider.url.pkgs"
value="com.sun.enterprise.naming"/>
                <jms:JMSNamingProperty name="java.naming.factory.state"
value="com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"/>
                <jms:JMSNamingProperty name="org.omg.CORBA.ORBInitialHost"
value="localhost"/>
                <jms:JMSNamingProperty name="org.omg.CORBA.ORBInitialPort"
value="3700"/>
            </jms:address>
            <jms:clientConfig useConduitIdSelector="false"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>




--
View this message in context: http://cxf.547215.n5.nabble.com/SOAP-over-Jms-using-GlassFish-3-1-tp5756498.html
Sent from the cxf-user mailing list archive at Nabble.com.