axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ketan Deshpande <>
Subject Newbie question for Doc/literal web service using Axis
Date Fri, 04 Mar 2005 03:54:11 GMT
Hi all!

I am a newbie at this, so please be gentle... 

I am trying to write a web service that is document-literal. I am 
following the
example give in the Axis guide:
(I am using axis-1_2RC2)

1. Create an interface & Compile it to .class
public interface MyWebService {
  public String concatenate(String str1, String str2);
2. Generate WSDL from it: 
java -classpath %MY_CLASSPATH% org.apache.axis.wsdl.Java2WSDL -o 
-u LITERAL --style DOCUMENT -l%MY_LOCATION% -n "urn:MyWebServiceNS"

3. Now generate server code from it:
java -classpath %MY_CLASSPATH% org.apache.axis.wsdl.WSDL2Java -W -s -S 
true -o
server.doc.generated myws.doc.wsdl

When I run this, I get a NullPointerException on the Server side, in 
Axis code.

SOAPMonitor shows the client sending this message in the envelope:
	<in0 xmlns="urn:MyWebServiceNS">A</in0>
	<in1 xmlns="urn:MyWebServiceNS">B</in1>

When I looked into the server code, I saw that the server skeleton was 
like RPC or Wrapped:
    public java.lang.String concatenate(java.lang.String in0, 
in1) throws java.rmi.RemoteException
        java.lang.String ret = impl.concatenate(in0, in1);
        return ret;

What am I doing wrong? Any pointers you can provide will be most 

Thanks much!


Ketan Deshpande

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message