我有一个特定的要求,我必须从我的活动中在浏览器上触发一个URL.我可以使用以下代码执行此操作:
String finalUrl = "http://localhost:7001/display/result.jsp?param=12345";
Intent browserIntent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(finalUrl));
Run Code Online (Sandbox Code Playgroud)
现在,我想通过在请求中传递'param'作为请求头而不是queryString本身来调用result.jsp.
有人可以建议吗?
非常感谢提前
编辑 即使请求正文中带有'param'的POST请求也应该没问题.
编辑2 接受的答案是POST请求,而不是标题.
我正在开发一个Android应用程序,我需要将每个联系人的生日与当前日期相匹配,如果是肯定的,则处理一些业务逻辑,这需要完整的联系人详细信息.
我已经找到了分别阅读联系人生日或联系人自己的方法,但对于如何将两者结合起来感到困惑.有人可以提供一些方向.
谢谢
我在应用程序中创建一个警报,每天早上8点运行并处理一些业务逻辑.有人可以确认在卸载应用程序时是否会自动杀死/删除警报?或者我是否需要专门处理PACKAGE_REMOVED删除警报的意图?
非常感谢提前.维奈
我的任务是为更新操作编写Web服务,其中将对象列表传递给该方法.
@WebMethod(operationName = "updateObjects", action = "urn:preferences")
public boolean updateObjects(List<MyObject> objects){
}
Run Code Online (Sandbox Code Playgroud)
MyObject类很简单.
@XmlRootElement(name="Object")
public class MyObject{
private String item1;
private String item2;
}
Run Code Online (Sandbox Code Playgroud)
现在问题陈述.当我查看此方法的SOAP请求(为我生成的SOAP UI)时,请求如下所示:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pref="preferences">
<soapenv:Header/>
<soapenv:Body>
<pref:updateObjects>
<!--Zero or more repetitions:-->
<arg0>
<!--Optional:-->
<item1>?</item1>
<!--Optional:-->
<item2>?</item2>
</arg0>
</pref:updateObjects>
</soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)
但我希望它看起来像下面.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pref="preferences">
<soapenv:Header/>
<soapenv:Body>
<pref:updateObjects>
<!--Zero or more repetitions:-->
<Objects>
<Object>
<!--Optional:-->
<item1>?</item1>
<!--Optional:-->
<item2>?</item2>
</Object>
<Object>
<!--Optional:-->
<item1>?</item1>
<!--Optional:-->
<item2>?</item2>
</Object>
</Objects>
</pref:updateObjects>
</soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)
有人可以请一下建议.提前致谢.