我正在向需要肥皂请求的服务器发出卷曲请求。我正在发送此:
curl -s 'https://somewebservice/getuser.asmx' \
-H 'Content-Type: text/xml' \
-d '<?xml version="1.0" encoding="utf-16"?>
<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2003/05/soap-envelope">
<Body>
<GetUser xmlns="urn:mycompany:WebSecurity:WebServices">
<userID>XXXXXXXX</userID>
</GetUser >
</Body>
</Envelope>'
服务器几乎返回我正在等待的响应,除了某些 << / em>和> 符号是 url的事实编码吗?是否有意义。例如:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body>
<GetUserResponse xmlns="urn:mycompany:WebSecurity:WebServices">
<userIdResult>
<UsersInfo><
User UserID="XXXXXX" FirstName="XXXXX" MidIntial="XXXXX" LastName="XXXXX" /></UsersInfo>
</userIdResult></GetUserResponse ></soap:Body></soap:Envelope>
我几乎可以确定服务本身正在执行此操作,并且与我的curl格式无关。但是我想先确认一下。
有人知道我在这里做错了吗?