You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Amit Andhale <am...@gmail.com> on 2006/07/01 08:31:58 UTC

Problem returning an Array inside another Array

Hi

I have developed a *Wrapped/Literal* style J2EE Web Service. I am accessing
this web service form .NET C# Client.



This Web Service details are as follows

   1. *getProductAndComponentList(String UUID)* method returns *Array of*
   *ProductView *class which extends *BaseView* class
   2. *ProductView* array contains some attributes like Name, ID and *Array
   of* *ProductComponentView *class which also extends *BaseView* class.

 When I call this Web Service from .NET C# Client I can get the *ProductView
* Array.



In "ProductView" Array I can get the values of "ID", "Name" but getting
Empty *ProductComponentView *array even if Components are there for the
Product.



I have also written Java Client which returns correct response.

I also verified the SOAP Request and Response on the wire using "SOAPScope"
tool which also shows me correct response.



I am getting zero length *ProductComponentView *Array when I access this web
service using .NET client.



Please help me,



My WSDL is as follows...


----------------WSDL---------------------------

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

<
wsdl:definitions targetNamespace="urn:ProductsAndComponentsService" xmlns:
apachesoap=" http://xml.apache.org/xml-soap"
xmlns:impl="urn:ProductsAndComponentsService"
xmlns:intf ="urn:ProductsAndComponentsService" xmlns:tns1 ="
http://view.bean.product.cs.sungard.com" xmlns :tns2="
http://view.bean.base.cs.sungard.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.3

Built on Oct 05, 2005 (05:23:37 EDT)--
>

<wsdl:types>

<schema elementFormDefault ="qualified" targetNamespace
="urn:ProductsAndComponentsService" xmlns="http://www.w3.org/2001/XMLSchema
">

<import namespace=" http://view.bean.base.cs.sungard.com"/>

<import namespace=" http://xml.apache.org/xml-soap"/>

< import namespace=" http://view.bean.product.cs.sungard.com"/>

<import namespace=" http://schemas.xmlsoap.org/soap/encoding/"/>

<element name="login">

<complexType>

<sequence>

<element name="in0" type="xsd:string"/>

<element name="in1" type="xsd:string"/>

<element name="in2" type="xsd:string"/>

<element name="in3" type="xsd:string"/>

<element name="in4" type="xsd:string"/>

</sequence>

</complexType>

</element>

<element name="loginResponse">

<complexType>

<sequence>

<element name="loginReturn" type="xsd:string"/>

</sequence>

</complexType>

</element>

<element name="logout">

<complexType>

<sequence>

<element name="in0" type="xsd:string"/>

<element name="in1" type="xsd:string"/>

<element name="in2" type="xsd:string"/>

</sequence>

</complexType>

</element>

<element name="logoutResponse">

<complexType>

<sequence>

<element name="logoutReturn" type="xsd:string"/>

</sequence>

</complexType>

</element>

<element name="getProductList">

<complexType>

<sequence>

<element name="in0" type="xsd:string"/>

</sequence>

</ complexType>

</element>

<element name="getProductListResponse">

<complexType>

<sequence>

<element maxOccurs="unbounded" name="getProductListReturn" type
="tns1:ProductView"/>

</sequence>

</complexType>

</element>

<complexType name="ArrayOf_tns1_ProductAttributeRegistryView">

<sequence>

<element maxOccurs="unbounded" minOccurs="0" name ="item" type
="tns1:ProductAttributeRegistryView"/>

</sequence>

</complexType>

<complexType name="ArrayOf_xsd_long">

<sequence>

<element maxOccurs="unbounded" minOccurs="0" name ="item" type="xsd:long"/>

</sequence>

</complexType>

<complexType name="ArrayOf_xsd_string">

<sequence>

<element maxOccurs="unbounded" minOccurs="0" name ="item" type
="xsd:string"/>

</sequence>

</complexType>

<complexType name="ArrayOf_tns1_ProductComponentView">

<sequence>

<element maxOccurs="unbounded" minOccurs="0" name ="item" type
="tns1:ProductComponentView"/>

</sequence>

</complexType>

</schema>

<schema elementFormDefault ="qualified"
targetNamespace="http://xml.apache.org/xml-soap
" xmlns="http://www.w3.org/2001/XMLSchema">

<import namespace=" http://view.bean.base.cs.sungard.com"/>

<import namespace=" http://view.bean.product.cs.sungard.com"/>

<import namespace="urn:ProductsAndComponentsService"/>

<complexType name="mapItem">

