Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


 

Java Tutorials


 

 

Struts Tutorials

Struts Resources

Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Webservices Web Services Development

User Comments
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl
  Blink   Furl   Simpy   Y! MyWeb 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

26 comments so far (post your own) View All Comments Latest 10 Comments:

Sir, could we maintain concurrency in online banking transactions by relaxing isolation property ?

Posted by sandosh on Thursday, 05.13.10 @ 07:53am | #96995

Your code example does not work. It gives the following error when generating the wsdl file from the wsdd.

Fault - ; nested exception is:
org.apache.axis.InternalException: java.lang.Exception: The OperationDesc for getMimeData was not synchronized to a method of AttachmentService.

Posted by Paul on Wednesday, 10.7.09 @ 17:32pm | #91513

Hi there.
Can somebody give me the WSDL to do web service like in this tutorial? I have the working web service and I have to add new method which returns the DIME attachment. What should I add to the WSDL? I can't nowhere find any sample or tutorial with (top-down) web service using DIME attachments. Please help me. Any tips would be good for me.

Posted by dime on Wednesday, 09.9.09 @ 16:41pm | #90738

Hi there.
Can somebody give me the WSDL to do web service like in this tutorial? I have the working web service and I have to add new method which returns the DIME attachment. What should I add to the WSDL? I can't nowhere find any sample or tutorial with (top-down) web service using DIME attachments. Please help me. Any tips would be good for me.

Posted by dime on Wednesday, 09.9.09 @ 16:40pm | #90737

Hi..
Very usefull.
And sample language explanation.
Every day atleast once a java developer needs to open our site.

No more words from my end to express my feelings.
Thanks lot to Rose India Team.



Posted by raghavendra reddy on Wednesday, 08.26.09 @ 16:12pm | #90322

Please provide any sample application using webservices in struts framework.

Posted by madhavi on Friday, 01.30.09 @ 03:48am | #84314

Thanks Murthy,provided information is really good,it would be helpful if you specify the process for creation of stubs and skeltons.Any have very... thankful

Regards
Rajendra.

Posted by Rajendra on Tuesday, 01.6.09 @ 05:46am | #83524

The web services tutorial was easy to understand and simply suberb.

Posted by Sathyanarayanan on Thursday, 07.31.08 @ 23:44pm | #70151

its really useful for me....and if you find time..could u plz send the SOAP request and Response of it

Posted by sridhar on Wednesday, 07.9.08 @ 15:41pm | #66437

This has really helped a lot and i was deploying the services on Sun one web server and it worked fine. Thanks Very much for such a detail explaination.

Posted by Kranthi on Wednesday, 06.18.08 @ 00:13am | #63642

please help in consuming .net web service through axis client

Posted by Prashanth on Wednesday, 06.11.08 @ 17:02pm | #63021

I am using all the classes provided with the zip file for generating the webservices and i am using eclipse 3.2 but when i am trying to generate the web service it's showing the DataHandler class is not compatible with JAX-RPC 1.1 specification.Please provide me the solution.

Posted by Satyajit Champatiray on Thursday, 04.10.08 @ 18:32pm | #55845

I tried this Article..I is compiled successfully.It deplyed .and then try this client code.It is also compiled and then i run this coding,,the follwings are come:
C:\Test\TRY\DataHadler\mar12\Vin>java Client

log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.



My doubt is: How to get the result? Is the file "input.xml" will be store in somewhere? How to idetify? Anybody please clear my doubt..

Posted by P.Vinodha on Thursday, 03.13.08 @ 19:10pm | #52609

i am not able to download axis1.2, so please kindly provide axis1.2

Posted by imashe on Tuesday, 02.5.08 @ 16:30pm | #47297

java.io.Exception: Type <AttachmentService> DataHandler is referenced but not defined
at org.apache.axis.wsdl.symbolTable.checkForUndefined<SymbolTable.java>

org.apache.axis.wsdl.symbolTable.add(SymbolTable.java)

org.apache.axis.wsdl.symbolTable.populate
<SymbolTable.java>

please help me in resolving this issue

Posted by Lakshmi on Friday, 01.25.08 @ 15:31pm | #46125

Excellant ..no other word...no word infact!

Posted by Preeti on Wednesday, 12.12.07 @ 20:02pm | #41960

I'm tyro in Java.Your document is really useful.

Posted by sujeeth on Tuesday, 10.16.07 @ 10:33am | #33887

Hello there,

Many thanks for this article that is very usefull to me as i need to implement a webservice with attachment

Unfortunately, running the example from the source i get this exception while running the client test:

