axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Leelarathne" <muthu...@opensource.lk>
Subject Wrong root element in Doc\literal
Date Mon, 17 Nov 2003 09:58:42 GMT
hi all,

I ran the following wsdl through the WSDL2Java tool. It's a document
literal service. I use the generated classes to send a request. I get a
wrong root element in the message.

<soapenv:Body>
  <RequestPerson xmlns="urn:Notification">
   <name>Saman</name>
   <adress>Colombo</adress>
  </RequestPerson>
 </soapenv:Body>
</soapenv:Envelope>


Instead of the tag <RequestPerson>, there should be <Person>. The root
element is wrong. I have given the wsdl below.

Am I doing something wrong or is this a bug ? Have you experienced this
before?

I am really thankful for any input.
Dimuthu.

<?xml version="1.0" encoding="utf-8" ?>
<definitions
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:s="http://www.w3.org/2001/XMLSchema"
  xmlns:s0="urn:Notification"
  targetNamespace="urn:Notification"
  xmlns="http://schemas.xmlsoap.org/wsdl/">

  <types>
    <s:schema elementFormDefault="qualified"
targetNamespace="urn:Notification">

      <s:complexType name="PersonData">
          <s:sequence>
            <s:element name="name" type="s:string" />
            <s:element name="adress" type="s:string"/>
          </s:sequence>
        </s:complexType>

      <s:element name="RequestPerson" type="s0:PersonData"/>
      <s:element name="ResponsePerson" type="s0:PersonData"/>

    </s:schema>
  </types>

  <message name="InMessage">
    <part name="parameters" element="s0:RequestPerson"/>
  </message>

  <message name="OutMessage">
    <part name="parameters" element="s0:ResponsePerson"/>
  </message>

  <portType name="NotificationPort">
    <operation name="findPerson">
      <input message="s0:InMessage"/>
      <output message="s0:OutMessage"/>
    </operation>
  </portType>

  <binding name="NotificationBinding" type="s0:NotificationPort">

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

    <operation name="findPerson">
      <soap:operation soapAction="findPerson" style="document"/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>

  <service name="NotificationService">
      <port name="NotificationPort" binding="s0:NotificationBinding">
      <soap:address
location="http://localhost:8080/axis/services/NotificationPort" />
    </port>
  </service>

</definitions>
-- 
Lanka Software Foundation - Proud to be a part of it.
http://www.opensource.lk






Mime
View raw message