aspose file tools*
The moose likes Web Services and the fly likes Anyone ever seen this before? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Anyone ever seen this before?" Watch "Anyone ever seen this before?" New topic
Author

Anyone ever seen this before?

John Meloro
Ranch Hand

Joined: Dec 05, 2003
Posts: 37
All,
Has anyone ever seen the following kid of error before?
java.lang.NoSuchMethodError:
javax.xml.soap.SOAPMessage.getSOAPBody()Ljavax/xml/soap/SOAPBody;
I get it after I perform the following code snippet:

.
.
.
// Edit to provide your own username and password
String username = args[0];
String password = args[1];
char[] c = password.toCharArray();
PasswordAuthentication passwdAuth =
new PasswordAuthentication( username, c );
Set creds = new HashSet();
creds.add( passwdAuth );
connection.setCredentials( creds );
.
.
.
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Do you have a jaxp compliant parser in the classpath of the server where your web service is deployed ?


/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
John Meloro
Ranch Hand

Joined: Dec 05, 2003
Posts: 37
I have downloaded both Xalan and Xerces which *.jar file(s) should I include in my classpath?
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Originally posted by John Meloro:
I have downloaded both Xalan and Xerces which *.jar file(s) should I include in my classpath?

Xerces should be enough
John Meloro
Ranch Hand

Joined: Dec 05, 2003
Posts: 37
Here is a list of the files:
resolver.jar
xercesImpl.jar // Already in the classpath
xercesSamples.jar
xml-apis.jar
xmlParserAPIs.jar
Which one or ones do I include?
John Meloro
Ranch Hand

Joined: Dec 05, 2003
Posts: 37
I've added all of them with no effect...
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
what about xerces.jar ???
John Meloro
Ranch Hand

Joined: Dec 05, 2003
Posts: 37
I never got it?
John Meloro
Ranch Hand

Joined: Dec 05, 2003
Posts: 37
Xerces-J-bin.2.6.2.zip does not contain one...
JeanLouis Marechaux
Ranch Hand

Joined: Nov 12, 2001
Posts: 906
Ok, sorry, I thought it was.
I just asked you to check the classpath because it seems the kind of error you are facing can be due to a missing method (XML parser) the OSAP engine is looking for.
Nervertheless, can't certify it is really the cause of your problem.
Has your web service ever worked before ? or do you have others services up and running deployed on the same server ?
Which SOAP implementation (server) are you using ?
What do you have in your server classpath ?

BTW, your error message is weird :
java.lang.NoSuchMethodError:
javax.xml.soap.SOAPMessage.getSOAPBody()Ljavax/xml/soap/SOAPBody;

This is Axis, right ?
According to the javadoc, there is no getSOAPBody() method on the SOAPMessage object
[ April 05, 2004: Message edited by: Jean-Louis Marechaux ]
John Meloro
Ranch Hand

Joined: Dec 05, 2003
Posts: 37
The web service runs okay. I am in the process of writing a class to publish information about how to invoke the web service to a UDDI Registry.
The environment is Windows Xp, TomCat 4.1.30 and Axis.
The class to "publish" the pertinent information is compiled and run from an Ant Script. List below is the classpath information:
<pathelement location="C:\jwsdp-1.3\jaxr\lib\jaxr-api.jar"/>
<pathelement location="C:\code\Java\Web Services Registration\Fibonacci\build\classes"/>
<pathelement location="C:\jwsdp-1.3\jaxr\lib\jaxr-impl.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxb\lib\jaxb-api.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxb\lib\jaxb-impl.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxb\lib\jaxb-libs.jar"/>
<pathelement location="C:\jwsdp-1.3\jwsdp-shared\lib\relaxngDatatype.jar"/>
<pathelement location="C:\jwsdp-1.3\jwsdp-shared\lib\namespace.jar"/>
<pathelement location="C:\jwsdp-1.3\jwsdp-shared\lib\activation.jar"/>
<pathelement location="C:\jwsdp-1.3\jwsdp-shared\lib\mail.jar"/>
<pathelement location="C:\jwsdp-1.3\jwsdp-shared\lib\.jar"/>
<pathelement location="C:\code\Axis\axis-1_1\lib\axis.jar"/>
<pathelement location="C:\code\Axis\axis-1_1\lib\commons-logging.jar"/>
<pathelement location="C:\code\Axis\axis-1_1\lib\commons-discovery.jar"/>
<pathelement location="C:\code\Axis\axis-1_1\lib\saaj.jar"/>
<pathelement location="C:\jwsdp-1.3\saaj\lib\saaj-api.jar"/>
<pathelement location="C:\jwsdp-1.3\saaj\lib\saaj-impl.jar.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxp\lib\endorsed\jaxp-api.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxp\lib\endorsed\sax.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxp\lib\endorsed\dom.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxp\lib\endorsed\xercesImpl.jar"/>
<pathelement location="C:\jwsdp-1.3\jaxp\lib\endorsed\xalan.jar"/>
<pathelement location="C:\code\XML\Xerces 2.6.2\xerces-2_6_2\resolver.jar"/>
<pathelement location="C:\code\XML\Xerces 2.6.2\xerces-2_6_2\xml-apis.jar"/>
<pathelement location="C:\code\XML\Xerces 2.6.2\xerces-2_6_2\xmlParserAPIs.jar"/>
<pathelement location="C:\code\XML\Xerces 2.6.2\xercex-2_6_2\xercesImpl.jar"/>
Most everything comes from jwsdp-1.3.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Anyone ever seen this before?