Hi Donnerummel;
[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
--
Thanks,
Deepal
................................................................
~Future is Open~
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]