我正在尝试从 Amazon WSDl 创建自己的服务。从 wsdl 到 wsdl 2.0 到 Java 的步骤运行良好。甚至 ant 编译服务也没有错误。将服务上传到 Axis2 后,将显示所有操作。但是如果我尝试调用一个操作,我总是会得到 NullpointerException。
以下是详细信息:
Glassfish 3.1.2 with axis2 1.6.2 on Windows 7 64-Bit, Java 1.7.0_25 JDK
HTTP 调用
POST /axis2/services/SimpleQueueService/CreateQueue HTTP/1.1
Host: localhost:8080
X-Amz-Date: 20130715T220823Z
User-Agent: aws-sdk-java/1.4.7 Windows_7/6.1 Java_HotSpot(TM)_64-Bit_Server_VM/23.25-b01
Content-Type: application/x-www-form-urlencoded
Content-Length: 17
Proxy-Connection: Keep-Alive
QueueName=MyQueue
答案始终是内部服务器错误,glassfish“server.log”中出现以下错误:
[#|2013-07-17T16:38:28.060+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=201;_ThreadName=Thread-2;|StandardWrapperValve[AxisServlet]: PWC1406: Servlet.service() for servlet AxisServlet threw exception
java.lang.NullPointerException
at org.apache.axis2.builder.BuilderUtil.buildsoapMessage(BuilderUtil.java:142)
at org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURLEncodedBuilder.java:118)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:179)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
at org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(RESTUtil.java:65)
at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processXMLRequest(AxisServlet.java:826)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:227)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:724)
|#]
我试图编译最后一个axis2-snapshot,但glassfish不接受它。(例外...)
谁能给我一些提示?