You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ji...@SunGard.com on 2002/06/13 16:48:53 UTC

axis beta 2 in Win2k with TomCat from the JavaTM Web Services Developer Pack 1.0

Axis seems to be having a problem returning wsdl for a .jws service.
Items 1-7 show all the clues I have.
Anybody have an idea as to what is wrong?
Any help is surely appreciated.


1. Simple jws file
public class MyMath
{
     public int squared(int x)
     {
          return x * x;
     }
}
saved in tomcat home 's webapps dir as MyMath.jws

2. Typing http://localhost:8080/axis/MyMath.jws?wsdl in the browser does
not return anything. A blank page. View source displays
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

3.
                                                                                  
                                                                                  
                                                                                  
 java org.apache.axis.wsdl.WSDL2Java "http://localhost:8080/axis/MyMath.jws?wsdl" 
 from the command line                                                            
                                                                                  
                                                                                  


returns
- Exception:
org.xml.sax.SAXException: Fatal Error:
URI=http://localhost:8080/axis/MyMath.jws?wsdl Line=1: Document root
element is missing.
     at
org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:472)
     at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3185)
     at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
     at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
     at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
     at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
     at
org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
     at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:243)
     at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:256)
     at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:151)
     at org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(WSDL2Java.java:725)
     at java.lang.Thread.run(Thread.java:536)
java.io.IOException: Unable to retrieve WSDL document:
http://localhost:8080/axis/MyMath.jws?wsdl
     at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:153)
     at org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(WSDL2Java.java:725)
     at java.lang.Thread.run(Thread.java:536)

Which I guess is because of the same problem as #1.

4.  Axis seems to be installed and running because
http://localhost:8080/axis/servlet/AdminServlet returns
Server is running


start server


stop server


and http://localhost:8080/axis/servlet/AxisServlet


returns


And now... Some Services
     Version
          main
          getVersion
     AdminService
          main
          class$
          process
          getOptions
          getOptions
          listConfig
          registerTypeMappings
          registerTypes
          AdminService
          processWSDD
          registerChain
          registerService
          registerHandler
          registerTransport
          registerTypeMapping


5. webapps\axis\web-infjwsclasses has the MyMath.class file in it as if
axis did compile the jws file


6.  Making an intentional error in the MyMath.jws and then typing
http://localhost:8080/axis/MyMath.jws?wsdl in the browser returns


AXIS error


Sorry, something seems to have gone wrong... here are the details:


Error while compiling:  C:
\jwsdp-1_0\webapps\axis\WEB-INFjwsClasses\MyMath.java


However, the MyMath.java is not in the path displayed.


So this also leads me to think Axis is installed and at least trying to
work.





7. Finally, typing http://localhost:8080/axis/anythingyouwanttotype.jws
into the browser returns


axis/anythingyouwanttotype.jws


Hi there, this is an AXIS service!


Perhaps there will be a form for invoking the service here...


even when that jws file is non existent.


This might be just a different Axis bug.
















Jim Jackson
SunGard EBS

 Confidentiality Notice:

The information contained in this e-mail message is intended only for the
personal and confidential use of the recipient(s) named above.  This
message may contain confidential information.  If the reader of this
message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this document in error and that any review, dissemination,
distribution, or copying of this  message is strictly prohibited.  If you
have received this communication in error, please notify us immediately by
e-mail, and delete the original message.


Re: axis beta 2 in Win2k with TomCat from the JavaTM Web Services Developer Pack 1.0

Posted by David Gadd <dg...@mac.com>.
Jim,

* #7 is the same for me. It doesn't seem to actually VERIFY it.
* I have an article online with detailed Axis install instructions 
and detailed use of the Java2WSDL and WSDL2Java utilities that may be 
of some help to you. You can find it at 
http://www.gaddzeit.com/articles/frame_article2.html

David Gadd
gaddzeit.com

