axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <donnerdrummel2000-mail...@yahoo.de>
Subject AW: [axis2] no xml content is send using fireAndForget()
Date Tue, 04 Jul 2006 07:10:17 GMT
Sorry that I have to say that, but your suggestion doesn't solve my problem. Even if I set
the Thread to sleep for much more than the 100ms, the problem still exists: setting the WSA-RelatesTo,
makes the fireAndForget not to send the SOAP-Envelope; using the same scenario without setting
WSA-RelatesTo it works fine and not Thread.sleep() is recommand at all.

Are there other side effects I have to check for this?


Thanks Ted

----- Urspr√ľngliche Mail ----
Von: Deepal Jayasinghe <deepal@opensource.lk>
An: axis-user@ws.apache.org
Gesendet: Dienstag, den 4. Juli 2006, 06:43:36 Uhr
Betreff: Re: [axis2] no xml content is send using fireAndForget()

Hi Donnerummel;

donnerdrummel2000-mailing@yahoo.de wrote:

>Hi,
>
>I'm trying to solve the following szenario:
>
>Service A --> InOnly-Operation
>ServiceB --> InOnlyOperation
>
>
>Whant I'm try to do is to call Service A wich has to answer the request by sending his
response to Service B (specified as WSA-ReplyTo).
>
>Therefore I try to implement some client-side communication at Service A to send the response
to Service B in that way:
>
>        Options op = new Options();
>        //replyTo contains the WSA-ReplyTo
>        op.setTo(replyTo);
>
>        op.setRelationships(new RelatesTo[] {new RelatesTo(msgId)});
>
>        op.setExceptionToBeThrownOnSOAPFault(true);
>        op.setAction("http://www.example.org/SomeOperation";);
>        
>        ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
>        ServiceClient client = new ServiceClient();
>        client.setOptions(op);
>        client.engageModule(new QName(Constants.MODULE_ADDRESSING));
>        OMElement responseElem = responseDoc.toOM(OMAbstractFactory.getOMFactory());
>        client.fireAndForget(responseElem);
>  
>
hmmm , the problem is fireAndForget invocation happen in a new thread ,
so once your mail thred go out of the scope that thread will terminate
as well.
So to solve what I did was call Thread.sleep()  (o.w it will not send
the req); 

   client.fireAndForget(responseElem);
   Thread.sleep(100);

>The result of that is, that only HTTP-Headers were send to Service B an no SOAP-Envelope
element:
>
>        POST /axis2/services/MyService HTTP/1.1
>        User-Agent: Axis/2.0
>        SOAPAction: http://www.example.org/SomeOperation
>        Host: 127.0.0.1:9002
>        Transfer-Encoding: chunked
>        Content-Type: text/xml; charset=UTF-8
>
>One thing I noticed is, if I remove the setting of the relatesTo-Header, the soap-content
is send properly (but I need this information at Service B so it it not a solution for me).
>
>Is there something I did wrong in this case or are there any known bugs, using the fireAndForget()-method
of ServiceClient?
>
>Thanks Ted.
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message