Estoy enviando un XML a un webservice HTTPS, y no me funciona, lo probe en el SOAPUI y al activar la casilla ADD DEFAULT WSA TO: funciona....
Como le puedo indicar al WS que mi XML va con esa condicion,, existe algun SETREQUESTHEADER???? u otra instruccion
FUNCTION PRUEBA()
cXmlBody := '' + ;
'<?xml version="1.0" encoding="UTF-8"?>' + ;
'<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">'+;
' <soap:Header>'+;
' </soap:Header>'+;
' <soap:Body>'+;
' <tem:Autenticar>'+;
' <tem:User>'+alltrim(ts_usuario)+'</tem:User>'+;
' <tem:Pass>'+alltrim(ts_clave)+'</tem:Pass>'+;
' </tem:Autenticar>'+;
' </soap:Body>'+;
'</soap:Envelope>'
//verifica si esta activo el servidor
// ohttp:=tipclienthttp():new(ts_servidor)
// if .not. ohttp:open()
// msgstop('Servidor Web '+ts_servidor,'Fuera de Servicio')
// return .f.
// endif
?cxmlbody
?ts_servidor
doc = CreateObject( "MSXML2.DOMDocument" )
ohttp=CreateObject( "Microsoft.XMLHTTP")
ohttp:Open( "POST" , ts_servidor,.f. )
ohttp:SetRequestHeader( "Accept-Encoding","gzip,deflate")
ohttp:SetRequestHeader( "Content-Type" , "application/soap+xml;charset=UTF-8" )
ohttp:SetRequestHeader( "SOAPAction" , "http://tempuri.org/IWcfCP/Autenticar" )
ohttp:SetRequestHeader( "User-Agent" , "Jakarta Commons-HttpCient/3.1" )
ohttp:setrequestHeader( "Host", "https://zofri.mekanosige.cl:2414" )
doc:LoadXML( cXmlBody )
ohttp:Send(doc:xml)
cresponse=ohttp:responseText
?cresponse
return