PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
Connection a un Webservice
Connection a un Webservice
Started by Dov, Feb., 20 2018 5:23 PM - No answer
Connect yourself…
Dov
#1
Registered member
109 messages
Popularité : +4 (4 votes)
Posted on February, 20 2018 - 5:23 PM
Bonjour a tous
je souhaite me connecter a un webservice, en l'occurence celui de SAP B1
mon code dans Fiddler me revoie les bonne infos mais de Windev j ai une erreur ce qui me laisse supposer que je le construit mal.
Si je ne met pas content lengh dans Header alors je recoir une erreur http/1.1 500 Bad Request 500
Mon erreur :
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Date: Tue, 20 Feb 2018 16:11:12 GMT
Connection: close
Server:
Pourriez vous m aider SVP merci
Mons Code :
ChangeCharset(charsetUTF8)
sXmlcotent is string UNICODE= [
<?xml version="1.0" encoding="UTF-8"?>
<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>B1admin</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>
]
sLenthxml is string = Length(sXmlcotent)
sXmlcotenlnegth is string = "Content-Length:"+""+sLenthxml
sHeader1 is string ="Host:127.0.0.1:8080"+CR+sXmlcotenlnegth+[CRLF]
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
"
HTTPGetResult(HTTPRequest(sIte,"YlanF",sHeader1,sXmlcotent,"application/json","B1iadmin","SAPB1Admin"))
Info( HTTPGetResult(httpHeader), HTTPGetResult(httpRésultat))
--
Dov
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
WEBDEV (earlier versions)
WINDEV Mobile (earlier versions)
Reports & Queries
Off-topic
Tools
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text