1 Reply Latest reply on Jul 21, 2004 5:07 PM by 666705

    Weblogic Server 7.0: Error when sending SOAP request  with empty body

    666705
      Hi -
      Basically when a client sends an empty or unexpected SOAP request to my service, I'd like a well-definition response sent in return. Right now I get an "Internal Server error occured" and a NullPointerException server-side, as the operation within the request cannot be determined. See below. Is there some kind of error handler I can set though my WSDL to handle invalid operation requests sent from clients?


      When I send the following SOAP request to my service:
      <?xml version="1.0" encoding="UTF-8" ?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Header>
      <ns1:MessageID soapenv:mustUnderstand="0" xsi:type="xsd:string"
      xmlns:ns1="http://schemas.xmlsoap.org/ws/2003/03/addressing">uuid:92342854-fa2b-
      47ba-be81-9429c810cfde</ns1:MessageID>
      </soapenv:Header>
      <soapenv:Body>
      </soapenv:Body>
      </soapenv:Envelope>


      ...I generate the following error in my server:
      java.lang.NullPointerException
      at weblogic.webservice.core.DefaultPort.findOperation(DefaultPort.java:256)
      at weblogic.webservice.core.DefaultWebService.findOperation(DefaultWebService.java:206)
      at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.java:271)
      at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(ServletBase.java:419)
      at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebServiceServlet.java:277)
      at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:403)
      at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServlet.java:245)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java
      :5517)
      at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
      at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
      at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)