Home > Back-end > C builder 2007 use webservice how to join the authentication information?
C builder 2007 use webservice how to join the authentication information?
Time:10-03
Such as: I use c + + builder2007 made a the end of the service, you need to call the service side (Java) to provide the interface, but the server set up account, password How do I put the account and password to join in?
CodePudding user response:
Java how to add, you how to add,
CodePudding user response:
According to the WSDL generated code, not set account, password interface function, should be added to soapheader key is don't know how to operate?
CodePudding user response:
Soapheader does not support pack to send directly! //tests directly to ok Int iret=0; HTTPRIO1 - & gt; HTTPWebNode - & gt; SoapAction="http://WebXml.com.cn/getWeatherbyCityName"; Iret=HTTPRIO1 - & gt; HTTPWebNode - & gt; Send (" & lt; ? The XML version=\ \ "1.0" encoding=\ "utf-8 "?> \ n \ XMLNS: XSD=\ \ "http://www.w3.org/2001/XMLSchema" XMLNS: soap=\ \ "http://schemas.xmlsoap.org/soap/envelope/" & gt; \ n \ \ n \ 54511 & lt;/theCityName> \ n \ \ n \ \ n \ \ n \ "); PStream TStringStream *=new TStringStream (" "); If (iret) HTTPRIO1 - & gt; HTTPWebNode - & gt; The Receive (iret, pStream);