I've made another try. this time i changed the response element in the wsdl:
<xs:element name="checkCompanyByPhoneNumberResponse">
  <xs:complexType>
    <xs:sequence>
        <xs:element minOccurs="0" name="return" nillable="true"
type="akam:CompanyCheckResult" />
    </xs:sequence>
  </xs:complexType>
</xs:element>

become (return => result)

<xs:element name="checkCompanyByPhoneNumberResponse">
  <xs:complexType>
    <xs:sequence>
        <xs:element minOccurs="0" name="result" nillable="true"
type="akam:CompanyCheckResult" />
    </xs:sequence>
  </xs:complexType>
</xs:element>

now the soap response should be (forget the namespace problem for now)

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
  <soapenv:Body>
    <ns:checkCompanyByPhoneNumberResponse
xmlns:ns="http://www.akademi-consulting.com.tr/types/ivr";>
      <ns:result type="com.akademi.ivr.model.CompanyCheckResult">
        <ns:companyCode>sdfsdfewer</ns:companyCode>
        <ns:statusCode>0</ns:statusCode>
      </ns:result>
    </ns:checkCompanyByPhoneNumberResponse>
  </soapenv:Body>
</soapenv:Envelope>

but i got the same response again.

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
  <soapenv:Body>
    <ns:checkCompanyByPhoneNumberResponse
xmlns:ns="http://www.akademi-consulting.com.tr/types/ivr";>
      <ns:return type="com.akademi.ivr.model.CompanyCheckResult">
        <ns:companyCode>sdfsdfewer</ns:companyCode>
        <ns:statusCode>0</ns:statusCode>
      </ns:return>
    </ns:checkCompanyByPhoneNumberResponse>
  </soapenv:Body>
</soapenv:Envelope>

i've changed the child element of response and put an annotation on the
method to tell this:
@WebResult(name="result", 
    targetNamespace="http://www.akademi-consulting.com.tr/model/ivr";)
but axis returned the soap as the original soap response (with ns:return
child element). 
-- 
View this message in context: 
http://www.nabble.com/Axis2-1.4-JAX-WS-annotated-service-namespace-problem-tp21681159p21683442.html
Sent from the Axis - User mailing list archive at Nabble.com.

Reply via email to