13 Replies Latest reply on Nov 30, 2005 7:52 AM by Spyros Halkidis

    Must include type attribute for handler deployment message

    Spyros Halkidis Newbie

      Dear programmers,

      I think I have sucessfully deployed a simple HelloWorld service
      because by using the URL for the .wsdl file I can see it in a web
      browser. However, the client for this simple service does not work.
      I try to use Dynamic Invocation Interface and I always get
      the org.jboss.axis.deployment.wsdd.WSDDException "Must include type attribute for handler deployment!"

      I include source code for HelloClient.java the .wsdl file and the .wsdd file
      below. Excuse my ignorance. Any help is valuable.

      Spyros Halkidis

      1. HelloClient.java
      ------------------------------------------------------------
      import webservice.test.hello.*;

      import javax.xml.namespace.QName;
      import javax.xml.rpc.Service;
      import javax.xml.rpc.ServiceFactory;
      import javax.xml.rpc.Call;
      import java.net.URL;

      class HelloClient
      {
      public static void main(String[] args) throws Exception
      {

      URL url = new URL("http://localhost:8080/hello/HelloWS");
      String ns="http://webservice.test.hello/";
      QName qname=new QName(ns, "HelloWorldWS");

      ServiceFactory factory=ServiceFactory.newInstance();
      Service service=factory.createService(url, qname);
      HelloInterface
      hello=(HelloInterface)service.getPort(HelloInterface.class);
      System.out.println("output:"+hello.hello());
      }
      }
      ===============================================
      2. HelloWorldWS.wsdl
      -------------------------------------------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>

      <definitions name="HelloWorldWS" targetNamespace="http://webservice.test.hello/" xmlns:tns="http://webservice.test.hello/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">









      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>

      <soap:operation soapAction=""/>

      <soap:body use="literal" namespace="http://webservice.test.hello/"/>

      <soap:body use="literal" namespace="http://webservice.test.hello/"/>


      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
      ====================================================
      3. HelloWS.wsdd
      ----------------------------------------------------------------------------------------------
      <deployment
      xmlns='http://xml.apache.org/axis/wsdd/'
      xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'
      xmlns:soap='http://schemas.xmlsoap.org/soap/encoding/'
      xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
      xmlns:xsd='http://www.w3.org/2001/XMLSchema'>






      <operation name='hello' qname='ns1:hello' returnQName='result' returnType='ns2:string' xmlns:ns1='http://webservice.test.hello/' xmlns:ns2='http://www.w3.org/2001/XMLSchema' >





      -------------------------------------------------------------------------------------