[英]Difference between “SOAPAction:” and “SOAPAction” HTTP request property
I was checking how to perform SOAP calls without using any library like jax-ws, just using a normal HttpURLConnection. 我正在检查如何不使用jax-ws之类的库而仅使用普通的HttpURLConnection来执行SOAP调用。 When reading documentation I found in some places 阅读文档时,我在某些地方找到了
conn.setRequestProperty("SOAPAction", soapAction); conn.setRequestProperty(“ SOAPAction”,soapAction);
And in other places 在其他地方
conn.setRequestProperty("SOAPAction:", soapAction); conn.setRequestProperty(“ SOAPAction:”,soapAction);
But I couldn't find the difference between these two headers. 但是我找不到这两个标头之间的区别。 Well, I found one, when using "SOAPAction:", if the action was misspelled, the ":" was like part of the name of the action. 好吧,我发现使用“ SOAPAction:”时,如果该动作拼写错误,则“:”就像是动作名称的一部分。
Does someone know the difference? 有人知道区别吗? Or is "SOAPAction:" simply wrong? 还是“ SOAPAction:”完全错误?
SOAPAction:
is wrong. SOAPAction:
错误。 HTTP adds the colon. HTTP添加冒号。 A colon isn't allowed in a header name, in fact. 实际上,标头名称中不允许使用冒号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.