PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → WebService Post Method soap httprequest
WebService Post Method soap httprequest
Started by Fitoussi YLAN, Feb., 18 2018 6:22 PM - 1 reply
Posted on February, 18 2018 - 6:22 PM
Hello i try get work my webservice connect the to the bi of sap business.
I must say that I execute this request with fidler program and everything work fine i get the result.
This is my code :

ChangeCharset(charsetOccidental)
sXmlcotent is string = [







GetBalance
Get
1.0
B1iadmin
SAPB1Admin

TR


Select ItemCode,ItemName from OITM






]
site is string = "http://127.0.0.1:8080/B1iXcellerator/exec/soap/vP.001sap0003.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc"

l_ws is httpRequest
cMyResponse is httpResponse
l_ws.URL = site
l_ws.Method=httpPost
l_ws.Content = sXmlcotent
l_ws.User = "B1iadmin"
l_ws.Password = "SAPB1Admin"
l_ws.ContentType="text/xml"
l_ws.UserAgent = "ylan"
cMyResponse = HTTPSend(l_ws)
EDT_Text1=cMyResponse..Content
Info(l_ws..Content)

In the bi of sap i get my request but wrong something like i didn't get content
anyone know what is do wrong ?
Posted on February, 19 2018 - 11:35 AM
sXmlcotent is string = [
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
<SOAP-ENV:Body>
<GetCustomerBalance>
<BPName>
<Request>
<Header>
<EntityName>GetBalance</EntityName>
<Operation>Get</Operation>
<Version>1.0</Version>
<UserName>B1iadmin</UserName>
<Password>SAPB1Admin</Password>
<Domain></Domain>
<Company>TR</Company>
</Header>
<Body>
<Query>Select ItemCode,ItemName from OITM</Query>
</Body>
</Request>
</BPName>
</GetCustomerBalance>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
]

This is my xml