Author
Help me in writing client foe this JAX ws Web service
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
Hi ,
I am unable to write client for my Webservice deployed under glass fish v3 .please help.
My client which is incomplete :please help
import java.net.URL ;
import jws.CalculatorService;
import jws.Calculator;
import javax.xml.ws.Service ;
import sun.print.resources.serviceui;
public class Hi {
@WebServiceRef(wsdlLocation=
"http://localhost:8089/Ram/Calculator?wsdl")
CalculatorService service ;
public static void main(String argsp[]) throws Exception
{
}
}
The problem is that i am unable to use the method service.getPort to get access to my Port class .
Please help , thanks in advnace .
Save India From Corruption - Anna Hazare.
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted Sep 13, 2010 13:48:08
0
Any particular reason you're not using the wsdl2java tool to create the client code? Have you read the Metro documentation?
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
Have you read the Metro documentation?
No , i dont know this tool , for running this tool wsdl2java , do i require any server specific jars installed ??
Why i am unable to call getPort on my service ??
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted Sep 14, 2010 02:53:51
0
When you tried to learn about wsdl2java, where did you look for information? What terms did you search for?
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
i asked this question as i saw IBM websphere has that tool to my knowledge , correct me if i am wrong .
and this is related to my previous question
"Why i am unable to call getPort on my service ?? "
so that somebody might answer this question which was the actual topic about .
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted Sep 14, 2010 04:28:53
0
i asked this question as i saw IBM websphere has that tool to my knowledge , correct me if i am wrong .
I know nothing about WebSphere, but since you're asking about GlassFish, that's irrelevant anyway. The important point is that Metro -the SOAP stack used by GlassFish- has a tool of that name.
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
that Metro -the SOAP stack used by GlassFish- has a tool of that name.
Thanks Burnham
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
Hi!
Lester, aren't you mistaking the Axis or Apache CXF wsdl2java tool for a GlassFish tool?
GlassFish and Metro uses wsimport, as far as I know.
The wsimport tool is also present in JavaSE 6 and thus require no additional libraries.
Best wishes!
My free books and tutorials: http://www.slideshare.net/krizsan
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted Sep 14, 2010 14:12:17
0
Oops, you're quite right - wsdl2java is used by Axis, Metro uses wsimport. Momentary lapse of reason...
subject: Help me in writing client foe this JAX ws Web service