Spanish Realizar un POST

Jordi Morente

Member
Licensed User
Buenas tardes,

Realizo un POST :

'
Dim Obj As Map
Obj.Initialize
Obj.Put("IdService","180001")
Obj.Put("Client",iClient.text )
Obj.Put("ClientName",iNom.text)
'
Obj.Put("MaterialPending","N")
Obj.Put("DateOrder","04/04/2018")
Obj.Put("Final","N" )
Obj.Put("InProcess","N")
Obj.Put("IsUrgent","N" )
Obj.Put("Total","0")
'
Obj.Put("CP",iCodPost.text)
Obj.Put("Dir",iDir.text )
Obj.Put("Pob",iPob.text)
Obj.Put("Prov",iProv.text)
Obj.Put("NIF",iNIF.text)
Obj.Put("TelF",iTelF.text)



Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(Obj)

Dim Data As String

Data =JSONGenerator.ToString
'

Dim job2 As HttpJob
'
job2.Initialize("Job2", Me)
'
job2.PostString(m_url & "/api/Serveis",Data )
'
BuscaCli.mi_SelectedCliId=""
'
ProgressDialogShow2("LLegint dades ...", False)
'



Funciona correctamente, crea el string json y responde: Job.Success

El problema es que llega al Service pero no contiene información.

' POST: api/Serveis
Public Sub PostValue(<FromBody()> ByVal value As String)
'
Dim m_Serv As New Serveis
Dim mConfig As cConfig = cConfig.Instancia()
'
mConfig.m_DataSource = ConfigurationManager.AppSettings("datasource")
mConfig.m_Database = ConfigurationManager.AppSettings("database3")
mConfig.m_Database = Replace(mConfig.m_Database, "*", "01")
'
mConfig.m_UserId = ConfigurationManager.AppSettings("userid")
mConfig.m_Password = ConfigurationManager.AppSettings("password")
mConfig.m_DataBaseType = ConfigurationManager.AppSettings("databasetype")
'
m_Serv.Insert(value)
'
End Sub


El string value està vacio.

¿Alguien puede ayudarme?

Saludos,
 
Top