<sequence>

<element name="key" nillable="true" type ="xsd:anyType"/>

<element name="value" nillable="true" type ="xsd:anyType"/>

</sequence>

</complexType>

<complexType name="Map">

<sequence>

<element maxOccurs="unbounded" minOccurs="0" name ="item" type
="apachesoap:mapItem"/>

</sequence>

</complexType>

</schema>

<schema elementFormDefault ="qualified"
targetNamespace="http://view.bean.base.cs.sungard.com
" xmlns="http://www.w3.org/2001/XMLSchema">

<import namespace=" http://xml.apache.org/xml-soap"/>

<import namespace=" http://view.bean.product.cs.sungard.com"/>

<import namespace="urn:ProductsAndComponentsService"/>

<complexType name="BaseView">

<sequence>

<element name="customFieldMap" nillable="true" type ="apachesoap:Map"/>

<element name="editable" type="xsd:boolean"/>

<element name="parentEntityEditable" type="xsd:boolean"/>

<element name="parentEntityName" nillable="true" type ="xsd:string"/>

<element name="parentEntityReadable" type="xsd:boolean"/>

<element name="readable" type="xsd:boolean"/>

<element name="synapseCurrentErrorLevel" nillable="true" type
="xsd:string"/>

</sequence>

</complexType>

</schema>

<schema elementFormDefault ="qualified"
targetNamespace="http://view.bean.product.cs.sungard.com
" xmlns="http://www.w3.org/2001/XMLSchema">

<import namespace=" http://view.bean.base.cs.sungard.com"/>

<import namespace=" http://xml.apache.org/xml-soap"/>

<import namespace="urn:ProductsAndComponentsService"/>

<complexType name="ProductAttributeRegistryView">

<sequence>

<element name="name" nillable="true" type ="xsd:string"/>

<element name="relatedValues" nillable="true" type ="apachesoap:Map"/>

<element name="type" type="xsd:long"/>

<element name="typeLabel" nillable="true" type ="xsd:string"/>

<element name="typeValue" nillable="true" type ="xsd:string"/>

<element name="value" nillable="true" type ="xsd:string"/>

</sequence>

</complexType>

<complexType name="ProductComponentView">

<complexContent>

<extension base="tns2:BaseView">

<sequence>

<element name="ID" type="xsd:long"/>

<element name="createdBy" nillable="true" type ="xsd:string"/>

<element name="createdLoginID" type="xsd:long"/>

<element name="createdStamp" nillable="true" type ="xsd:dateTime"/>

<element name="csAssignableID" type="xsd:long"/>

<element name="customFieldID" nillable="true" type
="impl:ArrayOf_xsd_long"/>

<element name="customFieldName" nillable="true" type
="impl:ArrayOf_xsd_string"/>

<element name="customFieldTagName" nillable="true" type
="impl:ArrayOf_xsd_string"/>

<element name="customFieldType" nillable="true" type
="impl:ArrayOf_xsd_string"/>

<element name="customFieldValue" nillable="true" type
="impl:ArrayOf_xsd_string"/>

<element name="department" nillable="true" type ="xsd:string"/>

<element name="departmentID" type="xsd:long"/>

<element name="lastUpdated" nillable="true" type ="xsd:dateTime"/>

<element name="modifiedLoginID" type="xsd:long"/>

<element name="modifiedLoginName" nillable="true" type ="xsd:string"/>

<element name="modifiedStamp" nillable="true" type ="xsd:dateTime"/>

<element name="numberOfProduct" type="xsd:long"/>

<element name="ownerAssignableID" type="xsd:long"/>

<element name="ownerEntityName" nillable="true" type ="xsd:string"/>

<element name="ownerID" type="xsd:long"/>

<element name="ownerName" nillable="true" type ="xsd:string"/>

<element name="ownerType" type="xsd:long"/>

<element name="ownerUserFirstName" nillable="true" type ="xsd:string"/>

<element name="ownerUserLastName" nillable="true" type ="xsd:string"/>

<element name="privacyCode" type="xsd:int"/>

<element name="privacyCodeLabel" nillable="true" type ="xsd:string"/>

<element name="productComponentDescription" nillable="true" type
="xsd:string"/>

<element name="productComponentName" nillable="true" type ="xsd:string"/>

<element name="productToComponentId" type="xsd:long"/>

<element name="sku" nillable="true" type ="xsd:string"/>

<element name="status" type="xsd:long"/>

<element name="type" type="xsd:long"/>