Exception:
java.lang.SecurityException: invalid SHA1 signature file digest for javax/mail/internet/AsciiOutputStream.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)
at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at java.lang.ClassLoader.getSystemResourceAsStream(Unknown Source)
at java.lang.Class.getResourceAsStream(Unknown Source)
at javax.activation.MailcapCommandMap.loadResource(MailcapCommandMap.java:173)
at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:155)
at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:55)
at javax.activation.DataHandler.getCommandMap(DataHandler.java:146)
at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:578)
at javax.activation.DataHandler.getInputStream(DataHandler.java:232)
at javax.activation.DataHandlerDataSource.getInputStream(DataHandler.java:668)
at org.apache.axis.attachments.MimeUtils.getContentLength(MimeUtils.java:115)
at org.apache.axis.attachments.MimeUtils.getContentLength(MimeUtils.java:60)
at org.apache.axis.attachments.AttachmentsImpl.getContentLength(AttachmentsImpl.java:438)
at org.apache.axis.Message.getContentLength(Message.java:512)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at wskayentis.webservices.attachments.Client.testDataRetrieval(Unknown Source)
at wskayentis.webservices.attachments.Client.main(Unknown Source)
- Exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.SecurityException: invalid SHA1 signature file digest for javax/mail/internet/AsciiOutputStream.class
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.SecurityException: invalid SHA1 signature file digest for javax/mail/internet/AsciiOutputStream.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)
at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at java.lang.ClassLoader.getSystemResourceAsStream(Unknown Source)
at java.lang.Class.getResourceAsStream(Unknown Source)
at javax.activation.MailcapCommandMap.loadResource(MailcapCommandMap.java:173)
at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:155)
at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:55)
at javax.activation.DataHandler.getCommandMap(DataHandler.java:146)
at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:578)
at javax.activation.DataHandler.getContent(DataHandler.java:511)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1055)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1914)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1895)
at org.apache.axis.attachments.MimeUtils.writeToMultiPartStream(MimeUtils.java:201)
at org.apache.axis.attachments.AttachmentsImpl.writeContentToStream(AttachmentsImpl.java:493)
at org.apache.axis.Message.writeTo(Message.java:545)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:511)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at wskayentis.webservices.attachments.Client.testDataRetrieval(Unknown Source)
at wskayentis.webservices.attachments.Client.main(Unknown Source)

{http://xml.apache.org/axis/}hostname:COF33198


I tried to change mail.jar to mail1-4.jar and also change the default compiler compliance level, but it doesnt help

Does anybody could give a hint on that purpose?
i 'm using myeclipse as the ide on windows and my java version is:
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

any help would be very much appreciated , thanks!

Posted by varasse on Wednesday, 10.3.07 @ 21:22pm | #31323

It is giving me same error as that of Sudha.

java.io.IOException: Type {AttachmentService}DataHandler is referenced but not defined.
at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:595)

Please help me to solve this problem.

Posted by Bhoomica on Wednesday, 10.3.07 @ 17:19pm | #31313

A very good and complete guide for newbies who doesn't familiar with web service

Posted by Cycmark on Wednesday, 09.12.07 @ 14:49pm | #26828

Good point to start understand all about webservice.
I have seen many source information about this issu and that is the best in my opinion.

Posted by Denilson Marcos on Thursday, 08.16.07 @ 01:47am | #23473

help me to develop web services

Posted by senthooran on Thursday, 08.9.07 @ 15:08pm | #23014

hi fnds...
i trying to develop a simple java webservice by using eclipse IDE...i am trying to access a service that is calculating simple interest which is in remote mechine...my client pgm is a simple struts ...that is a jsp page contains 3 text fields..p,n,r..after successfully creating the stub i try to acess the service...but an error occured...that is as follows.....
................................................
java.lang.NoClassDefFoundError: org/apache/axis2/databinding/ADBBean
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:873)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1326)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at b.pk.FirstAction.execute(FirstAction.java:28)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
java.lang.NoClassDefFoundError: org/apache/axis2/databinding/ADBBean
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:873)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1326)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at b.pk.FirstAction.execute(FirstAction.java:28)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
.................................................
plse help me....

Posted by renjith.vr on Friday, 07.13.07 @ 13:32pm | #21201

thaks a lot for this article it helped me a lot, as i am researching a posibility of using SwA or MIME/DIME for streaming date.
I am writing a web service that uses soap with attachments to send a very large streaming data,
The concept works quite well but when I started to test it I got this problem.
When my client program calls a method that should return a real time data the streaming starts after 10 seconds
How can I avoid the fact that the message calls waits that long before the data starts streaming in?
To be more specific
I have a method that returns a streaming data in 10 seconds [getSteamingData(long seconds)]
I would like to test if I already get some data steaming in after one second of it starts.
To do so I started a thread that checks the OutputSteam size every 1 second and then compare the result with the previous size say a second ago, there should be an increase in size each second!!!
But when I start the thread… the streaming does not start right away instead, it starts after 10 seconds causing the thread to return null size
In real life with real large streaming data that 10 seconds could be 10 hours or God forbidden 10 years
thanks in advance

Posted by roai on Thursday, 06.28.07 @ 18:10pm | #20331

It is throwing the error as follows while running WSDL2Java command

java.io.Exception: Type <AttachmentService> DataHandler is referenced but not defined
at org.apache.axis.wsdl.symbolTable.checkForUndefined<SymbolTable.java>

org.apache.axis.wsdl.symbolTable.add(SymbolTable.java)

org.apache.axis.wsdl.symbolTable.populate
<SymbolTable.java>
.........................................


.................

Please help me to resolve this issue

Thanks
Sudha

Posted by sudha on Friday, 06.15.07 @ 14:54pm | #19307

im from brazil and looking a example for that..
excelent work..

Posted by Rodrigo Daroz on Friday, 05.18.07 @ 01:21am | #16307

Ask programming questions?

 

 

Back to Tutorial

 

  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name

 

 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.