Hi Freeman,
1. I have a JMS provider running outside of SMX, the WSDL is
<wsdl:definitions name="JMSGreeterService"
targetNamespace="http://cxf.apache.org/jms_greeter"
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://cxf.apache.org/jms_greeter"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:x1="http://cxf.apache.org/jms_greeter/types">
<wsdl:types>
<schema targetNamespace="http://cxf.apache.org/jms_greeter/types"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<element name="sayHi">
<complexType/>
</element>
<element name="sayHiResponse">
<complexType>
<sequence>
<element name="responseType" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="greetMe">
<complexType>
<sequence>
<element name="requestType" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="greetMeResponse">
<complexType>
<sequence>
<element name="responseType" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="greetMeOneWay">
<complexType>
<sequence>
<element name="requestType" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="sayHiRequest">
<wsdl:part element="x1:sayHi" name="in"/>
</wsdl:message>
<wsdl:message name="sayHiResponse">
<wsdl:part element="x1:sayHiResponse" name="out"/>
</wsdl:message>
<wsdl:message name="greetMeRequest">
<wsdl:part element="x1:greetMe" name="in"/>
</wsdl:message>
<wsdl:message name="greetMeResponse">
<wsdl:part element="x1:greetMeResponse" name="out"/>
</wsdl:message>
<wsdl:message name="greetMeOneWayRequest">
<wsdl:part element="x1:greetMeOneWay" name="in"/>
</wsdl:message>
<wsdl:portType name="JMSGreeterPortType">
<wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
</wsdl:operation>
<wsdl:operation name="greetMe">
<wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
<wsdl:output message="tns:greetMeResponse"
name="greetMeResponse"/>
</wsdl:operation>
<wsdl:operation name="greetMeOneWay">
<wsdl:input message="tns:greetMeOneWayRequest"
name="greetMeOneWayRequest"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="JMSGreeterPortBinding"
type="tns:JMSGreeterPortType">
<soap:binding style="document" transport="
http://cxf.apache.org/transport/jms"/<http://cxf.apache.org/transport/jms%22/>
>
<wsdl:operation name="greetMe">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="greetMeRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="greetMeResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="sayHiRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHiResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="greetMeOneWay">
<soap:operation soapaction="" style="document"/>
<wsdl:input name="greetMeOneWayRequest">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="JMSGreeterService">
<wsdl:port binding="tns:JMSGreeterPortBinding"
name="GreeterPort">
<jms:address
destinationStyle="queue"
jndiConnectionFactoryName="ConnectionFactory"
jndiDestinationName="dynamicQueues/test.cxf.jmstransport.queue">
<jms:JMSNamingProperty name="java.naming.factory.initial"
value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
<jms:JMSNamingProperty name="java.naming.provider.url"
value="tcp://yfgm-2003b:61616"/>
</jms:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
2. I create a CXF-BC provider to communicate with that serivce. the wsdl is
just as the same with above, the xbean.xml is
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:greeter="http://cxf.apache.org/jms_greeter">
<cxfbc:provider wsdl="classpath:[EMAIL PROTECTED]"
locationURI="tcp://yfgm-2003b:61616"
service="greeter:JMSGreeterService"
endpoint="GreeterPort"/>
</beans>
3. Create a CXF-BC consumer as a proxied endpoint that other application can
access the service via SMX, the xbean.xml is
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:greeter="http://cxf.apache.org/jms_greeter">
<cxfbc:consumer wsdl="classpath:[EMAIL PROTECTED]"
service="greeter:JMSGreeterService"
endpoint="GreeterPort2"
targetEndpoint="GreeterPort"
targetService="greeter:JMSGreeterService"
/>
</beans>
And the WSDL is
<wsdl:definitions name="JMSGreeterService"
targetNamespace="http://cxf.apache.org/jms_greeter"
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://cxf.apache.org/jms_greeter"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:x1="http://cxf.apache.org/jms_greeter/types">
<wsdl:types>
<schema targetNamespace="http://cxf.apache.org/jms_greeter/types"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<element name="sayHi">
<complexType/>
</element>
<element name="sayHiResponse">
<complexType>
<sequence>
<element name="responseType" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="greetMe">
<complexType>
<sequence>
<element name="requestType" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="greetMeResponse">
<complexType>
<sequence>
<element name="responseType" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="greetMeOneWay">
<complexType>
<sequence>
<element name="requestType" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="sayHiRequest">
<wsdl:part element="x1:sayHi" name="in"/>
</wsdl:message>
<wsdl:message name="sayHiResponse">
<wsdl:part element="x1:sayHiResponse" name="out"/>
</wsdl:message>
<wsdl:message name="greetMeRequest">
<wsdl:part element="x1:greetMe" name="in"/>
</wsdl:message>
<wsdl:message name="greetMeResponse">
<wsdl:part element="x1:greetMeResponse" name="out"/>
</wsdl:message>
<wsdl:message name="greetMeOneWayRequest">
<wsdl:part element="x1:greetMeOneWay" name="in"/>
</wsdl:message>
<wsdl:portType name="JMSGreeterPortType">
<wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
</wsdl:operation>
<wsdl:operation name="greetMe">
<wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
<wsdl:output message="tns:greetMeResponse"
name="greetMeResponse"/>
</wsdl:operation>
<wsdl:operation name="greetMeOneWay">
<wsdl:input message="tns:greetMeOneWayRequest"
name="greetMeOneWayRequest"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="JMSGreeterPortBinding"
type="tns:JMSGreeterPortType">
<soap:binding style="document" transport="
http://cxf.apache.org/transport/jms"/<http://cxf.apache.org/transport/jms%22/>
>
<wsdl:operation name="greetMe">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="greetMeRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="greetMeResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="sayHiRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHiResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="greetMeOneWay">
<soap:operation style="document"/>
<wsdl:input name="greetMeOneWayRequest">
<soap:body use="literal"/>
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="JMSGreeterService">
<wsdl:port binding="tns:JMSGreeterPortBinding"
name="GreeterPort2">
<jms:address
destinationStyle="queue"
jndiConnectionFactoryName="ConnectionFactory"
jndiDestinationName="dynamicQueues/test.cxf.jmstransport.queue">
<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>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
4. Then I run the client, the error occur like I show in the pervious mail.
public final class Client {
private Client() {
}
public static void main(String[] args) throws Exception {
if (args.length == 0) {
System.out.println("please specify wsdl");
System.exit(1);
}
if (args.length == 1) {
System.out.println("please specify url");
System.exit(1);
}
if (args.length == 2) {
System.out.println("please specify Service Name");
System.exit(1);
}
if (args.length == 3) {
System.out.println("please specify Port Name");
System.exit(1);
}
final QName SERVICE_NAME =
new QName(args[1], args[2]);
final QName PORT_NAME =
new QName(args[1], args[3]);
File wsdl = new File(args[0]);
JMSGreeterService service = new JMSGreeterService(wsdl.toURL(),
SERVICE_NAME);
JMSGreeterPortType greeter =
(JMSGreeterPortType)service.getPort(PORT_NAME, JMSGreeterPortType.class);
System.out.println("Invoking sayHi...");
System.out.println("server responded with: " + greeter.sayHi());
System.out.println();
System.out.println("Invoking greetMe...");
System.out.println("server responded with: " +
greeter.greetMe(System.getProperty("user.name")));
System.out.println();
System.out.println("Invoking greetMeOneWay...");
greeter.greetMeOneWay(System.getProperty("user.name"));
System.out.println("No response from server as method is OneWay");
System.out.println();
System.exit(0);
}
}
Thanks & best regards
Jackey
2008/4/25 Freeman Fang <[EMAIL PROTECTED]>:
> Hi Jackey,
>
> How you run the tests in smx? Using maven?
> And just append your configuration.
>
> Regards
>
> Freeman
>
> Jackey Ding wrote:
> > hi,
> >
> > I just run some cxf-bc tests in smx. All the cases are run ok, but I
> found
> > some error message show in the smx console. Is something wrong with my
> > configurations?
> >
> > 2008-4-25 13:06:12 org.apache.cxf.transport.jms.JMSConduit receive
> > 严重: JMSClientTransport.receive() timed out. No message available.
> > ERROR - CxfBcComponent - Error processing exchange
> InOnly[
> > id: ID:192.168.1.8-11983ed72fd-4:3
> > status: Active
> > role: provider
> > service:
> > {http://cxf.apache.org/jms_greeter}JMSGreeterService<http://cxf.apache.org/jms_greeter%7DJMSGreeterService>
> > endpoint: GreeterPort
> > operation:
> > {http://cxf.apache.org/jms_greeter}greetMeOneWay<http://cxf.apache.org/jms_greeter%7DgreetMeOneWay>
> > in: <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:jbi="
> > http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmlns:msg="
> > http://cxf.apache.org/j
> > ms_greeter" name="greetMeOneWayRequest" type="msg:greetMeOneWayRequest"
> > version="1.0"><jbi:part><greetMeOneWay xmlns="
> > http://cxf.apache.org/jms_greete
> >
> r/types"><requestType>Administrator</requestType></greetMeOneWay></jbi:part></jbi:message>
> > ]
> > java.io.IOException: javax.jms.JMSException: JMSClientTransport.receive()
> > timed out. No message available.
> > at
> >
> org.apache.cxf.transport.jms.JMSConduit$JMSOutputStream.handleResponse(JMSConduit.java:369)
> > at
> >
> org.apache.cxf.transport.jms.JMSConduit$JMSOutputStream.doClose(JMSConduit.java:258)
> > at
> > org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:156)
> > at
> > org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:200)
> > at
> >
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
> > at
> >
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
> > at
> >
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
> > at
> >
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
> > at
> >
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
> > at
> >
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
> > at
> >
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> > at java.lang.Thread.run(Thread.java:595)
> >
> > Thanks & best regards
> > Jackey
> >
>
>