You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by giribabu venugopal <gi...@gmail.com> on 2005/11/15 11:29:24 UTC

CAN'T GET REPLY FOR INTEGER VALUE for my SERVICE METHOD

my
  service method is returning int value.
i deployed .wsdd file perfectly
 am not gettting int value as reply
 error message is:

THE APPLICATION NUMBER 12345
THE APP CODE 04
THE REMARKS The Documents contains Business Error
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Bad types (class java.lang.String-&gt;
int)
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:pli2004cpu07208

org.xml.sax.SAXException: Bad types (class java.lang.String -> int)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
ationContext.java:1087)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLVa
lidator.java:1550)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1149)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
Context.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.awpl.DS.imwf.Client5.main(Client5.java:57)
org.xml.sax.SAXException: Bad types (class java.lang.String -> int)

Re: Connection reset. HELP!

Posted by German Sakaryan <gs...@informatik.uni-rostock.de>.
Thank you very much Tom,
it seems to be a right way to organize long-time services.

It is interesting also to know, wether AXIS client when calling a 
service  keeps a connection alive or not. I have tried without proxy - 
everything works!

I fought always that proxy is transparent.
German

Tom Oinn wrote:
> German Sakaryan wrote:
> 
>> Thank you Tom.
>>
>> Do you mean that proxy closes a connection between client and proxy 
>> when a timeout is expired?
> 
> 
> It could potentially be either but is most likely to be both. It does 
> this to prevent requests 'hanging' and consuming resources within the 
> proxy, effectively a thread leakage problem.
> 
> In general it's not advisable to hold a web service call open for longer 
> than you can avoid, you might be able to get away with it but you're 
> very much at the mercy of the somewhat unpredictable set of proxies, NAT 
> layers etc inbetween your clients and the service.
> 
> The problem then is that web services are traditionally stateles with no 
>  way of correlating several distinct communications into one logical 
> operation (i.e. create, submit, poll... get result, destroy). There are 
> various ways around this. Obviously you can implement it entirely 
> yourself, it's not too hard, or there are more complex 'standards' such 
> as WSRF (Web Service Resource Framework), LSAE (Life Sciences Analysis 
> Engine, not limited to the life sciences but less widespread) and the 
> various Globus toolkit based systems, all of which are rather complex.
> 
> It's possible you can get away with a very simple solution - we have a 
> service at the EBI (www.ebi.ac.uk) which works on the 'create, 
> manipulate, inspect, destroy' pattern by having the create method return 
> a string ID and all subsequent methods consume this ID as part of the 
> request. Internally this then uses a singleton Map to translate this ID 
> to an instance of a bean class which holds the state with the operations 
> within the service all having a 'lookup state, get state bean, do stuff' 
> form. This service, incidentally, has been running for 3 years with next 
> to no downtime based on the .jws deployment mechanism (I'm not sure I'd 
> actually suggest using this but hey, it's worked for us)
> 
> The WSDL for this service is at 
> http://www.ebi.ac.uk/collab/mygrid/service1/goviz/GoViz.jws?wsdl, I've 
> attached a generated diagrammatic view of how it would be called. In 
> this case the service is stateful because we want to be able to 
> manipulate the state explicitly but it would also work around the 
> timeouts you describe.
> 
> HTH,
> 
> Tom

-- 
Dr.-Ing. German Sakaryan

Computer Science Dept.
University of Rostock
Tel:  +49 381 498-7585
Fax:  +49 381 498-7642
E-mail: gs137@informatik.uni-rostock.de
Home: http://www.informatik.uni-rostock.de/~gs137

Re: Connection reset. HELP!

Posted by Tom Oinn <tm...@ebi.ac.uk>.
German Sakaryan wrote:
> Thank you Tom.
> 
> Do you mean that proxy closes a connection between client and proxy when 
> a timeout is expired?

It could potentially be either but is most likely to be both. It does 
this to prevent requests 'hanging' and consuming resources within the 
proxy, effectively a thread leakage problem.

In general it's not advisable to hold a web service call open for longer 
than you can avoid, you might be able to get away with it but you're 
very much at the mercy of the somewhat unpredictable set of proxies, NAT 
layers etc inbetween your clients and the service.

The problem then is that web services are traditionally stateles with no 
  way of correlating several distinct communications into one logical 
operation (i.e. create, submit, poll... get result, destroy). There are 
various ways around this. Obviously you can implement it entirely 
yourself, it's not too hard, or there are more complex 'standards' such 
as WSRF (Web Service Resource Framework), LSAE (Life Sciences Analysis 
Engine, not limited to the life sciences but less widespread) and the 
various Globus toolkit based systems, all of which are rather complex.

It's possible you can get away with a very simple solution - we have a 
service at the EBI (www.ebi.ac.uk) which works on the 'create, 
manipulate, inspect, destroy' pattern by having the create method return 
a string ID and all subsequent methods consume this ID as part of the 
request. Internally this then uses a singleton Map to translate this ID 
to an instance of a bean class which holds the state with the operations 
within the service all having a 'lookup state, get state bean, do stuff' 
form. This service, incidentally, has been running for 3 years with next 
to no downtime based on the .jws deployment mechanism (I'm not sure I'd 
actually suggest using this but hey, it's worked for us)

The WSDL for this service is at 
http://www.ebi.ac.uk/collab/mygrid/service1/goviz/GoViz.jws?wsdl, I've 
attached a generated diagrammatic view of how it would be called. In 
this case the service is stateful because we want to be able to 
manipulate the state explicitly but it would also work around the 
timeouts you describe.

HTH,

Tom

Re: Connection reset. HELP!

Posted by German Sakaryan <gs...@informatik.uni-rostock.de>.
Thank you Tom.

Do you mean that proxy closes a connection between client and proxy when 
a timeout is expired?

Or a connection between proxy and web server?

Thank you,
German

Tom Oinn wrote:
> German Sakaryan wrote:
> 
>> Hello all,
>>
>>
>> I have a problem during the invocation of my web service (axis 1.3).
>>
>> If my client communicates directly to the web service, everything is 
>> fine.
>> As soon as I use proxy and the web service needs a minute or more to 
>> proceed a task, I receive a fault notification at the client site.
> 
> 
> <stack trace snipped>
> 
>> Could somebody explains what is the possible reason.
>> Thank you.
> 
> 
> Your proxy has a timeout set to avoid hanging HTTP requests. This is 
> unfortunately unavoidable, the only way around it unless you can 
> guarantee that all clients will have full control over all potential 
> proxy chains is to rearchitect your service such that you don't have 
> long blocking calls i.e. by using some kind of stateful design with 
> polling.
> 
> Tom

-- 
Dr.-Ing. German Sakaryan

Computer Science Dept.
University of Rostock
Tel:  +49 381 498-7585
Fax:  +49 381 498-7642
E-mail: gs137@informatik.uni-rostock.de
Home: http://www.informatik.uni-rostock.de/~gs137

Re: Connection reset. HELP!

Posted by Tom Oinn <tm...@ebi.ac.uk>.
German Sakaryan wrote:
> Hello all,
> 
> 
> I have a problem during the invocation of my web service (axis 1.3).
> 
> If my client communicates directly to the web service, everything is fine.
> As soon as I use proxy and the web service needs a minute or more to 
> proceed a task, I receive a fault notification at the client site.

<stack trace snipped>

> Could somebody explains what is the possible reason.
> Thank you.

Your proxy has a timeout set to avoid hanging HTTP requests. This is 
unfortunately unavoidable, the only way around it unless you can 
guarantee that all clients will have full control over all potential 
proxy chains is to rearchitect your service such that you don't have 
long blocking calls i.e. by using some kind of stateful design with polling.

Tom

Connection reset. HELP!

Posted by German Sakaryan <gs...@informatik.uni-rostock.de>.
Hello all,


I have a problem during the invocation of my web service (axis 1.3).

If my client communicates directly to the web service, everything is fine.
As soon as I use proxy and the web service needs a minute or more to 
proceed a task, I receive a fault notification at the client site.

         java.net.SocketException: Connection reset

  JAVA'S STACK TRACE:
AxisFault
  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
  faultSubcode:
  faultString: java.net.SocketException: Connection reset
  faultActor:
  faultNode:
  faultDetail:
 
{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Connec
tion reset
         at java.net.SocketInputStream.read(Unknown Source)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at 
org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:583)
................ etc.

Could somebody explains what is the possible reason.
Thank you.

German Sakaryan