<element name="updatedBy" nillable="true" type ="xsd:string"/>

</sequence>

</extension>

</ complexContent>

</complexType>

<complexType name="ProductView">

<complexContent>

<extension base="tns2:BaseView">

<sequence>

<element name="CSAssignableID" type="xsd:long"/>

<element name="CSManagerAssignableID" type="xsd:long"/>

<element name="CSParentProductID" type="xsd:long"/>

<element name="ID" type="xsd:long"/>

<element name="allowComponentAdd" type="xsd:boolean"/>

<element name="createdLoginID" type="xsd:long"/>

<element name="createdLoginName" nillable="true" type ="xsd:string"/>

<element name="createdStamp" nillable="true" type ="xsd:dateTime"/>

<element name="defaultValue" type="xsd:double"/>

<element name="defaultValueLocked" type="xsd:boolean"/>

<element name="department" nillable="true" type ="xsd:string"/>

<element name="departmentID" type="xsd:long"/>

<element name="description" nillable="true" type ="xsd:string"/>

<element name="managerAssignableID" type="xsd:long"/>

<element name="managerEntityName" nillable="true" type ="xsd:string"/>

<element name="managerID" type="xsd:long"/>

<element name="managerName" nillable="true" type ="xsd:string"/>

<element name="managerType" type="xsd:long"/>

<element name="managerUserFirstName" nillable="true" type ="xsd:string"/>

<element name="managerUserLastName" nillable="true" type ="xsd:string"/>

<element name="modifiedLoginID" type="xsd:long"/>

<element name="modifiedLoginName" nillable="true" type ="xsd:string"/>

<element name="modifiedStamp" nillable="true" type ="xsd:dateTime"/>

<element name="name" nillable="true" type ="xsd:string"/>

<element name="numberOfComponent" type="xsd:long"/>

<element name="ownerAssignableID" type="xsd:long"/>

<element name="ownerEntityName" nillable="true" type ="xsd:string"/>

<element name="ownerID" type="xsd:long"/>

<element name="ownerName" nillable="true" type ="xsd:string"/>

<element name="ownerType" type="xsd:long"/>

<element name="ownerUserFirstName" nillable="true" type ="xsd:string"/>

<element name="ownerUserLastName" nillable="true" type ="xsd:string"/>

<element name="parentProductName" nillable="true" type ="xsd:string"/>

<element name="privacyCode" type="xsd:int"/>

<element name="privacyCodeLabel" nillable="true" type ="xsd:string"/>

<element name="productAttributeRegistryViews" nillable="true" type
="impl:ArrayOf_tns1_ProductAttributeRegistryView"/>

< element name="productComponentViews" nillable="true" type
="impl:ArrayOf_tns1_ProductComponentView"/>

<element name="sku" nillable="true" type ="xsd:string"/>

<element name="typeCode" type="xsd:long"/>

</sequence>

</extension>

</complexContent>

</ complexType>

</schema>

</wsdl:types>

<wsdl:message name="logoutResponse">

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

</wsdl:message>

<wsdl:message name="loginResponse">

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

</wsdl:message >

<wsdl:message name="logoutRequest">

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

</wsdl:message>

<wsdl:message name="loginRequest">

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

</wsdl:message>

<wsdl:message name="getProductListResponse">

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

</wsdl:message>

<wsdl:message name="getProductListRequest">

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

</wsdl:message>

<wsdl:portType name="ProductsAndComponentsInterface">

<wsdl:operation name ="login">

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

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

</wsdl:operation>

<wsdl:operation name ="logout">

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

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

</wsdl:operation>

<wsdl:operation name ="getProductList">

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

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

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="ProductsAndComponentsServiceSoapBinding"
type="impl:ProductsAndComponentsInterface">

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

<wsdl:operation name ="login">

<wsdlsoap:operation soapAction =""/>

<wsdl:input name="loginRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output name="loginResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name ="logout">

<wsdlsoap:operation soapAction =""/>

<wsdl:input name="logoutRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output name="logoutResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name ="getProductList">

<wsdlsoap:operation soapAction =""/>

<wsdl:input name="getProductListRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

< wsdl:output name="getProductListResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="ProductsAndComponentsInterfaceService">

<wsdl:port binding="impl:ProductsAndComponentsServiceSoapBinding" name
="ProductsAndComponentsService">

<wsdlsoap:address location
="http://localhost:8080/editme/services/ProductsAndComponentsService
"/>

</wsdl:port>

</wsdl:service>

</
wsdl:definitions>