Re: Nested return types from POJO web service method -shouldn't this work?
I am having the same problem here, I tried to follow the documentation at axis2 site but I didn´t help me. Is there any old thread in this list discussing this problem? Or some other examples that show how to do this? Thanks. On Thu, Feb 28, 2008 at 7:48 PM, Kraus, David <[EMAIL PROTECTED]> wrote: > So the question is: > > > > In order to support a complex nested object as a return type, using the > POJO mechanism, is it necessary to also generate the server-side > serialization code (adb databinding)? > > > -- > > *From:* Kraus, David > *Sent:* Thursday, February 28, 2008 11:18 AM > *To:* 'axis-user@ws.apache.org' > *Subject:* Nested return types from POJO web service method -shouldn't > this work? > > > > I have defined a POJO service which has a method which returns an object > which contains fields that are nested non-simple objects. > > > > So given the *Pojo* class which implements *ReturnInfoObject*, the * > InfoObj* object being returned contains a field *nest* which is defined by > the *NestedObj* object. > > > > *public class Pojo* > > *{* > > * public InfoObj ReturnInfoObject()* > > * {* > > * …* > > * }* > > *}* > > * * > > * * > > *public class InfoObj* > > *{* > > *private java.lang.String val;* > > *private NestedObj nest;* > > *}* > > * * > > *public class NestedObj* > > *{* > > * private java.lang.String nestedVal;* > > *}* > > > > When my client calls the deployed *Pojo* service, the *val* field of * > InfoObj* shows up in the soap trace, but the *nest* field is empty, even > when it has been correctly allocated on the service side. > > > > It appears that the service side does not know how to serialize the nested > object. In the past, I have used nested objects like this fine, when > defining non-POJO services, by using wsdl2java to generate the service-side > serialization code. It was my understanding that I wouldn't have to generate > this service-side serialization code, when using the POJO approach. Was my > assumption incorrect? Am I missing something? > > > > My POJO approach was basically to compile the Pojo class and all its > supporting classes, build an aar file and place it in the Axis2 services > directory. This seems to work, except the return object's nested fields are > not being serialized by the service. > > > > Thanks, Dave > > > -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita]
Re: writing a client
I trying to use stubs but I am getting erros like "InputStream Could not be null", even for out-only methods. What this mean? PS. In the other thread I had "Read time out" using the ServiceClient approach. On Feb 19, 2008 6:40 AM, Antonio Manuel Muñiz Martín < [EMAIL PROTECTED]> wrote: > I like to use an Adapter Class that encapsulates all the creation message > logic. This adapter class is used as a simple java object, in other words, > the user of this class dont know if it is calling a web service, is calling > a database, ... methods of this Adapter Class only receive parameters of > Java native API (Integer, String, ...) no XMLBeans or ADB Objects, this > objects are used inside the Adapter Class. > > This approach provide a low coupled Client Application and Web Service > Client. > > If somebody is interesting in this approach I can create a small example > and post it here. > > Bye. > > 2008/2/15, [EMAIL PROTECTED] < > [EMAIL PROTECTED]>: > > > Hi, > > > > > > > > Indeed this is the aproach. > > > > > > > > First genereate client-stub and then create a ServiceClient which calls > > the stubmethods. > > > > > > > > See small example voor de client main. > > > > > > > > *public* *static* *void* main(String[] args) *throws*RemoteException { > > > > // *TODO* Auto-generated method stub > > > > DemoStub stub = *new* DemoStub(); > > > > DemoRequest request = *new* DemoRequest(); > > > > InputBean ib = *new* InputBean(); > > > > Structure[] ss = *new* Structure[5]; > > > > Structure str = *new* Structure(); > > > > *for* (*int* i = 0; i < 5; i++) { > > > > str.setX(100 * (i + 1)); > > > > str.setY(200 * (i + 1)); > > > > ss[i] = str; > > > > } > > > > > > > > ib.setStruct(ss); > > > > request.setInputBean(ib); > > > > > > > > DemoResponse response = stub.bepaal(request); > > > > OutputBean ob = response.getOutputBean(); > > > > > > > > } > > > > > > > > > > > > regards > > > > Dirk > > > > > > > > > > > > > > > > -Original Message- > > *From:* [EMAIL PROTECTED] [mailto: > > [EMAIL PROTECTED] > > *Sent:* vrijdag 15 februari 2008 13:12 > > *To:* axis-user@ws.apache.org > > *Subject:* writing a client > > > > > > > > Hi, > > > > > > > > Could you please let me how to go about writing a client? > > > > I mean what is the approach. > > > > > > > > 1) Generate the client-side stub using wsdltojava & call methods > > on the stub > > > > 2) Start from using ServiceClient .. > > > > > > > > What is the suggested approach? > > > > > > > > Thanks, > > > > Ajit > > > > > > > > > > > > DISCLAIMER: > > This message contains privileged and confidential information and is > > intended only for an individual named. If you are not the intended > > recipient, you should not disseminate, distribute, store, print, copy or > > deliver this message. Please notify the sender immediately by e-mail if you > > have received this e-mail by mistake and delete this e-mail from your > > system. E-mail transmission cannot be guaranteed to be secure or error-free > > as information could be intercepted, corrupted, lost, destroyed, arrive late > > or incomplete or contain viruses. The sender, therefore, does not accept > > liability for any errors or omissions in the contents of this message which > > arise as a result of e-mail transmission. If verification is required, > > please request a hard-copy version. > > > > > > The information transmitted via this e-mail is intended only for the person > > or entity to which it is addressed and may contain confidential and/or > > privileged material. Any review, retransmission, dissemination or other > > use of, or taking of any action in reliance upon this information by > > persons or entities other than the intended recipient is prohibited. If you > > received this in error, please contact the sender and delete the material > > from any computer. > > > > > -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita]
Re: AxisFault: Read Time Out
About 10 seconds. On Feb 18, 2008 2:55 PM, Michele Mazzucco <[EMAIL PROTECTED]> wrote: > How long do your requests take (on average) to execute?, I think (but > maybe I'm wrong) that those timeout are set to 30 seconds by default. > > Michele > > On 18 Feb 2008, at 17:27, Wesley Mesquita wrote: > > > I got the same, i tried huge values and nothing has worked. > > It seems to me that there is something wrong in the axis2 > > installation (or in the services deployment), but I don´t know > > where to looking for since the services appear to be working fine > > when I invoke them at a browser. > > > > Thanks for trying to help. > > > > On Feb 18, 2008 2:13 PM, Michele Mazzucco > > <[EMAIL PROTECTED]> wrote: > > Try options.setTimeoutInMilliseconds() then. > > > > Michele > > > > On 18 Feb 2008, at 16:50, Wesley Mesquita wrote: > > > > > What this function suppose to do? I tried it, but I am getting the > > > same Exception tree. > > > > > > On Feb 18, 2008 10:17 AM, Michele Mazzucco > > > <[EMAIL PROTECTED]> wrote: > > > Wesley, > > > > > > try to call options.setProperty(HTTPConstants.SO_TIMEOUT, value); > > > > > > Michele > > > > > > On 18 Feb 2008, at 13:02, Wesley Mesquita wrote: > > > > > > > Hi all, > > > > > > > > I trying to use the axis2 api to generate clients to my > > > > webservices, but I am getting in trouble. I got rid of my examples > > > > to minimize the possibilities to make mistakes. > > > > So I trying the examples in this site http://today.java.net/pub/a/ > > > > today/2006/12/13/invoking-web-services-using-apache-axis2.html , > > > > and i am getting this Exception tree: > > > > > > > > Exception in thread "main" org.apache.axis2.AxisFault: Read timed > > > out > > > > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > > > > at org.apache.axis2.transport.http.HTTPSender.sendViaPost > > > > (HTTPSender.java:195) > > > > at org.apache.axis2.transport.http.HTTPSender.send > > > > (HTTPSender.java:77) > > > > at > > > > > > > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag > > > > eWithCommons(CommonsHTTPTransportSender.java:327) > > > > at > > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke > > > > (CommonsHTTPTransportSender.java:206) > > > > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java: > > 396) > > > > at org.apache.axis2.description.OutInAxisOperationClient.send > > > > (OutInAxisOperation.java:374) > > > > at > > > > org.apache.axis2.description.OutInAxisOperationClient.executeImpl > > > > (OutInAxisOperation.java:211) > > > > at org.apache.axis2.client.OperationClient.execute > > > > (OperationClient.java:163) > > > > at org.apache.axis2.client.ServiceClient.sendReceive > > > > (ServiceClient.java:528) > > > > at org.apache.axis2.client.ServiceClient.sendReceive > > > > (ServiceClient.java:508) > > > > at sample.axisversion.Scenario1Client.main > > (Scenario1Client.java: > > > > 22) > > > > Caused by: java.net.SocketTimeoutException: Read timed out > > > > at java.net.SocketInputStream.socketRead0(Native Method) > > > > at java.net.SocketInputStream.read(Unknown Source) > > > > at java.io.BufferedInputStream.fill(Unknown Source) > > > > at java.io.BufferedInputStream.read(Unknown Source) > > > > at org.apache.commons.httpclient.HttpParser.readRawLine > > > > (HttpParser.java:77) > > > > at org.apache.commons.httpclient.HttpParser.readLine > > > > (HttpParser.java:105) > > > > at org.apache.commons.httpclient.HttpConnection.readLine > > > > (HttpConnection.java:1115) > > > > at > > > > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager > > > > $HttpConnectionAdapter.readLine > > > > (MultiThreadedHttpConnectionManager.java:1373) > > > > at org.apache.commons.httpclient.HttpMethodBase.readStatusLine > > > > (HttpMethodBase.java:1832) > > > > at org.apache.commons.httpclient.HttpMethodBase.readResponse > > > > (HttpMethodBase.java:1590) > > > > at org.apache.c
Re: AxisFault: Read Time Out
I got the same, i tried huge values and nothing has worked. It seems to me that there is something wrong in the axis2 installation (or in the services deployment), but I don´t know where to looking for since the services appear to be working fine when I invoke them at a browser. Thanks for trying to help. On Feb 18, 2008 2:13 PM, Michele Mazzucco <[EMAIL PROTECTED]> wrote: > Try options.setTimeoutInMilliseconds() then. > > Michele > > On 18 Feb 2008, at 16:50, Wesley Mesquita wrote: > > > What this function suppose to do? I tried it, but I am getting the > > same Exception tree. > > > > On Feb 18, 2008 10:17 AM, Michele Mazzucco > > <[EMAIL PROTECTED]> wrote: > > Wesley, > > > > try to call options.setProperty(HTTPConstants.SO_TIMEOUT, value); > > > > Michele > > > > On 18 Feb 2008, at 13:02, Wesley Mesquita wrote: > > > > > Hi all, > > > > > > I trying to use the axis2 api to generate clients to my > > > webservices, but I am getting in trouble. I got rid of my examples > > > to minimize the possibilities to make mistakes. > > > So I trying the examples in this site http://today.java.net/pub/a/ > > > today/2006/12/13/invoking-web-services-using-apache-axis2.html , > > > and i am getting this Exception tree: > > > > > > Exception in thread "main" org.apache.axis2.AxisFault: Read timed > > out > > > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > > > at org.apache.axis2.transport.http.HTTPSender.sendViaPost > > > (HTTPSender.java:195) > > > at org.apache.axis2.transport.http.HTTPSender.send > > > (HTTPSender.java:77) > > > at > > > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag > > > eWithCommons(CommonsHTTPTransportSender.java:327) > > > at > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke > > > (CommonsHTTPTransportSender.java:206) > > > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) > > > at org.apache.axis2.description.OutInAxisOperationClient.send > > > (OutInAxisOperation.java:374) > > > at > > > org.apache.axis2.description.OutInAxisOperationClient.executeImpl > > > (OutInAxisOperation.java:211) > > > at org.apache.axis2.client.OperationClient.execute > > > (OperationClient.java:163) > > > at org.apache.axis2.client.ServiceClient.sendReceive > > > (ServiceClient.java:528) > > > at org.apache.axis2.client.ServiceClient.sendReceive > > > (ServiceClient.java:508) > > > at sample.axisversion.Scenario1Client.main(Scenario1Client.java: > > > 22) > > > Caused by: java.net.SocketTimeoutException: Read timed out > > > at java.net.SocketInputStream.socketRead0(Native Method) > > > at java.net.SocketInputStream.read(Unknown Source) > > > at java.io.BufferedInputStream.fill(Unknown Source) > > > at java.io.BufferedInputStream.read(Unknown Source) > > > at org.apache.commons.httpclient.HttpParser.readRawLine > > > (HttpParser.java:77) > > > at org.apache.commons.httpclient.HttpParser.readLine > > > (HttpParser.java:105) > > > at org.apache.commons.httpclient.HttpConnection.readLine > > > (HttpConnection.java:1115) > > > at > > > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager > > > $HttpConnectionAdapter.readLine > > > (MultiThreadedHttpConnectionManager.java:1373) > > > at org.apache.commons.httpclient.HttpMethodBase.readStatusLine > > > (HttpMethodBase.java:1832) > > > at org.apache.commons.httpclient.HttpMethodBase.readResponse > > > (HttpMethodBase.java:1590) > > > at org.apache.commons.httpclient.HttpMethodBase.execute > > > (HttpMethodBase.java:995) > > > at > > > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry > > > (HttpMethodDirector.java:397) > > > at > > > org.apache.commons.httpclient.HttpMethodDirector.executeMethod > > > (HttpMethodDirector.java:170) > > > at org.apache.commons.httpclient.HttpClient.executeMethod > > > (HttpClient.java:396) > > > at org.apache.commons.httpclient.HttpClient.executeMethod > > > (HttpClient.java:346) > > > at > > > org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod > > > (AbstractHTTPSender.java:520) > > >
Re: AxisFault: Read Time Out
What this function suppose to do? I tried it, but I am getting the same Exception tree. On Feb 18, 2008 10:17 AM, Michele Mazzucco <[EMAIL PROTECTED]> wrote: > Wesley, > > try to call options.setProperty(HTTPConstants.SO_TIMEOUT, value); > > Michele > > On 18 Feb 2008, at 13:02, Wesley Mesquita wrote: > > > Hi all, > > > > I trying to use the axis2 api to generate clients to my > > webservices, but I am getting in trouble. I got rid of my examples > > to minimize the possibilities to make mistakes. > > So I trying the examples in this site http://today.java.net/pub/a/ > > today/2006/12/13/invoking-web-services-using-apache-axis2.html , > > and i am getting this Exception tree: > > > > Exception in thread "main" org.apache.axis2.AxisFault: Read timed out > > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > > at org.apache.axis2.transport.http.HTTPSender.sendViaPost > > (HTTPSender.java:195) > > at org.apache.axis2.transport.http.HTTPSender.send > > (HTTPSender.java:77) > > at > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag > > eWithCommons(CommonsHTTPTransportSender.java:327) > > at > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke > > (CommonsHTTPTransportSender.java:206) > > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) > > at org.apache.axis2.description.OutInAxisOperationClient.send > > (OutInAxisOperation.java:374) > > at > > org.apache.axis2.description.OutInAxisOperationClient.executeImpl > > (OutInAxisOperation.java:211) > > at org.apache.axis2.client.OperationClient.execute > > (OperationClient.java:163) > > at org.apache.axis2.client.ServiceClient.sendReceive > > (ServiceClient.java:528) > > at org.apache.axis2.client.ServiceClient.sendReceive > > (ServiceClient.java:508) > > at sample.axisversion.Scenario1Client.main(Scenario1Client.java: > > 22) > > Caused by: java.net.SocketTimeoutException: Read timed out > > at java.net.SocketInputStream.socketRead0(Native Method) > > at java.net.SocketInputStream.read(Unknown Source) > > at java.io.BufferedInputStream.fill(Unknown Source) > > at java.io.BufferedInputStream.read(Unknown Source) > > at org.apache.commons.httpclient.HttpParser.readRawLine > > (HttpParser.java:77) > > at org.apache.commons.httpclient.HttpParser.readLine > > (HttpParser.java:105) > > at org.apache.commons.httpclient.HttpConnection.readLine > > (HttpConnection.java:1115) > > at > > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager > > $HttpConnectionAdapter.readLine > > (MultiThreadedHttpConnectionManager.java:1373) > > at org.apache.commons.httpclient.HttpMethodBase.readStatusLine > > (HttpMethodBase.java:1832) > > at org.apache.commons.httpclient.HttpMethodBase.readResponse > > (HttpMethodBase.java:1590) > > at org.apache.commons.httpclient.HttpMethodBase.execute > > (HttpMethodBase.java:995) > > at > > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry > > (HttpMethodDirector.java:397) > > at > > org.apache.commons.httpclient.HttpMethodDirector.executeMethod > > (HttpMethodDirector.java:170) > > at org.apache.commons.httpclient.HttpClient.executeMethod > > (HttpClient.java:396) > > at org.apache.commons.httpclient.HttpClient.executeMethod > > (HttpClient.java:346) > > at > > org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod > > (AbstractHTTPSender.java:520) > > at org.apache.axis2.transport.http.HTTPSender.sendViaPost > > (HTTPSender.java:191) > > ... 10 more > > > > I tested the service in a browser and it appears to be working fine. > > I tried to execute the service in Tomcat 5.5 and using directly > > axis2server (Axis2 1.3). Anyone has any ideia, what is happening here? > > > > Thanks in advance, > > > > Wesley. > > > > -- > > Wesley Mesquita > > LIS/IC - UNICAMP > > [skype: wesley.mesquita] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita]
AxisFault: Read Time Out
Hi all, I trying to use the axis2 api to generate clients to my webservices, but I am getting in trouble. I got rid of my examples to minimize the possibilities to make mistakes. So I trying the examples in this site http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html, and i am getting this Exception tree: Exception in thread "main" org.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost( HTTPSender.java:195) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons (CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke( CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java :163) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java :528) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java :508) at sample.axisversion.Scenario1Client.main(Scenario1Client.java:22) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java :77) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java :105) at org.apache.commons.httpclient.HttpConnection.readLine( HttpConnection.java:1115) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine (MultiThreadedHttpConnectionManager.java:1373) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine( HttpMethodBase.java:1832) at org.apache.commons.httpclient.HttpMethodBase.readResponse( HttpMethodBase.java:1590) at org.apache.commons.httpclient.HttpMethodBase.execute( HttpMethodBase.java:995) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry( HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod( HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod( HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod( HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod( AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost( HTTPSender.java:191) ... 10 more I tested the service in a browser and it appears to be working fine. I tried to execute the service in Tomcat 5.5 and using directly axis2server (Axis2 1.3). Anyone has any ideia, what is happening here? Thanks in advance, Wesley. -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita]
Getting read time out in AxisFault
Hi there, I am trying to generate test clients. So I deployed a simple service at Axis2 (which is working if I test it from a browser), bur I tried a lot of manners to build a client, from scratch using AXIOM to simple adb stubs, but I getting read time out every time. I am using Tomcat 5.5, Axis2 1.3, Eclipse IDE at Windows XP. Anyone has any idea of what it shoud be? Thanks. -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita]