3 Replies Latest reply on Mar 30, 2009 2:47 AM by gurkanerdogdu

    No Content-type in the header

    gurkanerdogdu

      Hi;

      JDK : 1.6.0_11-b03
      Server : 5.0.1.GA

      I have developed an EJB3 class like this;

      @WebService(name="EchoWebService", portName="EchoPort", serviceName="EchoService")
      @Stateless
      @SOAPBinding(RPC)
      public class EchoServiceBean implement IEchoService
      {
      @WebMethod
      public String echo(String echo){return echo}
      }

      It is succesfully deployed in to the server, I can see WSDL file.

      After that I created a client using the wsconsume, it generates EchoService client code.

      But when I want to call the webservice via EchoService using wsrunclient
      --> wsrunclient MyMainMethod "Echo", it throws the following exception

      javax.xml.ws.WebServiceException : No Content-type in the header!

      What is the problem?

      Thanks;


        • 1. Re: No Content-type in the header
          gurkanerdogdu

          Hey,

          Nobody cares my question ?? :)

          Thanks;

          • 2. Re: No Content-type in the header
            asoldano

            Do you have the jbossws-native libraries in you JBOSS_HOME/lib/endorsed as you're using JDK 6?
            Asking because the error message you get is most probably from Metro, suggesting on client side you're actually using it instead of JBossWS Native libraries.
            Please double check the endorsed lib and provide the full stacktrace of the exception you get.

            • 3. Re: No Content-type in the header
              gurkanerdogdu

              Thanks for answer.

              I have following jars in the endorsed library.

              jbossws-native-jaxrpc.jar,-jaxws.jar, -jaxws-ext.jar, -saaj.jar,

              Exception is : Exception in Thread main javax.xml.ws.WebServiceException :
              No Content-type in the header
              at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java 163:)
              at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java
              )

              at com.sun.xml.ws.api.pipe.Fiber.__doRun
              et.c....

              I run the client in standalone mode in Eclipse. Actually, I am putting all the JBoss Client jars in to the class path.

              Exactly, which jars that I have to setup in the client classpath to call webservice correctly?

              Thanks a lot;