Forums Register Login

problem in running the webservice

+Pie Number of slices to send: Send
Friends,

I am new to the webservice development by reading some mannual in netbeans with sun java server, i had developed a sample webservice. While running the client that consume webservice i getting error

HTTP transport error: java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL; nested exception is: HTTP transport error: java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL


My client code is

import java.io.*;
import java.net.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class NewServlet extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
out.println("Success"+getNewWebServiceSEIPort().operation(" Test"));
} catch(java.rmi.RemoteException ex) {
out.println(ex.getMessage());
}

out.close();
}

protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

private own.NewWebService getNewWebService() {
own.NewWebService newWebService = null;
try {
javax.naming.InitialContext ic = new javax.naming.InitialContext();
newWebService = (own.NewWebService) ic.lookup("java:comp/env/service/NewWebService");
} catch(javax.naming.NamingException ex) {
// TODO handle JNDI naming exception
}
return newWebService;
}

private own.NewWebServiceSEI getNewWebServiceSEIPort() {
own.NewWebServiceSEI newWebServiceSEIPort = null;
try {
newWebServiceSEIPort = getNewWebService().getNewWebServiceSEIPort();
} catch(javax.xml.rpc.ServiceException ex) {
// TODO handle service exception
}
return newWebServiceSEIPort;
}
}

and i had added message handler too.
+Pie Number of slices to send: Send
 

Originally posted by balaji vidhyadharan:
HTTP transport error: java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL; nested exception is: HTTP transport error: java.net.MalformedURLException: no protocol: REPLACE_WITH_ACTUAL_URL



Actually the error suggests to me that the Web service address isn't set somewhere - it still has REPLACE_WITH_ACTUAL_URL as a place holder. There should be a <service-ref> in your web.xml, something like

Find that WSDL file that is mentioned in your <wsdl-file> element and check the <service> element

If you see "REPLACE_WITH_ACTUAL_URL" then "replace it with your actual web service URL".
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 7631 times.
Similar Threads
not able to insert values in ms access database
display the log/output in JSP or HTML page
Not able to add up values in the table of a database
web service integration using Netbeans IDE
HTTP method GET is not supported by this URL
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:16:12.