Axis
  1. Axis
  2. AXIS-2473

Server reponse does not match WSDL

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1, 1.3
    • Fix Version/s: None
    • Component/s: WSDL processing
    • Labels:
      None
    • Environment:
      Win2K, Axis running under Tomcat 4.31

      Description

      Below I have included the WSDL for a simple test service, followed by the Axis response to a request for this service. As ou can see, the WSDL claims the paramInt & paramStr elements
      are in the http://util.services.mycompany.com namespace, but in the
      generated response, they're in the http://services.mycompany.com namespace. I am using Axis 1.2.1 but have also also confirmed this behavior in 1.3.

      The class structure behind the service looks like this

      /^*** Info.java ***/
      package com.mycompany.services.util;
      public class Info
      {
      private String paramStr;
      private int paramInt;
      public int getParamInt()

      { return paramInt; }

      public void setParamInt(int paramInt)

      { this.paramInt = paramInt; }

      public String getParamStr()

      { return paramStr; }

      public void setParamStr(String paramStr)

      { this.paramStr = paramStr; }

      }

      /^*** MyService.java ***/
      package com.mycompany.services;
      import com.mycompany.services.util.Info;
      public class MyService
      {
      public Info getInfo()

      { Info i = new Info(); i.setParamInt(14); i.setParamStr("hello"); return i; }

      }

      ---------------------------------------WSDL---------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions targetNamespace="http://services.mycompany.com"
      xmlns:apachesoap="http://xml.apache.org/xml-soap"
      xmlns:impl="http://services.mycompany.com"
      xmlns:intf="http://services.mycompany.com"
      xmlns:tns1="http://util.services.mycompany.com"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <!--WSDL created by Apache Axis version: 1.2.1
      Built on Jun 14, 2005 (09:15:57 EDT)-->
      <wsdl:types>
      <schema elementFormDefault="qualified"
      targetNamespace="http://services.mycompany.com"
      xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://util.services.mycompany.com"/>
      <element name="getInfo">
      <complexType/>
      </element>
      <element name="getInfoResponse">
      <complexType>
      <sequence>
      <element name="getInfoReturn" type="tns1:Info"/>
      </sequence>
      </complexType>
      </element>
      </schema>
      <schema elementFormDefault="qualified"
      targetNamespace="http://util.services.mycompany.com"
      xmlns="http://www.w3.org/2001/XMLSchema">
      <complexType name="Info">
      <sequence>
      <element name="paramInt" type="xsd:int"/>
      <element name="paramStr" nillable="true" type="xsd:string"/>
      </sequence>
      </complexType>
      </schema>
      </wsdl:types>

      <wsdl:message name="getInfoRequest">

      <wsdl:part element="impl:getInfo" name="parameters"/>

      </wsdl:message>

      <wsdl:message name="getInfoResponse">

      <wsdl:part element="impl:getInfoResponse" name="parameters"/>

      </wsdl:message>

      <wsdl:portType name="MyService">

      <wsdl:operation name="getInfo">

      <wsdl:input message="impl:getInfoRequest"
      name="getInfoRequest"/>

      <wsdl:output message="impl:getInfoResponse"
      name="getInfoResponse"/>

      </wsdl:operation>

      </wsdl:portType>

      <wsdl:binding name="MyServiceSoapBinding" type="impl:MyService">

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

      <wsdl:operation name="getInfo">

      <wsdlsoap:operation soapAction=""/>

      <wsdl:input name="getInfoRequest">

      <wsdlsoap:body use="literal"/>

      </wsdl:input>

      <wsdl:output name="getInfoResponse">

      <wsdlsoap:body use="literal"/>

      </wsdl:output>

      </wsdl:operation>

      </wsdl:binding>

      <wsdl:service name="MyServiceService">

      <wsdl:port binding="impl:MyServiceSoapBinding" name="MyService">

      <wsdlsoap:address
      location="http://localhost/test/services/MyService"/>

      </wsdl:port>

      </wsdl:service>

      </wsdl:definitions>

      HTTP/1.1 200 OK
      Content-Type: text/xml;charset=utf-8
      Transfer-Encoding: chunked
      Date: Mon, 01 May 2006 16:03:16 GMT
      Server: Apache-Coyote/1.1

      19e
      <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-
      instance"><soapenv:Body><getInfoResponse
      xmlns="http://services.mycompany.com"><getInfoReturn><paramInt>14</par
      amInt><paramStr>hello</paramStr></getInfoReturn></getInfoResponse></so
      apenv:Body></soapenv:Envelope>
      0

      1. deploy.wsdd
        2 kB
        John Busfield
      2. server-config.wsdd
        4 kB
        John Busfield
      3. axis-patch.txt
        7 kB
        Per Salomonsson
      4. axis-patched.jar
        1.50 MB
        Per Salomonsson

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12555200 ] jira [ 12577391 ]
        Mark Thomas made changes -
        Workflow jira [ 12362265 ] Default workflow, editable Closed status [ 12555200 ]
        Per Salomonsson made changes -
        Attachment axis-patched.jar [ 12336268 ]
        Per Salomonsson made changes -
        Attachment axis-patch.txt [ 12336267 ]
        John Busfield made changes -
        Field Original Value New Value
        Attachment server-config.wsdd [ 12326456 ]
        Attachment deploy.wsdd [ 12326457 ]
        John Busfield created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            John Busfield
          • Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development