WebService in ASP.NET C#



How i can sent a xml schema to a webservice, then the webservice response to me another xml, so i need print the information of the xml in an interface, any help?


This is the xml that i sent:



</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<lis:consultarPedimentosPeticion>
<lis:peticion>
<lis:aduana>09001</lis:aduana>
<lis:patente/>
<lis:pedimento>2x131x44</lis:pedimento>
<lis:eDocumentCove/>
<lis:rfc/>
<lis:contenedor/>
<lis:guia/>
<lis:fechaInicio/>
<lis:fechaFin/>
</lis:peticion>
</lis:consultarPedimentosPeticion>
<con:consultarPartidaPeticion xmlns:con="url"/><con:numeroOperacion/><con:numeroPartida/></con:peticion></con:consultarPartidaPeticion></soapenv:Body>
</soapenv:Envelope>


and this is the response:



<wsu:Created>2014-08-02T20:00:27Z</wsu:Created>
<wsu:Expires>2014-08-02T20:01:27Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</S:Header>
<S:Body>
<ns2:consultarPedimentosRespuesta xmlns="url">
<ns3:tieneError>false</ns3:tieneError>
<ns2:pedimento>
<ns2:aduana>
<clave>111</clave>
<descripcion>CD.</descripcion>
</ns2:aduana>
<ns2:petente>360xx0</ns2:petente>
<ns2:numeroDocumentoAgente>2x131x44</ns2:numeroDocumentoAgente>
</ns2:pedimento>
</ns2:consultarPedimentosRespuesta>
</S:Body>
</S:Envelope>


How to sent and how to decode the xml. Thnaks


No comments:

Post a Comment