Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2004, 06:55 AM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default java webservices

The below mensioned program is showing error in the compilation time.
Error is:
gg.java:50: non-static method readWSDL(java.lang.String,org.xml.sax.I
nputSource) cannot be referenced from a static context

code:


import com.ibm.wsdl.xml.*;
import javax.wsdl.*;
import org.xml.sax.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletException;
import javax.servlet.ServletConfig;
import java.io.PrintWriter;
import java.net.*;

public class gg extends HttpServlet
{
String userName;
 String password;

 public void init(ServletConfig config)throws ServletException
 {
super.init(config);
}

public void processRequest(HttpServletRequest request,HttpServletResponse response)throws ServletException,java.io.IOException
{
response.setContentType("text/html");
java.io.PrintWriter out=response.getWriter();
try{

Definition def = javax.wsdl.xml.WSDLReader.readWSDL(null,new InputSource("http://localhost:8080/xx.wsdl"));

}catch(WSDLException ex){System.out.println(ex.getFaultCode());}
}
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about webservices chobo2 ASP.NET 3.5 Basics 1 November 28th, 2008 12:58 AM
Reg. Java Webservices ABC_SUN XML 0 March 26th, 2007 04:44 AM
Encoding -webservices-why ? raghuraman_ace ASP.NET 1.0 and 1.1 Professional 0 August 28th, 2006 03:36 AM
Developing Webservices in java wakeup J2EE 2 March 27th, 2006 02:21 PM
webservices dkautilya ASP.NET 1.0 and 1.1 Professional 0 November 18th, 2005 08:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.