fengwenxing 发表于 2012-11-8 14:46:46

Loadrunner 模拟手机向服务器发请求,求高手看看我写得对不对。。

Action()
{
web_add_header("User-Agent"," Apache-HttpClient/UNAVAILABLE (java 1.4)");
web_add_header("Cookie"," JSESSIONID=+UDQAPnJD6M2s-ZcIFTmjdcT; CURRENTUSERINFO={\\\"username\\\":\\\"jack\\\"}; lan=en");
web_add_header("Cookie2"," $Version=1");
web_custom_request("Action",
      "URL=http://192.168.10.30:8085/SCMVisibility/rest/scm/mobile/packingTaskFinish/",
      "Method=POST",
      "Mode=HTTP",
       "EncType=application/x-www-form-urlencoded; charset=UTF-8",
        "Body=taskId=73115&productId=0200000002000004&productId=0200000002000002&productId=0200000001000003&productId=0200000001000001",
LAST);



报错:
Action.c(35): 错误 -26612: 对于“http://192.168.10.30:8085/SCMVisibility/rest/scm/mobile/packingTaskFinish/”,HTTP 状态代码=500 (Internal Server Error)       


13:49:59,682 ERROR ...] (http-0.0.0.0-0.0.0.0-8085-1) Servlet.service() for servlet Jersey Spring Web Application threw exception: java.lang.NumberFormatException: null
      at java.lang.Long.parseLong(Long.java:375) [:1.6.0_27]
      at java.lang.Long.parseLong(Long.java:468) [:1.6.0_27]
      at com.digitnexus.scm.service.MobileAgentAppServiceImpl.finishPackingTask(MobileAgentAppServiceImpl.java:105)
      at sun.reflect.GeneratedMethodAccessor1185.invoke(Unknown Source) [:1.6.0_27]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_27]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_27]
      at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
      at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)

fengwenxing 发表于 2012-11-8 14:51:15

求高手。。。。

fengwenxing 发表于 2012-11-8 15:05:05

求高手。。。。。
页: [1]
查看完整版本: Loadrunner 模拟手机向服务器发请求,求高手看看我写得对不对。。