>Axis seems to be having a problem returning wsdl for a .jws service.
>Items 1-7 show all the clues I have.
>Anybody have an idea as to what is wrong?
>Any help is surely appreciated.
>
>
>1. Simple jws file
>public class MyMath
>{
>      public int squared(int x)
>      {
>           return x * x;
>      }
>}
>saved in tomcat home 's webapps dir as MyMath.jws
>
>2. Typing http://localhost:8080/axis/MyMath.jws?wsdl in the browser does
>not return anything. A blank page. View source displays
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
><HTML><HEAD>
><META http-equiv=Content-Type content="text/html;
>charset=windows-1252"></HEAD>
><BODY></BODY></HTML>
>
>3.
> 
>                                                                                
> 
>                                                                                
> 
>                                                                                
>  java org.apache.axis.wsdl.WSDL2Java 
>"http://localhost:8080/axis/MyMath.jws?wsdl"
>  from the command 
>line                                                           
> 
>                                                                                
> 
>                                                                                
>
>
>returns
>- Exception:
>org.xml.sax.SAXException: Fatal Error:
>URI=http://localhost:8080/axis/MyMath.jws?wsdl Line=1: Document root
>element is missing.
>      at
>org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:472)
>      at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3185)
>      at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
>      at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
>      at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>      at
>org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
>      at
>org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
>      at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:243)
>      at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:256)
>      at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:151)
>      at org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(WSDL2Java.java:725)
>      at java.lang.Thread.run(Thread.java:536)
>java.io.IOException: Unable to retrieve WSDL document:
>http://localhost:8080/axis/MyMath.jws?wsdl
>      at org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:153)
>      at org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(WSDL2Java.java:725)
>      at java.lang.Thread.run(Thread.java:536)
>
>Which I guess is because of the same problem as #1.
>
>4.  Axis seems to be installed and running because
>http://localhost:8080/axis/servlet/AdminServlet returns
>Server is running
>
>
>start server
>
>
>stop server
>
>
>and http://localhost:8080/axis/servlet/AxisServlet
>
>
>returns
>
>
>And now... Some Services
>      Version
>           main
>           getVersion
>      AdminService
>           main
>           class$
>           process
>           getOptions
>           getOptions
>           listConfig
>           registerTypeMappings
>           registerTypes
>           AdminService
>           processWSDD
>           registerChain
>           registerService
>           registerHandler
>           registerTransport
>           registerTypeMapping
>
>
>5. webapps\axis\web-infjwsclasses has the MyMath.class file in it as if
>axis did compile the jws file
>
>
>6.  Making an intentional error in the MyMath.jws and then typing
>http://localhost:8080/axis/MyMath.jws?wsdl in the browser returns
>
>
>AXIS error
>
>Sorry, something seems to have gone wrong... here are the details:
>
>
>Error while compiling:  C:
>\jwsdp-1_0\webapps\axis\WEB-INFjwsClasses\MyMath.java
>
>
>However, the MyMath.java is not in the path displayed.
>
>
>So this also leads me to think Axis is installed and at least trying to
>work.
>
>
>
>
>
>7. Finally, typing http://localhost:8080/axis/anythingyouwanttotype.jws
>into the browser returns
>
>
>axis/anythingyouwanttotype.jws
>
>
>Hi there, this is an AXIS service!
>
>
>Perhaps there will be a form for invoking the service here...
>
>
>even when that jws file is non existent.
>
>
>This might be just a different Axis bug.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>Jim Jackson
>SunGard EBS
>
>  Confidentiality Notice:
>
>The information contained in this e-mail message is intended only for the
>personal and confidential use of the recipient(s) named above.  This
>message may contain confidential information.  If the reader of this
>message is not the intended recipient or an agent responsible for
>delivering it to the intended recipient, you are hereby notified that you
>have received this document in error and that any review, dissemination,
>distribution, or copying of this  message is strictly prohibited.  If you
>have received this communication in error, please notify us immediately by
>e-mail, and delete the original message.