Agreed. I think from reading your post below that your issue is that you are setting the "anonymous endpoint" address to something different than the service name. You appear to be properly addressing the service earlier on though.

I mentioned the other problems with the JMSTranport/Channel classes because, once you get past this issue, you will probably run into those issues as well. For example, if you try clustering your JMS service your responses will be consumed by the other instances of the service provider (which will then cause a fault--which may be consumed by another one of the provider instances and not the client, and so on) and not by the client:

http://jira.codehaus.org/browse/XFIRE-865

The only way to have this work effectively at the moment is to have a single, single-threaded listener (obviously not production grade).

I'm working on a project release right now for my "day job", hopefully I'll be able to post my fixes once that is complete.

I also wrote a small Spring MessageListenerContainer that delivers the messages into the xfire stack so that you can use Spring's MLC to handle a thread pooled listener.

sw

Willard, Keith wrote:
Thanks for the reply.

If I make the outbound destination named anything other than
"jms://BookstoreService" (ie  "BookstoreService" is the name of the
service as it appears in the server's spring service file), then the
service fails to be found and invoked.

I do want it make it clear that I am successfully invoking the remote
service and getting back what appears to me to be roughly correct xml.
The existing JMSTransport onMessage method receives the response message
and then calls receive on the base AbstractChannel class. It then leaves
the transport layer entirely goes into the various handler phases of the
client processing of the returned result before it blows up.
So I think whatever is going wrong has nothing to do with the
JMSTransport class itself but instead some kind of configuration
control.

--Keith
-----Original Message-----
From: Sam Wilson [mailto:[EMAIL PROTECTED] Sent: Friday, March 30, 2007 2:39 PM
To: [email protected]
Subject: Re: [xfire-user] FW: problems with using JMSTransport and JAXB

I'm not sure, but I think you need to change this:

.setEndpointUri("jms://bookstoreResponse");


to this:

.setEndpointUri("jms://BookstoreService");


sw

ps. I've had lots of problems with the JMS implementation (to the point that I question whether anyone has ever used the code from the distribution in a real production system). I ended up having to write my

own replacements for the Transport and Channel in order to make it work.


Willard, Keith wrote:
Apologies for accidentally sending this to the dev list:-)

This may be similar problem that of http://www.mail-archive.com/[email protected]/msg02212.html

I am using XFire 1.2.4 release

1) I have service that was created by starting with WSDL and used the wsgen tool defaulting to the JAXB bindings

2) The default generated client works properly against the implemented

service running over http

3) Following the echo example for running the client over JMSTransport

does result in the service being invoked and apparently identical xml coming back to the proxy and being successfully delivered through the client's JMSTransports onMessage() method

4) But then during the handling of the response in the handler pipeline a _org.codehaus.xfire.XFireRuntimeException_: Could not invoke service.. exception is thrown.

I have included a fragment of the debug log and the stack trace, the client setup code, the service interface definition fragment, and a fragment of the returned soap message.

Does anyone have any suggestions as to what I am doing incorrectly or further analysis steps I can take?

Thanks,

--Keith Willard

============debug log fragement========================

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.client.Client - Correlating context with ID 11751922475170-1326264516

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.client.Client - Found correlated context with ID 11751922475170-1326264516

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler [EMAIL PROTECTED] to phase service

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase dispatch

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase policy

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase user

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.client.ClientFaultConverter in phase user

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase pre-invoke

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase service

1250 [ActiveMQ Session Task] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.client.ClientReceiveHandler in phase service

Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Index: 0, Size: 0

_org.codehaus.xfire.XFireRuntimeException_: Could not invoke service..

Nested exception is org.codehaus.xfire.fault.XFireFault: Index: 0,
Size: 0
org.codehaus.xfire.fault.XFireFault: Index: 0, Size: 0

at
org.codehaus.xfire.fault.XFireFault.createFault(_XFireFault.java:89_)
at org.codehaus.xfire.client.Client.onReceive(_Client.java:386_)

at
org.codehaus.xfire.transport.AbstractChannel.receive(_AbstractChannel.ja
va:38_)
=======================This is what the client setup code looks like============

ObjectServiceFactory sf = *new* org.codehaus.xfire.jaxb2.JaxbServiceFactory(

getTransportManager());

sf.addSoap11Transport(JMSTransport./BINDING_ID/);

// Create the service model

Service serviceModel = sf.create(BookstoreService.*class*);

// Create a proxy for the service

XFireProxyFactory factory = *new* XFireProxyFactory(getXFire());

BookstoreService proxy = (BookstoreService) factory.create(serviceModel, "jms://BookstoreService");

// Since JMS doesn't really have a concept of anonymous endpoints, we
need
// need to let xfire know what JMS endpoint we should use

((XFireProxy) Proxy./getInvocationHandler/(proxy)).getClient()

.setEndpointUri("jms://bookstoreResponse");

ArrayOfBook1 books=proxy.getTopSellers();

=======service interface definition fragment==============================================

@WebMethod(operationName = "getTopSellers", action = "urn:Bookstore/BookstoreService/getTopSellers")

@WebResult(name = "getTopSellersResult", targetNamespace = "urn:Bookstore")

*public* ArrayOfBook1 getTopSellers();

===== fragment of xml response===========================

<soap:Body>

<getTopSellersResponse xmlns="urn:Bookstore">

<getTopSellersResult>

<Book>

<authors>

..rest of the message


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to