Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Help me in writing client foe this JAX ws Web service

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you tried to learn about wsdl2java, where did you look for information? What terms did you search for?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

that Metro -the SOAP stack used by GlassFish- has a tool of that name.



Thanks Burnham
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, you're quite right - wsdl2java is used by Axis, Metro uses wsimport. Momentary lapse of reason...
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic