Re: Deserialize complex arrays

2006-05-13 Thread Atanacio Reyes


--- Atanacio Reyes <[EMAIL PROTECTED]> wrote:

> Hi.
> 
> I'm using axis-c-1.6B to build a web service. The
> client side send the next soap message:
> 
> POST /axis/Calcot HTTP/1.1
> Host: areyes:80
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "Calcot#contorno"
> Content-Length: 1414
> 
> 
> 
> 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> 
> 
> http://areyes/axis/Calcot";>
>  xmlns:ns2="http://areyes/axis/Calcot/xsd";>
> 
>  40
>  40
>  40
> 
>  xmlns:enc="http://www.w3.org/2001/06/soap-encoding";
> xmlns:ns2="http://areyes/axis/Calcot/xsd";
> enc:arrayType="ns2:forLado[2]">
>  
>   68
>xsi:type="xsd:string">2105001131
>   31
>   1
>   
>0
>15
>   
>  
>  
>   73
>xsi:type="xsd:string">2105001164
>   31
>   1
>   
>0
>165
>   
>  
> 
> 15
> 
> 
> 
> 
> 
> in order to deserialize the message the server
> execute
> this function:
> 
> int Axis_DeSerialize_ParamArm(ParamArm* param,
> IWrapperSoapDeSerializer* pIWSDZ)
> {
>   param->mman =
>
(Caja*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_Caja,
>  (void*)Axis_Create_Caja,(void*)Axis_Delete_Caja,
> "mman", Axis_URI_Type);
> 
>   ParamForma_Array * array0 = new
> ParamForma_Array();
> 
>   array0 = (ParamForma_Array *)
> pIWSDZ->getCmplxArray(array0,
>   (void*)Axis_DeSerialize_ParamForma,
>   (void*)Axis_Create_ParamForma,
>   (void*)Axis_Delete_ParamForma,
>   (void*)Axis_GetSize_ParamForma,
>   "forLado",Axis_URI_Type);
> 
>   param->forLado = array0;
> 
>   int size
>   ParamForma** tmp = param->forLado->get(size);
> 
>   xsd__float* p_puente =
> (pIWSDZ->getElementAsFloat("puente",0));
>   if(p_puente) param->puente = *p_puente;
>   delete p_puente;
> 
>   return pIWSDZ->getStatus();
> }
> 
> the function getCmplxObject() is ok, but the
> function
> param->forLado->get(size), in the size parameter
> return 0, the functions:
> 
> (void*)Axis_DeSerialize_ParamForma,
> (void*)Axis_Create_ParamForma,
> (void*)Axis_Delete_ParamForma,
> are not executed. the function getCmplxArray is not
> deserializing the forLadoArray.
> 
> the server stop with segmentation fault, executing
> the
> function getElementAsFloat("puente",0));
> 
> What is wrong in the getCmplxArray() function?,
> Arguments?, or What is wrong in the soap message?
> 
> any help is welcome.
> 
> Atanacio Reyes.
> 

I Found the error:  the error is in the soap message,
the tag:

http://www.w3.org/2001/06/soap-encoding";
 xmlns:ns2="http://areyes/axis/Calcot/xsd";
 enc:arrayType="ns2:forLado[2]">

should be:

http://www.w3.org/2001/06/soap-encoding";
 xmlns:ns2="http://areyes/axis/Calcot/xsd";
 enc:arrayType="ns2:forLado[2]">

Someone Known how to clear the xmlns:ns2="" generated
by the function:
serializeCmplxArray();

thanks for your help.

Atanacio Reyes.

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


Deserialize complex arrays

2006-05-10 Thread Atanacio Reyes
Hi.

I'm using axis-c-1.6B to build a web service. The
client side send the next soap message:

POST /axis/Calcot HTTP/1.1
Host: areyes:80
Content-Type: text/xml; charset=UTF-8
SOAPAction: "Calcot#contorno"
Content-Length: 1414



http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>


http://areyes/axis/Calcot";>
http://areyes/axis/Calcot/xsd";>

 40
 40
 40

http://www.w3.org/2001/06/soap-encoding";
xmlns:ns2="http://areyes/axis/Calcot/xsd";
enc:arrayType="ns2:forLado[2]">
 
  68
  2105001131
  31
  1
  
   0
   15
  
 
 
  73
  2105001164
  31
  1
  
   0
   165
  
 

15





in order to deserialize the message the server execute
this function:

int Axis_DeSerialize_ParamArm(ParamArm* param,
IWrapperSoapDeSerializer* pIWSDZ)
{
  param->mman =
(Caja*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_Caja,
 (void*)Axis_Create_Caja,(void*)Axis_Delete_Caja,
"mman", Axis_URI_Type);

  ParamForma_Array * array0 = new ParamForma_Array();

  array0 = (ParamForma_Array *)
pIWSDZ->getCmplxArray(array0,
  (void*)Axis_DeSerialize_ParamForma,
  (void*)Axis_Create_ParamForma,
  (void*)Axis_Delete_ParamForma,
  (void*)Axis_GetSize_ParamForma,
  "forLado",Axis_URI_Type);

  param->forLado = array0;

  int size
  ParamForma** tmp = param->forLado->get(size);

  xsd__float* p_puente =
(pIWSDZ->getElementAsFloat("puente",0));
  if(p_puente) param->puente = *p_puente;
  delete p_puente;

  return pIWSDZ->getStatus();
}

the function getCmplxObject() is ok, but the function
param->forLado->get(size), in the size parameter
return 0, the functions:

(void*)Axis_DeSerialize_ParamForma,
(void*)Axis_Create_ParamForma,
(void*)Axis_Delete_ParamForma,
are not executed. the function getCmplxArray is not
deserializing the forLadoArray.

the server stop with segmentation fault, executing the
function getElementAsFloat("puente",0));

What is wrong in the getCmplxArray() function?,
Arguments?, or What is wrong in the soap message?

any help is welcome.

Atanacio Reyes.

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