You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Mukesh Bablani <mu...@ezcommerceinc.com> on 2002/03/05 20:54:33 UTC

ApacheSOAP2-2 and Weblogic6.1

Hi
	I am trying to deploy a simple EJB running in WLServer6.1 as a Web
Service. I am using Apache SOAP2.2 kit for the same, which is working
properly for simple Java Classes hosted as Web Service.
	When I run the client which accesses a simple EJB I get the
following exception

Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=A
'http://schemas.xmlsoap.org/soap/envelope/:F
ault' element must contain a: 'faultcode' element.;
targetException=java.lang.IllegalArgumentException: A 'http://schema
s.xmlsoap.org/soap/envelope/:Fault' element must contain a: 'faultcode'
element.]
        at org.apache.soap.rpc.Call.invoke(Call.java:246)
        at samples.weblogic_ejb.ejbtest.main(ejbtest.java:122)


THE FOLLOWING IS SOAP message as sent from client side

POST /soap/servlet/rpcrouter HTTP/1.0 Host: localhost Content-Type:
text/xml; charset=utf-8 Content-Length: 443 SOAPAction: ""  <?xml
version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:hello
xmlns:ns1="urn:ejbhello"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <symbol
xsi:type="xsd:string">myhello</symbol> </ns1:hello> </SOAP-ENV:Body>
</SOAP-ENV:Envelope> 


The next is the SOAP return

HTTP/1.0 500 Internal Server Error Date: Tue, 05 Mar 2002 18:32:05 GMT
Server: WebLogic WebLogic Server 6.1 SP1  09/18/2001 14:28:44 #138716
Content-Length: 1708 Content-Type: text/xml; charset=utf-8 Set-Cookie:
JSESSIONID=PIUPJq9FxDRUi2dvjxkBim2cxM7NGIucLLvoibofYYjOqTm1BaOs!112427063!-1
062730803!6001!6002; path=/ Connection: Close  <?xml version='1.0'
encoding='UTF-8'?> <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body>
<SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>Error
in connecting to EJBjavax.naming.NameNotFoundException: Unable to resolve
samples.weblogic_ejb.HelloService Resolved: 'samples'
Unresolved:'weblogic_ejb' ; remaining name 'HelloService'</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor> <detail>
<stackTrace>[SOAPException: faultCode=SOAP-ENV:Server; msg=Error in
connecting to EJBjavax.naming.NameNotFoundException: Unable to resolve
samples.weblogic_ejb.HelloService Resolved: 'samples'
Unresolved:'weblogic_ejb' ; remaining name 'HelloService'] 	at
org.apache.soap.providers.StatefulEJBProvider.locate(StatefulEJBProvider.jav
a:296) 	at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:28
5) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265) 	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200) 	at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456) 	at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2039) 	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) </stackTrace>
</detail> </SOAP-ENV:Fault>  </SOAP-ENV:Body> </SOAP-ENV:Envelope>


The message in WebLogic Log files is as below
java.lang.NullPointerException
        at
weblogic.servlet.internal.ChunkOutput.clearBuffer(ChunkOutput.java:231)
        at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:251)
        at
weblogic.servlet.internal.ChunkOutputWrapper.flush(ChunkOutputWrapper.java:1
52)
        at
weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamI
mpl.java:119)
        at
org.apache.soap.transport.TransportMessage.writeTo(TransportMessage.java:462
)
        at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:34
7)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2039)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
<Mar 5, 2002 10:32:08 AM PST> <Error> <HTTP>
<[WebAppServletContext(5840950,soap,/soap)] Servlet failed with ServletExce
ption
javax.servlet.ServletException: Error building response envelope:
java.lang.NullPointerException
        at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:35
3)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2039)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Rgds,
Mukesh