Click here to Skip to main content
15,922,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the XML transaction sent to the server in webservice call(consumed).
I'm developing an application to send datas from a local host to a server consuming a Web Server. In this application there are several methods that are working very well, but one of them doesn't work.
I send my code to the webserver constructor, but he ask me to send him the XML transaction sent to the server, not my code.
How can I do it?

VB
Sub IncluiMultimidia()
 Dim ws As New br.com.pronto.credenciados.Carga
 Dim strConexao As String
 Dim strCaminhoDb As String = "C:\Imobiliaria\Araujo Duarte\Pronto\"
                &"Carga Rede Pronto.mdb"
 Dim strConexao As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = & strCaminhoDb
 Dim dr As System.Data.OleDb.OleDbDataReader
 Dim strCaminhoFt As String
 Dim strSQL As String
 Dim strResult As String = ""
 Dim oCaminhoFt As String = ""
 strSQL = "Select * from IncluirMultimidia"
 Dim objcomando As New System.Data.OleDb.OleDbCommand(strSQL,    objConexao)
 Dim RegAtual As String = ""
 Dim strRetorno As String = ""
 Dim I As Integer = 0
 objConexao.Open()
 dr = objcomando.ExecuteReader
 Dim RegEmProcesso As Integer = 0
 Dim IncluiDiretorio As Boolean = False
 Dim IncluiArquivo As Boolean = False

 For Each dt In dr
   strCaminhoFt = DirFoto _
            & Trim(dt("codigo_unidade").ToString) _
            & "\" & _
   strRetorno = ws.IncluirMultimidia(Nome_usuario, _
                                           Senha_usuario, _
                                           dt("codigo_unidade"), _
                                           dt("codigo_multimidia"), _
                                           Codigo_Filial, _
                                           dt("titulo_multimidia"), _
                                           dt("codigo_tipo_multimidia"), _
                                           dt("indicador_destaque"), "", _
                                           dt("titulo_multimidia"), _
                                           fncBase64(strCaminhoFt))
Posted
Updated 24-Jun-10 20:27pm
v3
Comments
Abhinav S 25-Jun-10 1:13am    
You would need to post some code here before anyone can help you...

1 solution

Try writting the XML your application would send to the webserver to a file and then send the technician that file.

I think that is what they want to see, basically they want to see the structure and content of the XML
 
Share this answer
 
Comments
Ademir Duarte 26-Jun-10 10:15am    
Hi Rob,
Tks for your answer. I'm new in web programing.
How could I do this, I'm thinking in a serialization of the websercice. Is it correct?
Rob Branaghan 27-Jun-10 5:42am    
What are you trying to achieve from your webservice.

What it looks like from that bit of code is that you are using SQL to get a list of items and they are paths to images or something. Am I correct?

Are you trying to create something that you send XML to (Containing Parameters, Stored Procedure Name and so on) and then the service unpacks this xml and then runs the stored procedure, and then the results are then put into xml and returned.

Is that what you are attempting to do?
Rob Branaghan 27-Jun-10 5:50am    
You could look here on CodeProject for Serialisation XML and so on.
http://www.codeproject.com/KB/XML/xml_serializationasp.aspx (This is in C#, but there are converters online if you cannot understand C#)

Basically for the techician that asked for the XML, generate a file from your XML that you would send to the server, save the XML using XMLWriter or another method.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900