Forum Discussion

CarlotaVina's avatar
CarlotaVina
New Contributor
5 years ago

SOAPUI how to set a xml in a request

I have the following request

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sw="http://sw.ayudaaei.magrama.es" xmlns:fun="http://funcionario.sede.magrama.es">
<soapenv:Header/>
<soapenv:Body>
<sw:operacion>
<sw:xml>
<DatosFormulario>
<Titulo>PruebaJJ</Titulo>
<Prioridad>1</Prioridad>
<AreaPrincipal id="2">AGRICULTURA</AreaPrincipal>
<AreaSecundaria id="3">fertilizantes</AreaSecundaria>
<ProductosTFUE>
<Seleccion>0</Seleccion>
<No id="1">Forestal</No>
</ProductosTFUE>
<Producto id="2">PRODUCCIÓN VEGETAL - Cultivos herbáceos: Forrajes</Producto>
<Ayudas16.1>
<Seleccion>0</Seleccion>
<Numero />
<Nombre />
</Ayudas16.1>
<Ayudas16.2>
<Seleccion>0</Seleccion>
<Numero />
<Nombre />
</Ayudas16.2>
<Miembro1>
<Nombre>Juanjo Muñoz</Nombre>
<Nif>11111111H</Nif>
<Periodo1>1</Periodo1>
<Periodo2>2</Periodo2>
<Importe>3</Importe>
</Miembro1>
<Miembro2>
<Nombre>Juanjo García</Nombre>
<Nif>11111111H</Nif>
<Periodo1>3</Periodo1>
<Periodo2>4</Periodo2>
<Importe>7</Importe>
</Miembro2>
<Miembro3>
<Nombre />
<Nif />
<Periodo1>0</Periodo1>
<Periodo2>0</Periodo2>
<Importe>0</Importe>
</Miembro3>
<Miembro4>
<Nombre />
<Nif />
<Periodo1>0</Periodo1>
<Periodo2>0</Periodo2>
<Importe>0</Importe>
</Miembro4>
<Miembro5>
<Nombre />
<Nif />
<Periodo1>0</Periodo1>
<Periodo2>0</Periodo2>
<Importe>0</Importe>
</Miembro5>
<Miembro6>
<Nombre />
<Nif />
<Periodo1>0</Periodo1>
<Periodo2>0</Periodo2>
<Importe>0</Importe>
</Miembro6>
<Miembro7>
<Nombre />
<Nif />
<Periodo1>0</Periodo1>
<Periodo2>0</Periodo2>
<Importe>0</Importe>
</Miembro7>
<Miembro8>
<Nombre />
<Nif />
<Periodo1>0</Periodo1>
<Periodo2>0</Periodo2>
<Importe>0</Importe>
</Miembro8>
<ImporteTotal>10</ImporteTotal>
<ImporteTotalPeriodo1>4</ImporteTotalPeriodo1>
<ImporteTotalPeriodo2>6</ImporteTotalPeriodo2>
<ImporteAnticipo>5</ImporteAnticipo>
</DatosFormulario>
</sw:xml>
<sw:numeroRegistro>20180020001040</sw:numeroRegistro>
<sw:fechaRegistro>16/05/2018</sw:fechaRegistro>
<!--1 or more repetitions:-->
<sw:listaDocumentos>
<fun:idDocumento>?</fun:idDocumento>
<fun:idRepositorio>?</fun:idRepositorio>
<fun:idTipoDocumento>?</fun:idTipoDocumento>
<fun:nombre>?</fun:nombre>
</sw:listaDocumentos>
</sw:operacion>
</soapenv:Body>
</soapenv:Envelope>

 

 

The label <sw:xml> </sw:xml> is a xml. I checked this xml and it is well-formed.

 

When I submit the request, I get the error 

 

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>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">OP90010062</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

 

How I have to set a xml in a request, because the xml is well-formed?

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3
    Please try to validate your request; right click in the request editor and validate.

    If you still continue to have issue, it would be good to check with your team who know better about it.