Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-1000

Axis C++ 1.6 beta can't handle array return type correctly?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.6 Final
    • current (nightly)
    • Client - Stub
    • None
    • Windows 2000 professional.
      VC 6.0
      Java Webservice server.

    Description

      Dears:
      I got a problem when I want to get an array type by invoking Java webservice on windows, Java webservice returned soap message is correctly, but my client can't deserialize the returned soap message and return empty array(size is 0).
      I noticed that in SoapDeSerializer.cpp, line 922,
      if(strcmp(elementName, pName) != 0)

      { pArray->addElement(getCmplxObject(pDZFunct, pCreFunct, pDelFunct, pName, pNamespace)); }

      else
      {

      { #ifdef ENABLE_AXISTRACE if (axiscpp::AxisTrace::isTraceOn()) axiscpp::AxisTrace::traceExit("SoapDeSerializer", "deserializeEncodedComplexArray", NULL, 0); #endif return; }

      Only if strcmp returns not 0, then it will add an element into array, but here, elementName is string "enumServiceReturn" and "pName" is string "enumServiceReturn" too, then It won't add an element into array, and return directly, why elementName can't equalt to pName ?
      I think "if(strcmp(elementName, pName) != 0)" may should be "if(strcmp(elementName, pName) == 0)", is this a bug???

      Soap message returned by java webservice is as below:

        <?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>
      • <enumServiceResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      • <enumServiceReturn soapenc:arrayType="ns1:PluginServiceInfo[1]" xsi:type="soapenc:Array" xmlns:ns1="http://PluginService.DCC.trendmicro.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      • <enumServiceReturn xsi:type="ns1:PluginServiceInfo">
          <GUID xsi:type="soapenc:string">C5E6B478-0821-459B-92A5-E7DE2876BDD3</GUID>
          <name xsi:type="soapenc:string">TMIC FOR CSM</name>
          <type xsi:type="xsd:int">256</type>
          <version xsi:type="soapenc:string">1.0.0.0000</version>
          </enumServiceReturn>
          </enumServiceReturn>
          </enumServiceResponse>
          </soapenv:Body>
          </soapenv:Envelope>

      My WSDL is as below:

        <?xml version="1.0" encoding="UTF-8" ?>

      • <wsdl:definitions targetNamespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:9090/TMICServices/services/PluginServiceRegister" xmlns:intf="http://localhost:9090/TMICServices/services/PluginServiceRegister" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://jdom.org" xmlns:tns2="http://lang.java" xmlns:tns3="http://PluginService.DCC.trendmicro.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.4
        Built on Apr 22, 2006 (06:55:48 PDT)
          -->
      • <wsdl:types>
      • <schema targetNamespace="http://jdom.org" xmlns="http://www.w3.org/2001/XMLSchema">
          <import namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" />
          <import namespace="http://PluginService.DCC.trendmicro.com" />
          <import namespace="http://lang.java" />
          <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      • <complexType name="JDOMException">
      • <sequence>
          <element name="message" nillable="true" type="soapenc:string" />
          <element name="rootCause" nillable="true" type="xsd:anyType" />
          </sequence>
          </complexType>
          </schema>
      • <schema targetNamespace="http://PluginService.DCC.trendmicro.com" xmlns="http://www.w3.org/2001/XMLSchema">
          <import namespace="http://jdom.org" />
          <import namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" />
          <import namespace="http://lang.java" />
          <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      • <complexType name="PluginServiceInfo">
      • <sequence>
          <element name="GUID" nillable="true" type="soapenc:string" />
          <element name="name" nillable="true" type="soapenc:string" />
          <element name="type" type="xsd:int" />
          <element name="version" nillable="true" type="soapenc:string" />
          </sequence>
          </complexType>
          </schema>
      • <schema targetNamespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" xmlns="http://www.w3.org/2001/XMLSchema">
          <import namespace="http://jdom.org" />
          <import namespace="http://PluginService.DCC.trendmicro.com" />
          <import namespace="http://lang.java" />
          <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      • <complexType name="ArrayOf_tns3_PluginServiceInfo">
      • <complexContent>
      • <restriction base="soapenc:Array">
          <attribute ref="soapenc:arrayType" wsdl:arrayType="tns3:PluginServiceInfo[]" />
          </restriction>
          </complexContent>
          </complexType>
          </schema>
          </wsdl:types>
      • <wsdl:message name="JDOMException">
          <wsdl:part name="fault" type="tns1:JDOMException" />
          </wsdl:message>
      • <wsdl:message name="getServiceInfoRequest">
          <wsdl:part name="in0" type="soapenc:string" />
          </wsdl:message>
      • <wsdl:message name="updateServiceResponse">
          <wsdl:part name="updateServiceReturn" type="soapenc:string" />
          </wsdl:message>
          <wsdl:message name="rollbackServiceResponse" />
      • <wsdl:message name="enumServiceResponse">
          <wsdl:part name="enumServiceReturn" type="impl:ArrayOf_tns3_PluginServiceInfo" />
          </wsdl:message>
      • <wsdl:message name="rollbackServiceRequest">
          <wsdl:part name="in0" type="soapenc:string" />
          </wsdl:message>
      • <wsdl:message name="updateServiceRequest">
          <wsdl:part name="in0" type="soapenc:string" />
          <wsdl:part name="in1" type="soapenc:base64Binary" />
          </wsdl:message>
      • <wsdl:message name="enumServiceRequest">
          <wsdl:part name="in0" type="xsd:int" />
          </wsdl:message>
      • <wsdl:message name="registerServiceResponse">
          <wsdl:part name="registerServiceReturn" type="soapenc:string" />
          </wsdl:message>
      • <wsdl:message name="getServiceInfoResponse">
          <wsdl:part name="getServiceInfoReturn" type="tns3:PluginServiceInfo" />
          </wsdl:message>
      • <wsdl:message name="registerServiceRequest">
          <wsdl:part name="in0" type="soapenc:string" />
          <wsdl:part name="in1" type="soapenc:base64Binary" />
          </wsdl:message>
      • <wsdl:portType name="PluginServiceRegister">
      • <wsdl:operation name="registerService" parameterOrder="in0 in1">
          <wsdl:input message="impl:registerServiceRequest" name="registerServiceRequest" />
          <wsdl:output message="impl:registerServiceResponse" name="registerServiceResponse" />
          <wsdl:fault message="impl:JDOMException" name="JDOMException" />
          </wsdl:operation>
      • <wsdl:operation name="updateService" parameterOrder="in0 in1">
          <wsdl:input message="impl:updateServiceRequest" name="updateServiceRequest" />
          <wsdl:output message="impl:updateServiceResponse" name="updateServiceResponse" />
          <wsdl:fault message="impl:JDOMException" name="JDOMException" />
          </wsdl:operation>
      • <wsdl:operation name="rollbackService" parameterOrder="in0">
          <wsdl:input message="impl:rollbackServiceRequest" name="rollbackServiceRequest" />
          <wsdl:output message="impl:rollbackServiceResponse" name="rollbackServiceResponse" />
          <wsdl:fault message="impl:JDOMException" name="JDOMException" />
          </wsdl:operation>
      • <wsdl:operation name="enumService" parameterOrder="in0">
          <wsdl:input message="impl:enumServiceRequest" name="enumServiceRequest" />
          <wsdl:output message="impl:enumServiceResponse" name="enumServiceResponse" />
          </wsdl:operation>
      • <wsdl:operation name="getServiceInfo" parameterOrder="in0">
          <wsdl:input message="impl:getServiceInfoRequest" name="getServiceInfoRequest" />
          <wsdl:output message="impl:getServiceInfoResponse" name="getServiceInfoResponse" />
          </wsdl:operation>
          </wsdl:portType>
      • <wsdl:binding name="PluginServiceRegisterSoapBinding" type="impl:PluginServiceRegister">
          <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
      • <wsdl:operation name="registerService">
          <wsdlsoap:operation soapAction="" />
      • <wsdl:input name="registerServiceRequest">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://common.WebService.DCC.trendmicro.com" use="encoded" />
          </wsdl:input>
      • <wsdl:output name="registerServiceResponse">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:output>
      • <wsdl:fault name="JDOMException">
          <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="JDOMException" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:fault>
          </wsdl:operation>
      • <wsdl:operation name="updateService">
          <wsdlsoap:operation soapAction="" />
      • <wsdl:input name="updateServiceRequest">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://common.WebService.DCC.trendmicro.com" use="encoded" />
          </wsdl:input>
      • <wsdl:output name="updateServiceResponse">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:output>
      • <wsdl:fault name="JDOMException">
          <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="JDOMException" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:fault>
          </wsdl:operation>
      • <wsdl:operation name="rollbackService">
          <wsdlsoap:operation soapAction="" />
      • <wsdl:input name="rollbackServiceRequest">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://common.WebService.DCC.trendmicro.com" use="encoded" />
          </wsdl:input>
      • <wsdl:output name="rollbackServiceResponse">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:output>
      • <wsdl:fault name="JDOMException">
          <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="JDOMException" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:fault>
          </wsdl:operation>
      • <wsdl:operation name="enumService">
          <wsdlsoap:operation soapAction="" />
      • <wsdl:input name="enumServiceRequest">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://common.WebService.DCC.trendmicro.com" use="encoded" />
          </wsdl:input>
      • <wsdl:output name="enumServiceResponse">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:output>
          </wsdl:operation>
      • <wsdl:operation name="getServiceInfo">
          <wsdlsoap:operation soapAction="" />
      • <wsdl:input name="getServiceInfoRequest">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://common.WebService.DCC.trendmicro.com" use="encoded" />
          </wsdl:input>
      • <wsdl:output name="getServiceInfoResponse">
          <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:9090/TMICServices/services/PluginServiceRegister" use="encoded" />
          </wsdl:output>
          </wsdl:operation>
          </wsdl:binding>
      • <wsdl:service name="PluginServiceRegisterService">
      • <wsdl:port binding="impl:PluginServiceRegisterSoapBinding" name="PluginServiceRegister">
          <wsdlsoap:address location="http://localhost:9090/TMICServices/services/PluginServiceRegister" />
          </wsdl:port>
          </wsdl:service>
          </wsdl:definitions>

      Best regards,
      Ivan
      Trend Micro Product Development Group
      EMail: Ivan_Wang@trendmicro.com.cn
      [MSN] wangxg_nju@hotmail.com [QQ] 20313412

      Attachments

        Activity

          People

            nadiramra Nadir K. Amra
            ivan_wang ivan wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: