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 Mayur Shetye <ma...@yahoo.com> on 2004/07/12 21:01:00 UTC
java2wsdl Help needed
this is a simple java class , I want to generate a
simple WSDL frile from it and then use that WSDL to
create stubs on the client side .
The code is as follows
____________
package samples.myEchoInt;
public class EchoIntService
{
public int echoInt(int i)
{
return i;
}
}
_____________
My java2wsdl arguement is
java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl�
-l"http://localhost:8080/axis/services/EchoIntService"
-n� "urn:myservice.com" -p"samples.myEchoInt"
"urn:myservice.com"� samples.myEchoInt.EchoIntService
I get an error saying
The <class-of-portType> has already been specified as,
�. It cannot be specifie
d again as samples.myEchoInt.EchoIntService.
Java2WSDL emitter
Usage: java org.apache.axis.wsdl.Java2WSDL [options]
class-of-portType
Can anyone please tel me why ?
regards
Mayur Shetye
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
RE: java2wsdl Help needed
Posted by Mayur Shetye <ma...@yahoo.com>.
Thanks Laxma and Christophe.
I also have generated similar WSDL using toold from
JDeveloper but it also makes another Iservice1.java
file.
I still am confused about a few things .
To implement a webservice >>>
1. I write the interface
2. I write the implementation of the interface,
3.I generate the WSDL using Java2WSDL from my
interface
4. I generate stubs using WSDL2Java for my client.
5. I use the stubs in a client program to invoke the
webservice.
Please let me know if I have got this right.
Thanks
Mayur Shetye
--- Christophe Roudet <cr...@activia.net> wrote:
> Try to turn your service into an interface:
> package samples.myEchoInt;
>
> public interface IEchoIntService
> {
> public int echoInt(int i);
> }
>
> Christophe
>
> > -----Original Message-----
> > From: Mayur Shetye [mailto:mayurkumar@yahoo.com]
> > Sent: Monday, July 12, 2004 3:01 PM
> > To: axis-user@ws.apache.org
> > Subject: java2wsdl Help needed
> >
> > this is a simple java class , I want to generate a
> > simple WSDL frile from it and then use that WSDL
> to
> > create stubs on the client side .
> >
> > The code is as follows
> >
> > ____________
> >
> > package samples.myEchoInt;
> >
> > public class EchoIntService
> > {
> > public int echoInt(int i)
> > {
> > return i;
> > }
> > }
> >
> >
> >
> > _____________
> >
> >
> > My java2wsdl arguement is
> >
> > java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl
> >
>
-l"http://localhost:8080/axis/services/EchoIntService"
> > -n "urn:myservice.com" -p"samples.myEchoInt"
> > "urn:myservice.com"
> samples.myEchoInt.EchoIntService
> >
> >
> >
> > I get an error saying
> >
> > The <class-of-portType> has already been specified
> as,
> > a. It cannot be specifie
> > d again as samples.myEchoInt.EchoIntService.
> > Java2WSDL emitter
> > Usage: java org.apache.axis.wsdl.Java2WSDL
> [options]
> > class-of-portType
> >
> >
> > Can anyone please tel me why ?
> >
> > regards
> > Mayur Shetye
> >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage!
> > http://promotions.yahoo.com/new_mail
>
>
>
>
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
RE: java2wsdl Help needed
Posted by Christophe Roudet <cr...@activia.net>.
Try to turn your service into an interface:
package samples.myEchoInt;
public interface IEchoIntService
{
public int echoInt(int i);
}
Christophe
> -----Original Message-----
> From: Mayur Shetye [mailto:mayurkumar@yahoo.com]
> Sent: Monday, July 12, 2004 3:01 PM
> To: axis-user@ws.apache.org
> Subject: java2wsdl Help needed
>
> this is a simple java class , I want to generate a
> simple WSDL frile from it and then use that WSDL to
> create stubs on the client side .
>
> The code is as follows
>
> ____________
>
> package samples.myEchoInt;
>
> public class EchoIntService
> {
> public int echoInt(int i)
> {
> return i;
> }
> }
>
>
>
> _____________
>
>
> My java2wsdl arguement is
>
> java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl
> -l"http://localhost:8080/axis/services/EchoIntService"
> -n "urn:myservice.com" -p"samples.myEchoInt"
> "urn:myservice.com" samples.myEchoInt.EchoIntService
>
>
>
> I get an error saying
>
> The <class-of-portType> has already been specified as,
> a. It cannot be specifie
> d again as samples.myEchoInt.EchoIntService.
> Java2WSDL emitter
> Usage: java org.apache.axis.wsdl.Java2WSDL [options]
> class-of-portType
>
>
> Can anyone please tel me why ?
>
> regards
> Mayur Shetye
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
Invalid Attributes error
Posted by Steve Wells <St...@mohomine.com>.
Note the following on WebLogic generates an error when I execute Axis
client code vs. no errors when I execute command directly via browser -
ideas? suggestions?
----------------------------------------------------------
On WebLogic I have a service MACCWS that I execute a getVersion() call via
web browser:
http://localhost:7007/axis/MACCWS.jws?method=init
the following appears in the soap monitor & all is OK:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
">
<soapenv:Body>
<getVersion>
</getVersion>
</soapenv:Body>
</soapenv:Envelope>
this response is generated and returned, all OK:
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getVersionResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<getVersionReturn xsi:type="xsd:string">RevString</getVersionReturn>
</getVersionResponse>
</soapenv:Body>
</soapenv:Envelope>
However the following error is generated everytime a SOAP message is
submitted from an Axis client based on WSDL based java code:
<Jul 12, 2004 5:01:16 PM PDT> <Warning> <HTTP Session> <BEA-100061> <Web
application: ServletContext(id=30621423,name=axis,context-path=/axis)
tried to place a non-serializable attribute:
org.apache.axis.handlers.soap.SOAPService@cc0f9f into the session:
AzmMmO7z77OjfyjPFxQZASRm6no4FKnOsKrZCToUyDNAc2fsU3YX!1378039685!1089676876977.
This attribute will be lost upon redeployment. This message is logged only
once per session.>
Inspecting the soap monitor shows the following was instead submitted:
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<nsl:getVersion soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:nsl="http://DefaultNamespace"/>
</soapenv:Body>
</soapenv:Envelope>
with the following instead returned:
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<nsl:getVersionResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:nsl="http://DefaultNamespace"/>
<nsl:getVersionReturn
xsi:type="xsd:string">RevString</nsl:getVersionReturn>
</nsl:getVersionResponse>
</soapenv:Body>
</soapenv:Envelope>
Re: java2wsdl Help needed
Posted by Laxma Reddy Dendi <ax...@yahoo.com>.
try this
java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl
-l"http://localhost:8080/axis/services/EchoIntService"
-n "EchoIntService" -p"samples.myEchoInt"
"EchoIntService" samples.myEchoInt.EchoIntService
from your axis_devhome.
regards
Laxma
--- Mayur Shetye <ma...@yahoo.com> wrote:
> this is a simple java class , I want to generate a
> simple WSDL frile from it and then use that WSDL to
> create stubs on the client side .
>
> The code is as follows
>
> ____________
>
> package samples.myEchoInt;
>
> public class EchoIntService
> {
> public int echoInt(int i)
> {
> return i;
> }
> }
>
>
>
> _____________
>
>
> My java2wsdl arguement is
>
> java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl
>
-l"http://localhost:8080/axis/services/EchoIntService"
> -n "urn:myservice.com" -p"samples.myEchoInt"
> "urn:myservice.com"
> samples.myEchoInt.EchoIntService
>
>
>
> I get an error saying
>
> The <class-of-portType> has already been specified
> as,
> �. It cannot be specifie
> d again as samples.myEchoInt.EchoIntService.
> Java2WSDL emitter
> Usage: java org.apache.axis.wsdl.Java2WSDL [options]
> class-of-portType
>
>
> Can anyone please tel me why ?
>
> regards
> Mayur Shetye
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
>
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail