In Axis 1.4 I am having problems with complex types and the namespace not being set in the response message when I use my own bean class and the built in bean serializer in the type mapping.

I have found that Axis clients work fine w/o the namespace but .NET clients ignore the response unless it has the namespace.  I must be doing something wrong because my understanding is that the namespace
must be on the response?

Here are my dev steps:

1) java2wsdl on a service facade to create the WSDL
2) wsdl2java on the WSDL to get the deploy.wsdd contents
3) edit wsdd so that my service facade is the classname
4) edit wsdd so that the typemapping is my bean class returned on the facade
5) I do not push any .java files from wsdl2java to my webapp

Below is my tcpmon capture of the response showing the missing namespace, the wsdd and the wsdl

When hosting a service, do you use the wsdl2java generated bean class on the server side?  Example 5 in the axis samples does not use the wsdl2java generated bean class so I do not either.

<?xml versionfiltered="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>
         <getUsersResponse xmlns="http://abc.mysite.com/ComplexService">
            <getUsersReturn>
               <firstName>Super</firstName>
               <id>1</id>
               <lastName>Man</lastName>
               <notes>Has a new movie</notes>
            </getUsersReturn>
            <getUsersReturn>
               <firstName>James</firstName>
               <id>2</id>
               <lastName>Bond</lastName>
               <notes>Is 007</notes>
            </getUsersReturn>
            <getUsersReturn>
               <firstName>George</firstName>
               <id>3</id>
               <lastName>Bush</lastName>
               <notes>Is the Decider</notes>
            </getUsersReturn>
         </getUsersResponse>
      </soapenv:Body>
   </soapenv:Envelope>



  <service name="AxisComplexService" provider="java:RPC" style="wrapped" use="literal">
      <parameter name="wsdlTargetNamespace" value="http://abc.mysite.com/ComplexService"/>
      <parameter name="wsdlServiceElement" value="AxisComplexServiceService"/>
      <parameter name="schemaQualified" value="http://abc.mysite.com/ComplexService,http://value.abc.mysite.com"/>
      <parameter name="wsdlServicePort" value="AxisComplexService"/>
      <parameter name="className" value="com.abc.ws.complexservice.AxisComplexService"/>
      <parameter name="wsdlPortType" value="AxisComplexService"/>
      <parameter name="typeMappingVersion" value="1.2"/>
      <operation name="getUsers" qname="operNS:getUsers" xmlns:operNS="http://abc.mysite.com/ComplexService" returnQName="retNS:getUsersReturn" xmlns:retNS="http://abc.mysite.com/ComplexService" returnType="rtns:UserVO" xmlns:rtns="http://value.abc.mysite.com" soapActionfiltered="" >
      </operation>
      <parameter name="allowedMethods" value="getUsers"/>
      <parameter name="scope" value="Application"/>

      <typeMapping
        xmlns:ns="http://value.abc.mysite.com"
        qname="ns:UserVO"
        type="java:com.mysite.abc.value.UserVO"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
  </service>



<?xml versionfiltered="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://abc.mysite.com/ComplexService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://abc.mysite.com/ComplexService" xmlns:intf="http://abc.mysite.com/ComplexService" xmlns:tns1="http://value.abc.mysite.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 elementFormDefault="qualified" targetNamespace="http://abc.mysite.com/ComplexService" xmlns="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://value.abc.mysite.com"/>
   <element name="getUsers">
    <complexType/>
   </element>
   <element name="getUsersResponse">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="getUsersReturn" type="tns1:UserVO"/>
     </sequence>
    </complexType>
   </element>
  </schema>
  <schema elementFormDefault="qualified" targetNamespace="http://value.abc.mysite.com" xmlns="http://www.w3.org/2001/XMLSchema">
   <complexType name="UserVO">
    <sequence>
     <element name="firstName" nillable="true" type="xsd:string"/>
     <element name="id" type="xsd:int"/>
     <element name="lastName" nillable="true" type="xsd:string"/>
     <element name="notes" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="getUsersResponse">

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

   </wsdl:message>

   <wsdl:message name="getUsersRequest">

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

   </wsdl:message>

   <wsdl:portType name="AxisComplexService">

      <wsdl:operation name="getUsers">

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

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

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="AxisComplexServiceSoapBinding" type="impl:AxisComplexService">

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

      <wsdl:operation name="getUsers">

         <wsdlsoap:operation soapActionfiltered=""/>

         <wsdl:input name="getUsersRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="getUsersResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="AxisComplexServiceService">

      <wsdl:port binding="impl:AxisComplexServiceSoapBinding" name="AxisComplexService">

         <wsdlsoap:address locationfiltered="http://localhost:7001/abc/soap/services/AxisComplexService"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2�/min or less.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to