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 Aravind Chavar <ar...@hotmail.com> on 2002/06/14 16:04:40 UTC
Complex Data type
Hi,
I am trying to build a webservice, which uses complex type parameters.The
method I am following to deploy the web services is , change the .java
extension of the file to .jws and place it in axis directory.Following is
the source code
import java.io.*;
import java.util.* ;
/**
*
* @author Arvind Chavar
*/
public class ComplexTypeOneService {
public OutBean[] getBeans(InBean[] inBeans){
OutBean[] result = new OutBean[inBeans.length];
int sqrNum = 0;
for(int i=0;i<inBeans.length;i++){
sqrNum = inBeans[i].getNum();
result[i] .setNum(sqrNum*sqrNum);
}
return result;
}
}
class OutBean{
private int num;
public OutBean(){
}
public void setNum(int num){
this.num = num;
}
public int getNum(){
return num;
}
}
class InBean extends OutBean{
}
When I try to access the wsdl using following URL , the java classes for al
three classes are complied and placed in WEB-INFJwsclasses directory under
axis
http://localhost:8080/axis/complex/ComplexTypeOneService.jws?wsdl
Instead of getting the wsdl I get following error, eventhough the class file
is existing there
AXIS error
Sorry, something seems to have gone wrong... here are the details:
java.lang.NoClassDefFoundError: OutBean
Why is this happening?.Any idea?.
Thanks.
Arvind
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
Re: Complex Data type
Posted by Jürgen Kaatz <ka...@e-commerceit.de>.
Hi Aravind,
perhaps the error is, that your bean isn't declared as a public class.
Juergen
>I am trying to build a webservice, which uses complex type parameters.The
>method I am following to deploy the web services is , change the .java
>extension of the file to .jws and place it in axis directory.Following is
>the source code
>
>import java.io.*;
>import java.util.* ;
>
>
>/**
>*
>* @author Arvind Chavar
>*/
>public class ComplexTypeOneService {
> public OutBean[] getBeans(InBean[] inBeans){
> OutBean[] result = new OutBean[inBeans.length];
> int sqrNum = 0;
>
> for(int i=0;i<inBeans.length;i++){
> sqrNum = inBeans[i].getNum();
> result[i] .setNum(sqrNum*sqrNum);
> }
>
> return result;
> }
>}
>
>class OutBean{
> private int num;
>
> public OutBean(){
>
> }
>
> public void setNum(int num){
> this.num = num;
> }
>
> public int getNum(){
> return num;
> }
>}
>
>class InBean extends OutBean{
>
>}
>
>
>When I try to access the wsdl using following URL , the java classes for
>al three classes are complied and placed in WEB-INFJwsclasses directory
>under axis
>http://localhost:8080/axis/complex/ComplexTypeOneService.jws?wsdl
>
>Instead of getting the wsdl I get following error, eventhough the class
>file is existing there
>
>
>AXIS error
>Sorry, something seems to have gone wrong... here are the details:
>
>java.lang.NoClassDefFoundError: OutBean
>
>
>
>Why is this happening?.Any idea?.
>
>Thanks.
>
>Arvind
>
>
>
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
-----------------------------
Juergen Kaatz
Entwickler / Developer
WWE e-commerce IT GmbH
Eiffestrasse 462
20537 Hamburg
URL: http://www.e-commerceit.de/
URL: http://www.iets.de/ (Internet Export Trading System)
Tel: +49-40-2530659-32
Fax: +49-40-2530659-50
Tel. +49-40-2530659-0 (Zentrale)
E-Mail : kaatz@wwe.biz