Ajith and Robert, thanks,
-d xmlbean did work. the compile was successful, but when I run the
echoStringclient.class, my window's cmd didn't
get the response "Axis2 Echo", instead the following information. But my
SOAPMonitor showed successfully both
request and response message. Any idea what's wrong ?
run:
[java] log4j:WARN No appenders could be found for logger
(org.apache.axiom.om.impl.builder.StAXOMBuilder).
[java] log4j:WARN Please initialize the log4j system properly.
[java] java.lang.RuntimeException: Data binding error
[java] at
org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.fromOM(Axis2SampleDocLitServiceStub.java:877)
[java] at
org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:500)
[java] at echoStringClient.main(echoStringClient.java:59)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at org.apache.tools.ant.Target.execute(Target.java:341)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[java] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[java] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[java] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068 )
[java] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[java] Caused by: java.lang.NullPointerException
[java] at
org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.fromOM(Axis2SampleDocLitServiceStub.java:823)
[java] ... 23 more
Jenny
[EMAIL PROTECTED]
2006-05-30
======= 2006-05-30 02:06:57 you wrote:=======
>If my understanding of the situation is correct
>The user has a provider of type 'Msg' and is unable to generate the required
>Stubs with WSDL2Java
>Could you elaborate on your response that -d xmlbeans will solve this?
>Thanks,
>Martin -
>*********************************************************************
>This email message and any files transmitted with it contain confidential
>information intended only for the person(s) to whom this email message is
>addressed. If you have received this email message in error, please notify
>the sender immediately by telephone or email and destroy the original
>message without making a copy. Thank you.
>
>
>
>----- Original Message -----
>From: "Ajith Ranabahu" <[EMAIL PROTECTED]>
>To: <[email protected]>; <[EMAIL PROTECTED]>
>Sent: Monday, May 29, 2006 10:30 AM
>Subject: Re: Re: [Axis2] Pls help ----> about using stub to writing
>echoStringclient.
>
>
>> Hi Jenny,
>> Seems you've mixed up the databinding frameworks. try codegenerating
>> with -d xmlbeans flag
>>
>> Ajith
>>
>> On 5/29/06, Jenny ZHANG <[EMAIL PROTECTED]> wrote:
>>> hey Martin,
>>>
>>> What do you mean by 1.0? I am using Axis2 1.0, is there v1.3 out for
>>> Axis2 ?
>>> I am actually experimenting using stub (generated by WSDL2Java) to write
>>> the client,
>>> echoString is just a simple example I started with.... Do you have any
>>> idea where I
>>> might find some resources about using stub to writing client ? thanks,
>>>
>>> Jenny
>>>
>>> 2006-05-29
>>>
>>> ======= 2006-05-29 08:54:23 you wrote:=======
>>>
>>> >Is there a reason why you are using Axis 1.0 instead of 1.3?
>>> >The new 1.3 uses class org.soapinterop.EchoString
>>> >and the specific method call is
>>> >org.soapinterop.EchoString(java.lang.String)
>>> >
>>> >M-
>>> >
>>> >This email message and any files transmitted with it contain confidential
>>> >information intended only for the person(s) to whom this email message is
>>> >addressed. If you have received this email message in error, please notify
>>> >the sender immediately by telephone or email and destroy the original
>>> >message without making a copy. Thank you.
>>> >
>>> >----- Original Message -----
>>> >From: "Jenny ZHANG" <[EMAIL PROTECTED]>
>>> >To: "axis-user" <[email protected]>
>>> >Sent: Sunday, May 28, 2006 1:41 PM
>>> >Subject: [Axis2] Pls help ----> about using stub to writing
>>> >echoStringclient.
>>> >
>>> >
>>> >> Hey,
>>> >>
>>> >> I used WSDL2Java to generate a stub for Axis2SampleDocLitService.aar as
>>> >> instructed in user's manual.
>>> >> and then tried to use the stub to write a simple client .java for its
>>> >> echoString operation (the codes are
>>> >> attached) , however, when I compiled it, it said
>>> >>
>>> >> " [javac]
>>> >> C:\Apache\Axis2-std-1.0\samples\src\src\echoStringClient.java:24: cannot
>>> >> apply org.apache.axis2.userguide.Axis2SampleDocLitServiceStub's
>>> >> echoString(org
>>> >> .apache.axis2.userguide.Axis2SampleDocLitServiceStub.EchoStringParam) to
>>> >> (or
>>> >> g.apache.axis2.userguide.xsd.EchoStringParamDocument) "
>>> >>
>>> >> Could anyone please tell me what's wrong with the codes? Thanks !
>>> >>
>>> >> Jenny
>>> >> [EMAIL PROTECTED]
>>> >> 2006-05-29
>>> >>
>>> >> ----------------------------------
>>> >> import org.apache.axis2.userguide.xsd.EchoStringParamDocument;
>>> >> import org.apache.axis2.userguide.xsd.EchoStringParamDocument.*;
>>> >> import org.apache.axis2.userguide.xsd.EchoStringReturnDocument;
>>> >> import org.apache.axis2.userguide.xsd.EchoStringReturnDocument.*;
>>> >> import org.apache.axis2.userguide.Axis2SampleDocLitServiceStub;
>>> >> import org.apache.axis2.addressing.EndpointReference;
>>> >>
>>> >> public class echoStringClient {
>>> >> private static EndpointReference targetEPR = new
>>> >> EndpointReference("http://127.0.0.1:8080/axis2/services/Axis2SampleDocLitService");
>>> >>
>>> >> public static void main(String[] args) {
>>> >> try {
>>> >> //Create the stub by passing the AXIS_HOME and target EPR.
>>> >> //We pass null to the AXIS_HOME and hence the stub will use the
>>> >> current directory as the AXIS_HOME
>>> >> Axis2SampleDocLitServiceStub stub= new
>>> >> Axis2SampleDocLitServiceStub(null,
>>> >>
>>> >> "http://localhost:8080/axis2/services/Axis2SampleDocLitService");
>>> >>
>>> >> //Create the request document to be sent.
>>> >> EchoStringParamDocument reqDoc=
>>> >> EchoStringParamDocument.Factory.newInstance();
>>> >> reqDoc.setEchoStringParam("Axis2 Echo");
>>> >>
>>> >> //invokes the Web service.
>>> >> EchoStringReturnDocument resDoc=stub.echoString(reqDoc);
>>> >> System.out.println(resDoc.getEchoStringReturn());
>>> >>
>>> >> } catch (Exception e) {
>>> >> e.printStackTrace();
>>> >> }
>>> >>
>>> >> }
>>> >> }
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> >>
>>> >>
>>>
>>> = = = = = = = = = = = = = = = = = = = =
>>>
>>>
>>>
>>
>>
>> --
>> Ajith Ranabahu
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
= = = = = = = = = = = = = = = = = = = =