Hi
I am getting this exception when i invoke the service. I know some jar files i am
missing.
I am using JRE 1.5 and Jboss 4.2 JbossWS.
What i have to do ?
My Code is
import javax.jws.WebMethod;
| import javax.jws.WebService;
|
| @WebService
| public class HelloWorldWS implements HelloWorldInterface
| {
| @WebMethod
| public String sayHello(String toWhom)
| {
| //System.out.println("I'm Hit! " + toWhom);
| return "Hello World: " + toWhom + " on " + new
java.util.Date();
| }
| }
import java.rmi.Remote;
|
| public interface HelloWorldInterface extends Remote {
| public String sayHello(String toWhom);
| public void login(String toWhom);
| }
package com.client;
|
| import java.io.BufferedReader;
| import java.io.InputStreamReader;
| import java.io.OutputStream;
| import java.net.HttpURLConnection;
| import java.net.URL;
| import java.net.URLConnection;
| import java.util.Properties;
|
| public class TestClient{
|
| /**
| * @param args
| */
| public static void main(String[] args) {
| // TODO Auto-generated method stub
| HttpURLConnection httpurlconnection = null;
| try
| {
| // Specify proxy settings
| Properties sysProperties = System.getProperties();
| sysProperties.put("proxyHost", "localhost");
| sysProperties.put("proxyPort", "8080");
| sysProperties.put("proxySet", "true");
|
| String HostUrl = "localhost";
| String SoapActionUrl =
"http://localhost:8080/Test/HelloWorldService?wsdl";
|
| URL url = new URL(SoapActionUrl);
| URLConnection urlconnection = url.openConnection();
| httpurlconnection = (HttpURLConnection)urlconnection;
|
| StringBuffer stringbuffer = new StringBuffer();
|
| stringbuffer.append("<SOAP-ENV:Envelope
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
| stringbuffer.append("<SOAP-ENV:Body>");
| stringbuffer.append("<ns1:sayHello
xmlns:ns1=\"http://soapinterop.org/\">");
| stringbuffer.append("<arg0
xsi:type=\"xsd:string\">World</arg0>");
|
stringbuffer.append("</ns1:sayHello></SOAP-ENV:Body></SOAP-ENV:Envelope>");
|
| byte abyte0[] = stringbuffer.toString().getBytes();
| httpurlconnection.addRequestProperty("Host", HostUrl);
| httpurlconnection.addRequestProperty("Content-Length",
String.valueOf(abyte0.length));
| httpurlconnection.addRequestProperty("Content-Type",
"text/xml; charset=UTF-8");
| httpurlconnection.addRequestProperty("SOAPAction",
SoapActionUrl);
| httpurlconnection.setInstanceFollowRedirects(true);
| //httpurlconnection.addRequestProperty("Proxy-Authorization",
"NTLM
TlRMTVNTUAABAAAAB7IIogYABgA1AAAADQANACgAAAAFASgKAAAAD0lFMTBEVDZESzJDMVNHTE9CQUw=");
| //httpurlconnection.addRequestProperty("Cookie",
"niagara_auth=YWRtaW46YWRtaW4=");
| httpurlconnection.setRequestMethod("POST");
| httpurlconnection.setDoOutput(true);
| httpurlconnection.setDoInput(true);
|
|
| OutputStream outputstream = httpurlconnection.getOutputStream();
| outputstream.write(abyte0);
| outputstream.close();
|
| System.out.println(httpurlconnection.getResponseMessage());
|
| InputStreamReader inputstreamreader = new
InputStreamReader(httpurlconnection.getInputStream());
| BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
| StringBuffer stringbuffer1 = new StringBuffer();
| String s3;
| while((s3 = bufferedreader.readLine()) != null)
| {
| stringbuffer1.append(s3);
| System.out.println(s3);
| }
| bufferedreader.close();
| httpurlconnection = null;
| }
| catch(Exception e)
| {
| e.printStackTrace();
| }
| }
| }
20:57:43,056 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| java.lang.UnsupportedOperationException: setProperty must be overridden by all
subclasses of SOAPMessage
| at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
| at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:67)
| at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:243)
| at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:179)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:197)
| at
org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
| 20:57:43,056 ERROR [AbstractServiceEndpointServlet] Error processing web service
request
| java.lang.UnsupportedOperationException: setProperty must be overridden by all
subclasses of SOAPMessage
| at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
| at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:67)
| at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:155)
| at
org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:235)
| at
org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.exceptionToFaultMessage(SOAPFaultHelperJAXWS.java:164)
| at
org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.createFaultMessageFromException(SOAP11BindingJAXWS.java:104)
| at org.jboss.ws.core.CommonSOAPBinding.bindFaultMessage(CommonSOAPBinding.java:623)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:229)
| at
org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
| 20:57:43,056 ERROR [[HelloWorldService]] Servlet.service() for servlet
HelloWorldService threw exception
| java.lang.UnsupportedOperationException: setProperty must be overridden by all
subclasses of SOAPMessage
| at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
| at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:67)
| at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:155)
| at
org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:235)
| at
org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.exceptionToFaultMessage(SOAPFaultHelperJAXWS.java:164)
| at
org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.createFaultMessageFromException(SOAP11BindingJAXWS.java:104)
| at org.jboss.ws.core.CommonSOAPBinding.bindFaultMessage(CommonSOAPBinding.java:623)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:229)
| at
org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
What steps i'm missing
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055273#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...