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 Matthias Wessendorf <ma...@matthias-wessendorf.de> on 2004/10/14 19:00:34 UTC
static constructor
hi all,
I am playing with WebServices in Axis.
I have developed some plain old java clazzes and used them
successfully. however, now I have a problem.
my class generates no WSDL, if I use a static constructor...
here the class:
<clazz>
package de.w3l.webservice;
import java.util.Vector;
/**
* @author Matthias Weßendorf
*/
public class GlossarbegriffService {
//is in package de.w3l.webservice
private static SuchBeanGlossar sb = null;
static {
sb = new SuchBeanGlossar();
}
/*public GlossarbegriffService(){
sb = new SuchBeanGlossar();
}*/
public Vector sucheBegriffe(){
Vector ve = new Vector();
ve.add("html*");
return sb.getSuchergebnis(ve);
}
}
</class>
and here deploymentfile
<wsdd>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="GlossarbegriffService" provider="java:RPC">
<parameter name="className"
value="de.w3l.webservice.GlossarbegriffService"/>
<parameter name="allowedMethods" value="sucheBegriffe"/>
</service>
</deployment>
</wsdd>
If I use the *object constructor* all works fine...
Is it not posible to use static constructor inside of Axis?
Or do I have a silly error in it, which I didn't see right now...?
Thanks for any advice.
Regards,
Matthias
--
Matthias Weßendorf
Aechterhoek 18
DE-48282 Emsdetten
Germany
Email: matthias AT wessendorf DOT net
URL: http://www.wessendorf.net
solved (was RE: static constructor)
Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
ok... If you use third party libs...
I guess you have to deploy them as well...
;-)
sorry for bothering you all,
Regards,
Matthias
> -----Original Message-----
> From: Matthias Wessendorf [mailto:mailings@matthias-wessendorf.de]
> Sent: Thursday, October 14, 2004 7:01 PM
> To: axis-user@ws.apache.org
> Subject: static constructor
>
>
> hi all,
>
> I am playing with WebServices in Axis.
> I have developed some plain old java clazzes and used them
> successfully. however, now I have a problem.
>
> my class generates no WSDL, if I use a static constructor...
>
> here the class:
> <clazz>
> package de.w3l.webservice;
>
> import java.util.Vector;
>
>
> /**
> * @author Matthias Weßendorf
> */
> public class GlossarbegriffService {
>
> //is in package de.w3l.webservice
> private static SuchBeanGlossar sb = null;
>
> static {
> sb = new SuchBeanGlossar();
> }
>
> /*public GlossarbegriffService(){
> sb = new SuchBeanGlossar();
> }*/
>
> public Vector sucheBegriffe(){
> Vector ve = new Vector();
> ve.add("html*");
> return sb.getSuchergebnis(ve);
> }
>
> }
> </class>
>
>
> and here deploymentfile
> <wsdd>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
> <service name="GlossarbegriffService" provider="java:RPC">
> <parameter name="className"
> value="de.w3l.webservice.GlossarbegriffService"/>
> <parameter name="allowedMethods" value="sucheBegriffe"/>
> </service>
> </deployment>
> </wsdd>
>
> If I use the *object constructor* all works fine...
> Is it not posible to use static constructor inside of Axis?
> Or do I have a silly error in it, which I didn't see right now...?
>
>
> Thanks for any advice.
>
> Regards,
> Matthias
> --
> Matthias Weßendorf
> Aechterhoek 18
> DE-48282 Emsdetten
> Germany
> Email: matthias AT wessendorf DOT net
> URL: http://www.wessendorf.net
>