1. Axis
  2. AXIS-2449

Axis does not supply correct namespace in SOAP message



      I have a WebService running on axis and are trying to consume it from a .NET (C#) client, but all I get back is NULL values.

      I have search both this mailing list and others and I can see that I am not the only one having this problem, but I can't seem to find a real fix to the problem.
      Some people says I should manually edit the wsdl file and some mean I should manualy edit the .NET proxy, but I don't like either solution sinse it fixes the
      symptom not the real problem.

      The service takes a complex type and an int as input and returns å complex type.
      In the .wsdd file I have adden a beanMapping that looks like this:

      which puts the type in the namespace.
      The default namespace is namespace.
      The wsdl file is automatically generated from axis like this: http://hostname/webapp/services/FoobarWS?wsdl

      The schema definition of the returned object in the wsdl looks like this: (The extension base i found in the "" namespace)

      <schema elementFormDefault="qualified" targetNamespace="" xmlns="">
      <import namespace=""/>
      <complexType name="FoobarDO">
      <extension base="tns1:Data">
      <element name="signatur" nillable="true" type="xsd:string"/>
      <element name="kommentar" nillable="true" type="xsd:string"/>

      To me it looks like it's located in the correkt namespace as defines in the beanMapping in the wsdd file.

      The problem is that axis does not send the response in the correkt namespace:
      Eg. Soap response from axis:

      <?xml version="1.0" encoding="utf-8"?>
      <soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
      <hentFoobarResponse xmlns="">
      <signatur xsi:nil="true"/>
      <kommentar>Viskom testing testing testing</kommentar>

      Here the .NET client clearly is trying to find objects and values in the wrong namespace. The wsdl says it's in and axis sends it in

      I have deployed the same app on a Websphere server (without axis) and this works fine. The return message from Websphere looks like this:

      <?xml version="1.0" encoding="utf-8"?>
      <soapenv:Envelope xmlns:soapenv="" xmlns:soapenc="" xmlns:xsd="" xmlns:xsi="">
      <hentFoobarResponse xmlns="">
      <signatur xsi:nil="true" xmlns=""/>
      <kommentar xmlns="">Viskom testing testing testing</kommentar>
      </hentFoobarResponse >

      Here the correkt namespace is supplied and the .NET client can read and deserialize it correctly.

      Axis version: Implementation-Version: 1.3 2244 October 5 2005
      Java version: java full version "1.4.2_08-b03"

      1. SampleWS.wsdl
        3 kB
        Alexander Vaagan


        No work has yet been logged on this issue.


          • Assignee:
            Alexander Vaagan
          • Votes:
            4 Vote for this issue
            5 Start watching this issue


            • Created: