Java Webservice Clientquestion

J

Java City

I am trying to access a WSDL with a java stand alone client which would
communicate with the webservice. I created this webservice from the RAD
(IBM) utility. So it created a SEI, DESER, and SER file .

So now I create a client to talk to the SEI (not sure if its the right
approach) when I try to run this client (its a stand alone ) it gives
me a JVM crash error.

The client code is below....whats wrong in here..(it culd be
completeyly wong ...)
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import com.chase.cast.CastDAOException;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;

public class LoginManagerClient
{
public static void main(String args[])
{

try
{
String
myWSDL="http://localhost/CAST/services/LoginManager?WSDL";
ServiceFactory sf = ServiceFactory.newInstance();
URL wsdlURL = new URL(myWSDL);
QName serviceQname = new
QName(namespaceURI,"LoginManagerService");
Service helloService = sf.createService(wsdlURL, serviceQname);
QName portQname = new QName(myWSDL,"LoginManager");
LoginManager_SEI myProxy= (LoginManager_SEI)
helloService.getPort(portQname,LoginManager_SEI.class);
try
{ {
System.out.println(myProxy.isOnNewUserTeam("R009372"));
}
catch (Exception e1)
{
e1.printStackTrace();
}

}
catch (MalformedURLException e1)
{
e1.printStackTrace();
}

catch (ServiceException e)
{
e.printStackTrace();
}

}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top