File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Axis invoke() freezes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis invoke() freezes" Watch "Axis invoke() freezes" New topic
Author

Axis invoke() freezes

stefan bungert
Greenhorn

Joined: Oct 29, 2005
Posts: 5
Hi all!

I have problems invoking a Web Service with AXIS.
When I call a web service which is on localhost, the process freezes when invoke() is called.
SOAPEnvelope response = createCall(serverURI).invoke(request);

After trying a few times I opened TCP Monitor to check communication. The whole traffic is very well, I see the request which seems correct. I see the response coming in, which is also correct.
Then I clicked on the remove Button on TCP Monitor which then caused my program to continue!
I don't know what that means, but maybe you have expreienced the same.
I will paste the soap message request and response, as I said, the program only continues when I press the "remove selected" or "remove all" button in the Axis TCP Monitor. The program can also handle the response well.

By the way, I have another tool to invoke the same request, which works (without clicking that button)
I have not acivated any proxy or delay in TCP Monitor

any help would be great!
thanks in advance
Stefan B.


-----------------------------------------------------------
Request:
POST /opcxmlda/wago.opcserver.modbustcp.da.1 HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.3
Host: 127.0.0.1:8071
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://opcfoundation.org/webservices/XMLDA/1.0/Read"
Content-Length: 581

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmlda="http://opcfoundation.org/webservices/XMLDA/1.0/">
<soapenv:Body>
<soapenv:Read>
<soapenv ptions ReturnItemTime="true" ReturnItemName="true" ClientRequestHandle="" LocaleID="en-us"/>
<soapenv:ItemList MaxAge="1000">
<soapenv:Items ItemPath="" ItemName="i-for-T/Peak_Max" ClientItemHandle=""/>
</soapenv:ItemList>
</soapenv:Read>
</soapenv:Body>
</soapenv:Envelope>

------------------------------------------------------------------------------
RESPONSE:

HTTP/1.1 200 OK
Server: dOPC XGate 2.06
Content-Type: text/xml; charset="utf-8"
Content-Length: 636
Connection: keep-alive

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ReadResponse xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/">
<ReadResult RcvTime="2006-02-22T19:41:36.078+01:00" ReplyTime="2006-02-22T19:41:36.093+01:00" RevisedLocaleID="en" ServerState="running"/>
<RItemList>
<Items ItemName="i-for-T/Peak_Max" Timestamp="2006-02-22T19:41:36.093+01:00">
<Value xsi:type="xsd:unsignedShort">85</Value>
<Quality/>
</Items>
</RItemList>
</ReadResponse>
</soap:Body>
</soap:Envelope>
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
Is it possible that the service is not closing the output stream, thus the client is waiting for more data?
Bill
stefan bungert
Greenhorn

Joined: Oct 29, 2005
Posts: 5
Yes it is possible, but..


I succesfully sent a message directly to the webserver over a socket. I took a request message from the tcpmonitor and pasted it into the webserver stream.

Then the request came back on the stream which I could print on the console.

that means the server works fine, the axis somehow has problems reading the response stream...

what else can i do?

regards
Stefan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis invoke() freezes