I have the same problem with Tomcat 5.5 and have two questions:
1) Why does my client HTTP server is immediately closed and i get I/O exception when server tries to post the response?
2) Why does it print "waiting" when options.setUseSeparateListener() is passed false? (This is Antony Wilson's question actually)
Thanks a lot.
Ali Sadik Kumlali
------------------------------------------------------------------------
FIRST CASE
+ Original EchoNonBlockingDualClient.java
+ System.out.println("waiting..."); in while loop
------------------------------------------------------------------------
Client Log
-----------
testEchoNonBlockingDualClient:
[java] - Deploying module : addressing
[java] - Starting to process SOAP 1.1 message
[java] <?xml version='1.0' encoding='utf-8'?><soapenv:E nvelope xmlns:soapen
v="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.
org/ws/2004/08/addressing"><soapenv:Header><wsa:To xmlns:wsa="http://schemas.xml
soap.org/ws/2004/08/addressing">http://10.10.10.103:6060/axis2/services/__ANONYM
OUS_SERVICE__/__OPERATION_OUT_IN__</wsa:To><wsa:ReplyTo xmlns:wsa="http://schema
s.xmlsoap.org/ws/2004/08/addressing"><wsa:Address>http://schemas.xmlsoap.org/ws/
2004/08/addressing/role/anonymous</wsa:Address></wsa:ReplyTo><wsa:From xmlns:wsa
="http://schemas.xmlsoap.org/ws/2004/08/addressing"><wsa:Address>http://127.0.0.
1:8080/axis2/services/MyService</wsa:Address></wsa:From><wsa:MessageID xmlns:wsa
="http://schemas.xmlsoap.org/ws/2004/08/addressing">D3C49495E884E3019B1142337591
1122</wsa:MessageID><wsa:RelatesTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004
/08/addressing" wsa:RelationshipType="wsa:Reply">975BF946D7CFA918C61142337583721
1</wsa:RelatesTo></soapenv:Header><soapenv:Body><example1:echo xmlns:example1="h
ttp://example1.org/example1"><example1:Text>Axis2 Echo String </example1:Text></
example1:echo></soapenv:Body></soapenv:Envelope>
[java] [SimpleHTTPServer] Stop called
Server Log
----------
- Deploying module : addressing
- Deploying module : security
- Starting to process SOAP 1.1 message
- I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught
when processing request: The server 10.10.10.103 failed to respond
- Retrying request
------------------------------------------------------------------------
SECOND CASE:
+ Original EchoNonBlockingDualClient.java
+ System.out.println("waiting..."); in while loop
&nbs p; + options.setUseSeparateListener(false);
------------------------------------------------------------------------
Client Log
-----------
testEchoNonBlockingDualClient:
[java] - Deploying module : addressing
[java] waiting...
[java] - Starting to process SOAP 1.1 message
[java] <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapen
v="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.
org/ws/2004/08/addressing"><soapenv:Header><wsa:To xmlns:wsa="http://schemas.xml
soap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing
/role/anonymous</wsa:To><wsa:ReplyTo xmlns:wsa="http://schemas.xmlsoap.org/ws/20
04/08/addressing"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/
role/anonymous</wsa:Address></wsa:ReplyTo><wsa:From xmlns:wsa="http://schemas.xm
lsoap.org/ws/2004/08/addressing"><wsa:Address>http://127.0.0.1:8080/axis2/servic
es/MyService</wsa:Address></wsa:From><wsa:MessageID xmlns:wsa="http://schemas.xm
lsoap.org/ws/2004/08/addressing">D3C49495E884E3019B11423376489274</wsa:MessageID
><wsa:RelatesTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" wsa
:RelationshipType="wsa:Reply">6439FE16DCA2252A8E11423376486611</wsa:RelatesTo></
soapenv:Header><soapenv:Body><example1:echo xmlns:example1="http://example1.org/
example1"><example1:Text>Axis2 Echo String </example1:Text></example1:echo></soa
penv:Body></soapenv:Envelope>
Server Log
----------
- De ploying module : addressing
- Deploying module : security
- Starting to process SOAP 1.1 message
robert lazarski <[EMAIL PROTECTED]> wrote:
Could you start another thread with an axis2 prefix mentioning jboss ? I know jboss with web services ok, but it was with either axis 1 or jwsdp - not axis2 . Are you using wsdl and ejb ?
Robert
http://www.braziloutsource.com/On 3/13/06, Brian Shields < [EMAIL PROTECTED]> wrote:Tony,
Apologies for jumping into this thread on an unr elated issue but i
notice you have axis2 deployed on JBoss 4.0. I am about to undertake
this task and was wondering if there was any resources on the web to
help in it. I dont have a lot of experience with JBoss so not looking
forward to it!!
Regards,
Brian
Antony Wilson wrote:
>
> I have not been able to get the EchonNonBlockingDualClient example to
> work as described in the documentation. In my setup, I have Axis2
> deployed to JBoss 4.0.3 and I have modified the
> userguide.example1.MyService to delay for about 10 seconds before
> responding (leaving the 'echo' method). After packaging and deploying
> the MyService.aar to Axis2, I run EchoNonBlockingDualClient
> example...slightly modified to add a print statement within the while
> loop...like so
>
> public static void main(String[] args) {
> try {
> OMElement payload = ClientUtil.getEchoOMElement();
>
> Options options = new Options();
> options.setTo(targetEPR);
> options.setTransportInProtocol (Constants.TRANSPORT_HTTP);
> options.setUseSeparateListener(true);
>
> //Callback to handle the response
> Callback callback = new Callback() {
> public void onComplete(AsyncResult result) {
> try {
> StringWriter writer = new StringWriter();
>
> result.getResponseEnvelope().serialize(XMLOutputFactory.newInstance()
> .createXMLStreamWriter(writer));
> writer.flush ();
> System.out.println(writer.toString());
>
>
> } catch (XMLStreamException e) {
> onError(e);
> }
> }
>
> public void onError(Exception e) {
> e.printStackTrace();
> }
> };
>
> //Non-Blocking Invocation
> ServiceClient sender = new ServiceClient();
> sender.setOptions(options);
> sender.sendReceiveNonblocking(payload, callback);
>
> //Wait till the callback receives the response.
> while (!callback.isComplete()) {
> System.out.println("waiting...");
> Thread.sleep(1000);
> }
> //Need to close the Client Side Listener.
>
> We I run it the code appears to block/wait at the
> "sender.sendRecieveNonBlocking(...)" line for about 10 seconds. When
> the program continues, I never see any print statements since the
> "callback.isComplete()" is true by the time it gets to that point in
> the code. The really bizarre part is that if I use
> "options.setUseSeparateListener(false)"...the behavior is exactly what
> I was originally expecting...I see several "waiting..." print
> statements before the callback's onComplete is invoked. My
> operational scenario requires a dual channel transport since my
> webservice calls can be really long...therefore using a single two-way
> transport (e.g., options.setUseSeparateListener(false)) is not a
> viable option.
>
> Bottomline, I can't seem to get the two-way dual channel stuff
> (EchoNonBlockingDualClient) to work for me. I must be missing
> something obvious...but I don't see what it is. Any help would be
> appreciated.
>
> Thanks,
> Tony
>
>
--
Brian Shields BSc. MSc.,
PhD Candidate,
Department of Information Technology,
National University of Ireland,
Galway,
Ireland.
< p>
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.