I gave it another try. But I could not get any further this time. I've still got the following client, where stub.echoString() expects an EchoStringParam, which I don't have...

package org;

import org.apache.axis2.userguide.*;
import org.apache.axis2.userguide.xsd.EchoStringParamDocument;
import org.apache.axis2.userguide.xsd.EchoStringReturnDocument;

public class Client {
public static void main(String[] args) {
try {
Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub(
null,
"http://localhost:8080/axis2/services/Axis2SampleDocLitService";);

EchoStringParamDocument reqDoc = EchoStringParamDocument.Factory
.newInstance();

reqDoc.setEchoStringParam("Axis2 Echo");
EchoStringReturnDocument resDoc = stub.echoString(reqDoc);
System.out.println(resDoc.getEchoStringReturn());
} catch (Exception e) {
e.printStackTrace();
}
}
}

I would very much appreciate some help!
Marcel



At 22:21 03.08.2006 +0530, you wrote:
Thanks Marcel for the inputs. As I am new to this Axis, so would not be able to comment.

I would really appreciate if anyone give us the right direction to resolve this problem.

Thanks,
Deepak

On 8/3/06, Marcel Frehner <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]> wrote:
Hi Deepak
I've got the same problem and can't find a solution. Following up your
thread about the EchoStringParam I would suggest something like the code
below. But what ist the XMLStreamReader supposed to be? I mean, how can I
create an EchoStringParam?
Marcel


***
import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub;
import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringParam ;
import
org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringReturn;
import javax.xml.stream.XMLStreamReader;

public class Client {

public static void main(String[] args) {
try {
Axis2SampleDocLitServiceStub stub = new Axis2SampleDocLitServiceStub(
null,
"<http://localhost:8080/axis2/services/Axis2SampleDocLitPortType>http://localhost:8080/axis2/services/Axis2SampleDocLitPortType ");
XMLStreamReader r=null; //of course this must not be null!!!
EchoStringParam p=EchoStringParam.Factory.parse(r);
p.setEchoStringParam("Axis2 Echo");
EchoStringReturn resDoc = stub.echoString (p);
System.out.println(resDoc.getEchoStringReturn());
} catch (Exception e) {
e.printStackTrace();
}
}
}
***



At 17:53 03.08.2006 +0530, you wrote:
>Hi Guys,
>
>This question has already been asked in the forum and I suppose I am the
>third person to ask this question. But no response has come so far to
>rectify this problem. Following is the problem:
>
>I am facing some problem creating client for the example mentioned in the
>user guide.
><<http://ws.apache.org/axis2/1_0/userguide3.html>http://ws.apache.org/axi s2/1_0/userguide3.html> http://ws.apache.org/axis2/1_0/userguide3.html#Writing_Web_Service_Clients_using_Code_Generation_with_Data_Binding_Support
>
>
>WSDL2Java is not generating "Axis2SampleDocLitPortTypeStub.java" instead
>it is generating "Axis2SampleDocLitServiceStub.java" and it's Callback Handler.
>
>Following is the client which I have written but it is not getting
>compiled as echoString method expects EchoStringParam not
>EchoStringParamDocument.
>
>
>
>EchoStringReturnDocument resDoc = stub.echoString(reqDoc);
>
>
>
>public
>class Client {
>
>public static void main(String[] args) {
>
>try {
>
>Axis2SampleDocLitServiceStub
>stub = new Axis2SampleDocLitServiceStub(
>
>null,
>
>"< http://localhost:8080/axis2/services/Axis2SampleDocLitPortType>http://localhost:8080/axis2/services/Axis2SampleDocLitPortType";
>);
>
>EchoStringParamDocument
>reqDoc = EchoStringParamDocument.Factory
>
>.newInstance();
>
>reqDoc.setEchoStringParam(
>"Axis2 Echo");
>
>EchoStringReturnDocument
>resDoc = stub.echoString(reqDoc);
>
>System.
>out.println(resDoc.getEchoStringReturn());
>
>}
>catch (Exception e) {
>
>e.printStackTrace();
>
>}
>
>}
>Looking forward for your response.
>
>Thanks,
>Deepak




--
dipl. geogr. Marcel Frehner
Wissenschaftlicher Mitarbeiter
Eidgenössische Forschungsanstalt für Wald, Schnee und Landschaft WSL
Abteilung Landschaftsinventuren
Zürcherstrasse 111
8903 Birmensdorf

Tel. +41-44-739 26 83
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
http://www.wsl.ch

----------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED] For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]




--

                    \\\\\|/////
                      | ~ ~ |
                     (- 0 0 -)
#------------------oOOo--(_)--oOOo---------------------------#

   It's better to burn out, than to fade away.
                              Oooo.
#------------------.oooO-----(    )------------------------------#
                   (    )       )  /
                       \




--
dipl. geogr. Marcel Frehner
Wissenschaftlicher Mitarbeiter
Eidgenössische Forschungsanstalt für Wald, Schnee und Landschaft WSL
Abteilung Landschaftsinventuren
Zürcherstrasse 111
8903 Birmensdorf

Tel. +41-44-739 26 83
[EMAIL PROTECTED]
http://www.wsl.ch

----------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to