[ 
https://issues.apache.org/jira/browse/AXISCPP-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893625#action_12893625
 ] 

Srinivas Umareddy commented on AXISCPP-1072:
--------------------------------------------

I think problem is in WSDL2WS code.The Latest WSDL2WS code passing the element 
type to the getCmplxObject() method instead of passing element name. In the 
Axis_client code comparing the (i.e, if (0 != strcmp (pName, 
m_pNode->m_pchNameOrValue)) ) element name with element type. For the array 
data type element name and type may not be the same. See the getCmplxObject() 
inputs description. We suppose to pass the element name not the element type.


The response is defined as: 

 <xsd:element name="ProductInfoResponse" 
type="tns:ProductInfoArray"></xsd:element> 
 <xsd:complexType name="ProductInfoArray"> 
    <xsd:sequence> 
       <xsd:element name="ProductInformation" type="tns:ProductInformation" 
minOccurs="0" maxOccurs="unbounded"> 
       </xsd:element> 
    </xsd:sequence> 
</xsd:complexType> 

WSDL2WS client code 
pReturn = (ProductInfoArray*)m_pCall->getCmplxObject((void*) 
Axis_DeSerialize_ProductInfoArray, (void*) Axis_Create_ProductInfoArray, 
(void*) Axis_Delete_ProductInfoArray,"ProductInfoArray", 0); 


   /**
     * Method used by stubs to get a deserialized value of complex types.
     *
     * @param pDZFunct is a pointer to the function that knows how to 
de-serialise
     * the object.
     * @param pCreFunct is a pointer to the function that knows how to create 
the object.
     * @param pDelFunct is a pointer to the function that knows how to delete 
the object.
     * @param pName is a null terminated character string that contains the
     * prefix:name of the object.
     * @param pNamespace is the namespace associated with the prefix used in 
'pName'.
     * @return pointer to a void object that contains the 'complex' object.
     */
    void * AXISCALL getCmplxObject( void * pDZFunct,
                                    void * pCreFunct,
                                    void * pDelFunct,
                                    const AxisChar * pName,
                                    const AxisChar * pNamespace);


Fyi,
My old issue got fixed (old axis 1.6b and xerces-c-2.6.0 was not handing the 
large xml response (i.e., ProductInfoResponse webservice was failed when get 
the more 77 records in the array)  with rebuild axis banaries and 
xerces-c-2.7.0 . Now ProductInfo
webservice handling larger xml response( test upto 400+ records. I would like 
to thank you guys for fixing the issue.

Let me know what i need to change for the current issue. I will happy to test 
your fix on this.

> AxisSoapException: Soap message content is not valid. Unexpected or 
> extraneous element (ProductInformation) encountered.
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXISCPP-1072
>                 URL: https://issues.apache.org/jira/browse/AXISCPP-1072
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Client - Deserialization
>    Affects Versions: current (nightly)
>         Environment: Axis Client : latest code from SVN 
> XMLParser: xerces-c-2.7.0
> WSDL2WS: Build with latest code using Axis Java 1.4
> Compiler: VC++ 2005(Vc8)
>            Reporter: Srinivas Umareddy
>             Fix For: current (nightly)
>
>         Attachments: axisclient.log, NPIDataServices.wsdl
>
>
> I have rebuild Axis c++ client code with latest code using xerces-c-2.7.0. I 
> have generate the my cilent code with latest wsdl2ws tool. I see 
> checkForExtraneousElements() introduced with latest wsdl2ws. 
> I am getting below error message when i execute the new code. Looks like some 
> thing broken or i am missing some thing. 
> Here is my soap responce.
> <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>
>   <ProductInfoResponse xmlns="http://www.cat.com/NPIDataServices/2007/02/05";>
>    <ProductInfoResponse xmlns="">
>     <SerialNumber>B1L</SerialNumber>
>     <ProductGroup>ARTICULATED TRUCKS</ProductGroup>
>     <GenericModel>725</GenericModel>
>     <PrimaryModel>725</PrimaryModel>
>     <SerialNumberBuilt>2250</SerialNumberBuilt>
>     <LastBuild>2010-04-30 00:00:00.0</LastBuild>
>     <Facility>PETERLEE (U2)</Facility>
>     <EngineeringModel>RM715</EngineeringModel>
>     <EngineeringVersion>-</EngineeringVersion>
>     <GeneralArrangement >2268615</GeneralArrangement >
>     <AssociatedModel>RM574</AssociatedModel>
>     <ProductType>AD</ProductType>
>     <CaptiveEngineModel>C11</CaptiveEngineModel>
>     <EngineFacilityCode>40</EngineFacilityCode>
>     <EngineFamily>ZE</EngineFamily>
>     <OldNewAssociatedModel>O</OldNewAssociatedModel>
>    </ProductInfoResponse>
>   </ProductInfoResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> Looks above soap not having any extraneous element. Why my client code is not 
> working. 
> please help on this issue. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to