WCF method not receiving the parameters
Posted
by
Thiago Sayão
on Stack Overflow
See other posts from Stack Overflow
or by Thiago Sayão
Published on 2012-12-13T10:47:14Z
Indexed on
2012/12/13
11:04 UTC
Read the original article
Hit count: 740
I have a WCF method that is not receiving the request parameters. But if I use the WCFTest client (the one that comes with visual studio) the method receives the parameters.
If I capture the requests, they look very similar:
If the request is this, it works:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<consultaValeCompra xmlns="http://tempuri.org/">
<dataMovto>1</dataMovto>
<numSeqOperacao>2</numSeqOperacao>
<numDocumento>3</numDocumento>
<valorDocumento>4</valorDocumento>
<tipo>5</tipo>
<codPreVenda>6</codPreVenda>
</consultaValeCompra>
</s:Body>
</s:Envelope>
If the request is this, I do not get the parameters:
<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>
<consultaValeCompra xmlns="http://valeCompra/jaws">
<dataMovto>121212</dataMovto>
<numSeqOperacao>003719</numSeqOperacao>
<numDocumento>000000000000005555466465454546</numDocumento>
<valorDocumento>000046400</valorDocumento>
<tipo>0</tipo>
<codPreVenda>0000000000</codPreVenda>
</consultaValeCompra>
</soapenv:Body>
</soapenv:Envelope>
The method signature is:
public Retorno consultaValeCompra(string dataMovto, string numSeqOperacao, string numDocumento, string valorDocumento, string tipo, string codPreVenda)
I can spot the differences, but I cannot understand why the first works and the second does not.
What can I do to make it work?
Thanks.
© Stack Overflow or respective owner