Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NEWBIE SOAP: Error building response envelope: java.lang.NullPoniterException

19 views
Skip to first unread message

Jan Roos

unread,
May 6, 2003, 7:40:57 AM5/6/03
to
Hello,
I built my first webservice with tomcat and soap but I get an error when I
try to use it:
I got the AddressBook example running.

Thank You in advice!
Jan Roos

Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Protocol;
msg=Unsupported response content type must be text/xml. Response was:
javax.servlet.ServletException: Error building response envelope:
java.lang.NullPointerException
at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:41
8)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
...
I made my example as simple as I could:

// BankClient.java
public class BankClient {
public static void main (String[] args) throws Exception {
URL url = new URL(
"http://localhost:8080/soap/servlet/rpcrouter");
Call call = new Call();
call.setTargetObjectURI("urn:Bank-account");
call.setMethodName("deposit");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Response resp = call.invoke(url, ""); // invoke deposit()
if ( resp.generatedFault() )
System.exit(0);
}
}

// BankService.java
public class BankService {
public void deposit() {
return ;
}
}

My service descriptor:

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:Bank-account">
<isd:provider type="java"
scope="Application"
methods="deposit">
<isd:java class="BankService" static="false" />
</isd:provider>
<isd:faultListener>
org.apache.soap.server.DOMFaultListener
</isd:faultListener>
</isd:service>


Andreas Christiansen

unread,
May 27, 2003, 4:28:49 AM5/27/03
to
Hi Jan,

I have encountered the same problem. The solution sis to create a java
archive containing the classes and publish it to the
%CATALINA_HOME%\webapps\soap\WEB-INF\lib folder.

Hope this helps and is not too late for you...


Greetings,
Andy

0 new messages