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 Qiyun Yang <qy...@hotmail.com> on 2006/11/19 12:14:03 UTC
org.apache.axis2.AxisFault for xmethods StockQuote client
Hi,
I developed an axis2 clinet (using axis2 command line code generate
approach), when run it, there are the following error messages. Please
advise where could be wrong.
The request document (as printed out) is as follow:
<getQuote
xmlns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/">
<symbol xmlns="">IBM</symbol>
</getQuote>
(The delayed stock quote web service is rpc style though)
Thanks and regards.
Q
run.client:
[java] <getQuote
xmlns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/">
[java] <symbol xmlns="">IBM</symbol>
[java] </getQuote>
[java] org.apache.axis2.AxisFault: decoding error:
electric.xml.ParseException: the document does not have exactly one root
[java] line 1, char 0: ...
[java] at
org.apache.axis2.description.OutInAxisOperationClient.execute
(OutInAxisOperation.java:308)
[java] at clients.NetXmethodsServicesStockquoteStockQuoteServiceSt
ub.getQuote(NetXmethodsServicesStockquoteStockQuoteServiceStub.java:141)
[java] at clients.Client.main(Client.java:19)
_________________________________________________________________
Get MSN Messenger emoticons and display pictures here!
http://ilovemessenger.msn.com/?mkt=en-sg
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [axis2] org.apache.axis2.AxisFault for xmethods StockQuote client
Posted by Davanum Srinivas <da...@gmail.com>.
Axis2 does not support rpc/encoded wsdl's.
-- dims
On 11/20/06, Qiyun Yang <qy...@hotmail.com> wrote:
>
> Hi,
>
> I developed an axis2 clinet to access xmethids web service: delayed stock
> quote (using axis2 command line code generate approach):
>
> WSDL2Java -d xmlbeans -uri
> http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl -p
> clients -o D:\00Axis2\StockQuote
>
> The codes are successfully generated which is used for coding Client.java.
>
> When running client, there are the following error messages:
>
> org.apache.axis2.AxisFault: decoding error: electric.xml.ParseException: the
> document does not have exactly one root line 1, char 0: ...
>
> Apprarntly, the statement in the client code did not get through:
>
> GetQuoteResponseDocument resDoc = stub.getQuote(reqDoc);
>
> The request document reqDoc (as printed out in the client code) is as
> follow:
>
> <getQuote
> xmlns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/">
> <symbol xmlns="">IBM</symbol>
> </getQuote>
>
> (The delayed stock quote web service is rpc style though)
>
> Please advise where could be wrong.
>
> Thanks and regards.
> Q
>
>
> run.client:
> [java] <getQuote
> xmlns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/">
> [java] <symbol xmlns="">IBM</symbol>
> [java] </getQuote>
> [java] org.apache.axis2.AxisFault: decoding error:
> electric.xml.ParseException: the document does not have exactly one root
> [java] line 1, char 0: ...
> [java] at
> org.apache.axis2.description.OutInAxisOperationClient.execute
> (OutInAxisOperation.java:308)
> [java] at clients.NetXmethodsServicesStockquoteStockQuoteServiceSt
> ub.getQuote(NetXmethodsServicesStockquoteStockQuoteServiceStub.java:141)
> [java] at clients.Client.main(Client.java:19)
>
> _________________________________________________________________
> Get MSN Messenger emoticons and display pictures here!
> http://ilovemessenger.msn.com/?mkt=en-sg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: What the necessary steps to develop axis2 client only?
Posted by Amila Suriarachchi <am...@gmail.com>.
This is a problem with the service you are trying to access. I observed the
soap message sent by the Axis2 using tcpmon.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
<ns1:getQuote xmlns:ns1="
http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/
">
<symbol>test</symbol>
</ns1:getQuote>
</soapenv:Body>
</soapenv:Envelope>
which is correct according to the wsdl.
Use -ss -sd -g options to generate the skelton classes as well and try to
deploy the service in the simple axis server (comes with the axis2
distribution) and check.
Follow these steps
1. generate code (use -ss -sd -g -t -ssi -u)
2. set the envirionment varaiable AXIS2_HOME to the axis2 1.1 distribution
folder.
3. got to the directory where you generate the code and type ant
this will generate the .aar file.
4. copy it to AXIS2_HOME/repository/services folder
5. go to AXIS2_HOME/bin sh axis2Server.sh
now u have started the server
change the stub epr to "
http://localhost:8081/axis2/services/net.xmethods.services.stockquote.StockQuoteService
"
and run the client.
Re: What the necessary steps to develop axis2 client only?
Posted by Qiyun Yang <qy...@hotmail.com>.
Thanks Amila,
In my experiment, I tried to develop a client to access xmethids web service
"delayed stock quote", and I used:
WSDL2Java -d xmlbeans -uri
http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl -p
clients -o D:\00Axis2\StockQuote
which successfully generated the codes. I then coded Client.java.
When running the client, I got the following errors:
org.apache.axis2.AxisFault: decoding error: electric.xml.ParseException: the
document does not have exactly one root line 1, char 0: ...
In the Client code, I printout the request document (reqDoc) which is:
<getQuote xmlns="http://www.themindelectric.com/wsdl/net.xmethods.se
rvices.stockquote.StockQuote/">
<symbol xmlns="">IBM</symbol>
</getQuote>
it is used by stub to make invocation:
GetQuoteResponseDocument resDoc = stub.getQuote(reqDoc);
This statement did not get through ...
I have no idea where went wrong. Any advise is appreciated.
Q
>From: "Amila Suriarachchi" <am...@gmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: Re: What the necessary steps to develop axis2 client only?
>Date: Mon, 20 Nov 2006 12:15:29 +0530
>
>On 11/20/06, Qiyun Yang <qy...@hotmail.com> wrote:
>>
>>
>>Hi,
>>
>>When using axis2 commandline code generation tools (WSDL2Java), I'd like
>>to
>>know what is the necessary steps to develop axis2 client only to access
>>already deployed web services (such as those on xmethods web services
>>site).
>
>
>specify the uri option to the wsdl file location
>sh wsdl2java.sh -uri <wsdl location>
>
>optionally you can use -t to generate some test casses
>sh wsdl2java.sh -uri <wsdl location> -t
>
>refer http://ws.apache.org/axis2/1_1/reference.html
>
>
>Especially, is it enough to just generate client side stub to be used for
>>developing the client? what classes should be in classpath when running
>>the
>>client?
>
>
>use all the jars in the lib directory of the axis1.1 distribution
>(axis2-1.1/lib)
>
>
>please advise.
>>Thanks and best regards.
>>Q
>>
>>_________________________________________________________________
>>Get an advanced look at the new version of MSN Messenger.
>>http://messenger.msn.com.sg/Beta/Default.aspx
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
_________________________________________________________________
Find singles online in your area with MSN Dating and Match.com!
http://match.sg.msn.com/match/mt.cfm?pg=channel&tcid=281203
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: What the necessary steps to develop axis2 client only?
Posted by Amila Suriarachchi <am...@gmail.com>.
On 11/20/06, Qiyun Yang <qy...@hotmail.com> wrote:
>
>
> Hi,
>
> When using axis2 commandline code generation tools (WSDL2Java), I'd like
> to
> know what is the necessary steps to develop axis2 client only to access
> already deployed web services (such as those on xmethods web services
> site).
specify the uri option to the wsdl file location
sh wsdl2java.sh -uri <wsdl location>
optionally you can use -t to generate some test casses
sh wsdl2java.sh -uri <wsdl location> -t
refer http://ws.apache.org/axis2/1_1/reference.html
Especially, is it enough to just generate client side stub to be used for
> developing the client? what classes should be in classpath when running
> the
> client?
use all the jars in the lib directory of the axis1.1 distribution
(axis2-1.1/lib)
please advise.
> Thanks and best regards.
> Q
>
> _________________________________________________________________
> Get an advanced look at the new version of MSN Messenger.
> http://messenger.msn.com.sg/Beta/Default.aspx
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
[axis2] org.apache.axis2.AxisFault for xmethods StockQuote client
Posted by Qiyun Yang <qy...@hotmail.com>.
Hi,
I developed an axis2 clinet to access xmethids web service: delayed stock
quote (using axis2 command line code generate approach):
WSDL2Java -d xmlbeans -uri
http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl -p
clients -o D:\00Axis2\StockQuote
The codes are successfully generated which is used for coding Client.java.
When running client, there are the following error messages:
org.apache.axis2.AxisFault: decoding error: electric.xml.ParseException: the
document does not have exactly one root line 1, char 0: ...
Apprarntly, the statement in the client code did not get through:
GetQuoteResponseDocument resDoc = stub.getQuote(reqDoc);
The request document reqDoc (as printed out in the client code) is as
follow:
<getQuote
xmlns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/">
<symbol xmlns="">IBM</symbol>
</getQuote>
(The delayed stock quote web service is rpc style though)
Please advise where could be wrong.
Thanks and regards.
Q
run.client:
[java] <getQuote
xmlns="http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/">
[java] <symbol xmlns="">IBM</symbol>
[java] </getQuote>
[java] org.apache.axis2.AxisFault: decoding error:
electric.xml.ParseException: the document does not have exactly one root
[java] line 1, char 0: ...
[java] at
org.apache.axis2.description.OutInAxisOperationClient.execute
(OutInAxisOperation.java:308)
[java] at clients.NetXmethodsServicesStockquoteStockQuoteServiceSt
ub.getQuote(NetXmethodsServicesStockquoteStockQuoteServiceStub.java:141)
[java] at clients.Client.main(Client.java:19)
_________________________________________________________________
Get MSN Messenger emoticons and display pictures here!
http://ilovemessenger.msn.com/?mkt=en-sg
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
What the necessary steps to develop axis2 client only?
Posted by Qiyun Yang <qy...@hotmail.com>.
Hi,
When using axis2 commandline code generation tools (WSDL2Java), I'd like to
know what is the necessary steps to develop axis2 client only to access
already deployed web services (such as those on xmethods web services site).
Especially, is it enough to just generate client side stub to be used for
developing the client? what classes should be in classpath when running the
client?
please advise.
Thanks and best regards.
Q
_________________________________________________________________
Get an advanced look at the new version of MSN Messenger.
http://messenger.msn.com.sg/Beta/Default.aspx
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org