• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue in deploying the web service

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am facing the below issue, when trying to give the following in command prompt:

java org.apache.axis.client.AdminClient server-config.wsdd

When i do this, i am getting the following error:

Exception in thread "main" java.lang.AbstractMethodError: javax.xml.parsers.SAXP
arser.getXMLReader()Lorg/xml/sax/XMLReader;
at org.apache.axis.utils.XMLUtils.getSAXParser(XMLUtils.java:270)
at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
Context.java:224)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)


My classpath is as following:

.;D:\j2sdk1.4.2_04\lib;D:\axisjars\axis.jar;D:\axisjars\axis-ant.jar;D:\axisjars\commons-logging.jar;D:\axsjars\j2ee.jar;D:\axisjars\log4j.jar;D:\axisjars\wsdl4j.jar;D:\axisjars\xerces.jar;D:\axisjars\xmlsec.jar;D:\axisjars\soap.jar;D:\axisjars\xercesImpl.jar;D:\axisjars\commons-discovery.jar;D:\axisjars\saaj.jar;D:\axisjars\jaxrpc.jar;d:\axisjars\mail.jar;d:\axisjars\activation.jar;



Ranchers! Please help me solve this issues

Thanks in advance!
Srini :roll:
 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers!

Still awaiting your inputs!

Srini
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This could be because of the xercesImpl.jar, try with a new version of xerces.
 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amit,

Thanks once again!

Infact my xercesImpl.jar was not the latest. The problem got solved when I changed it. but the new problem which arose was this:

When I tried to deploy the wsdd file from the command prompt using:

java org.apache.axis.client.AdminClient server-config.wsdd

I am getting the following error:

Processing file server-config.wsdd
Exception: AxisFault
faultCode: {http://xml.apache.org/axis/}Server.NoService
faultSubcode:
faultString: The AXIS engine could not find a target service to invoke! target
Service is null
faultActor:
....


My wsdd file is as following:

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="MyFirstService" provider="java:RPC">
<parameter name="className" value="samples.math.Calculator"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="scope" value="application"/>
</service>
</deployment>
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is your server side web service code deployed in the war? I guess you are using Tomcat web server. Also do you have the Axis Servlet mapping in the web.xml? Unless you copied the entire axis folder in the webapps directory.
 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amit,

Thanks for the instant reply.

Yes, i am using Axis along with tomcat. I have copied the axis folder on to my web-app under the home directory of the server. In web.xml, i do have the mapping for AxisServlet, which has been mapped as following:

<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>


Thanks
Srini
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the class "samples.math.Calculator", did you do jar of all the server side classes and put it in the webapps/axis/lib/
 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amit,

I did not make a jar, rather i have put the file in the directory axis\WEB-INF\classes\samples\math as .java file. I have even compiled the file.

The file is as following:
package samples.math;

public class Calculator {
public int add(int i1, int i2) {
return i1 + i2;
}

public int subtract(int i1, int i2) {
return i1 - i2;
}
}


Also, when access the url http://localhost:8080/axis/Calculator.jws, i see the link "Click to see the WSDL". But when I click on the link, i get a 'page not found error'.
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you deploying your webservice as JWS? May be you can read the tutorial. Hope this helps.
 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amit,

Infact I am following the same tutorial. I find the issue, in regard to the procedure given in the tutorial. I have not changed anything in regard to the tutorial.

Apart from the above mentioned issue, as per the tutorial when i access
http://localhost:8080/axis/Calculator.jws?WSDL, the page not found error crops up.

Thanks
Srini
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just rename your Calculator.java to Calculator.jws and put it directly under the webapps/axis/ folder. Also remove the package names from the Calculator.jws if it doesn't work, bounce Tomcat and it should work.

I tried the second example couple of days back in Tomcat 5.1 Server and it worked. I had tried the calculator example on weblogic some 1 year back and I remember that it worked for me.
 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amit,

Thanks once again for your reply!

I have already done that. That is, changed the java file to jws file and put it inside the web-app directory. But still, i am facing the same problem.

Really getting uncomfortable with this! None of the web service wsdl is showing up...I am exactly doing the same thing in the tutorial! But, its not working!

Thanks
Srini
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic