Application scope objects that retain data

2005-08-03 Thread J.W.F. Thirion
Hi everyone,

I appologise if this has been asked already, but I would like to know the
following: Is it possible to have a Java class, e.g. Test in my Test.java,
to keep the value of its static variables between calls to the service. E.g.
I have a static variable temp, to which I just add string data and on each
call to getValue the value returned should be the value I passed to the
function concatenated to previous String values. So on the first call, if I
pass "Hello", I would get back "Initial, Hello" and on the second call, if I
pass "there", I would get back "Initial, Hello there", and so on. The object
must thus never go out of scope. I assumed that I needed to set the scope to
application, but that didn't work (I just got back the string "Initial, XXX"
where XXX is what I passed to getValue - thus the constructor was called on
each call). Here is my deploy.wsdd file:

http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>







and here is my class:

public class Test {
static boolean bInitialised;
static String  temp;

public Test() {
bInitialised = false;
temp = "";
}

public static synchronized boolean isInitialised() {
return bInitialised;
}

public static synchronized void initialise() {
temp = "Initial, ";
bInitialised = true;
}

public String getValue(String input) {
if (!Test.isInitialised()) {
Test.initialise();
}

  temp = temp + input;
return temp;
}
}

and I have deployed the service with the following:

java org.apache.axis.client.AdminClient deploy.wsdd

Any help would be greatly appreciated.

Kind regards,
J.W.F. Thirion (Dérik)
E-mail: [EMAIL PROTECTED]




Re: Deserialize subclasses with AXIS

2005-08-03 Thread Kr..............................Kr
can you please post your wsdl file and the response soap message ..
check the axis generated stubs to see if there is axis (de)serializer
registered for the subclasses ...


RE: could not find class javax.activation.DataHandler from file activation.jar ?

2005-08-03 Thread J H
I'm still learning all of this, but I used to get the message below, I fixed 
it by adding activation.jar to the classpath for the server or web 
application.  (One machine I put it in the server\lib, one machine I put it 
in web-inf\lib).


"- Unable to find required classes (javax.activation.DataHandler and 
javax.mail.internet.MimeMultipart). Attachment support is disabled."


Jeff


From: "Chen, Donald" <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: 
Subject: could not find class javax.activation.DataHandler from file 
activation.jar ???

Date: Wed, 3 Aug 2005 17:53:10 -0400

Hi, there.



I tried to run the http://127.0.0.1:8080/axis/happyaxis.jsp, and got
this message:

Error: could not find class javax.activation.DataHandler from file
activation.jar

Axis will not work.

See http://java.sun.com/products/javabeans/glasgow/jaf.html



I use Axis 12. with Tomcat 5.5 on windows XP professional, the JRE is
J2SE 1.5.



Did I miss something?



Thanks,



Don






could not find class javax.activation.DataHandler from file activation.jar ???

2005-08-03 Thread Chen, Donald








Hi, there.

 

I tried to run the http://127.0.0.1:8080/axis/happyaxis.jsp,
and got this message:

    Error: could not find class javax.activation.DataHandler from file
activation.jar

    Axis will not work.

    See http://java.sun.com/products/javabeans/glasgow/jaf.html

 

I use Axis 12. with Tomcat 5.5 on windows XP professional, the
JRE is J2SE 1.5.

 

Did I miss something?

 

Thanks,

 

Don








Change the Port that Axis Service runs as

2005-08-03 Thread J H
Hi Everyone.  This is my first time e-mailing this list, because the 
documentation out there for this project has been fantastic!  (Thanks to the 
Axis and Eclipse participants).


I have built a self-contained web application (service) that implements the 
Axis libraries.  I have another webapplication that I would like to be able 
to run on the same application server that talks to this custom axis service 
to send messages back and forth to my client.  It seems that the two 
applications are fighting over the default port 8080.  I have confirmed this 
by installing the 2 webservices on different machines, and the solution 
works great.  I know it must be a simple solution, but I can't find out 
anywhere how to change the port that Axis runs as.


Thanks!
Jeff




Trouble mapping a fault to my own exception

2005-08-03 Thread Phil Kulak
Here's what I'm getting over the wire:

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";>
 
  
   
   SOAP-ENV:
   MemberKey not found
   

   
  
 


and here's my attempt to map that to my own exception:

ServiceFactory serviceFactory = ServiceFactory.newInstance();
service = serviceFactory.createService(new QName(uri, serviceName));

TypeMappingRegistry registry = service.getTypeMappingRegistry();
TypeMapping map = registry.getDefaultTypeMapping();

QName q = new QName("urn:InitEvalClasses", "EInvalidMembidException");
map.register(InvalidMemberIdException.class, q,
new BeanSerializerFactory(InvalidMemberIdException.class, q),
new BeanDeserializerFactory(InvalidMemberIdException.class, q));

The documentation surrounding this kind of thing is a bit sparse and I
have no idea if I'm even aproaching this from the right angle. Can
anyone help me out? Thanks!


RE: unsubscribe

2005-08-03 Thread Tolsch, Ed
HI,
Can someone assist me as I'm trying to unsubscribe to this list
and I've sent several emails to 
'[EMAIL PROTECTED]', but to no avail. This is what it
says to do on apache's home page. Any help would be appreciated. Thanks
in advance.

 -Original Message-
From:   Tolsch, Ed  
Sent:   Tuesday, August 02, 2005 1:39 PM
To: '[EMAIL PROTECTED]'
Subject:Unsubscribe please



Re: can my .jws file have static inner classes in it?

2005-08-03 Thread Javier Gonzalez
You could put your inner classes in a separate jar file and import
them in your jws.

Using the wsdd approach lets you use almost any class for providing
services, and no restrictions to using inner types. Plus it's easier
to develop and test in an IDE and then pack it in a .jar and put it in
the axis-enabled servlet engine.

On 8/3/05, John M. Gabriele <[EMAIL PROTECTED]> wrote:
> I changed it from using a .jws file to using the sample
> deploy.wsdd file from samples/userguide/example3, then
> deployed it with the AdminClient as described in the
> User's Guide, and now can get it to give me its wsdl
> using that "?wsdl" appended to the URL.
> 
> Still have to test to see how things work with those
> inner classes though.
> 
> ---John
> 
> 
> --- "John M. Gabriele" <[EMAIL PROTECTED]> wrote:
> 
> > I'm having trouble getting a .jws file working
> > as a web service when it contains inner classes.
> >
> > I can navigate my browser to the .jws file, but
> > when I try and get its wsdl, I get:
> >
> > AXIS error
> >
> > Sorry, something seems to have gone wrong... here are the details:
> >
> > Exception - java.lang.NoClassDefFoundError: MyWebService$MyInnerClass
> >
> > Can I use static inner classes inside my .jws files
> > and have it work?
> >
> > I've tried moving my .class files around in
> > axis/WEB-INF/jwsClasses (into subfolders matching
> > my package declaration in the .jws file), and it
> > axis/WEB-INF/classes but it hasn't helped.
> >
> > Thanks,
> > ---John
> >
> 
> 
> 
> 
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
> 
> 


-- 
Javier Gonzalez Nicolini


Re: can my .jws file have static inner classes in it?

2005-08-03 Thread John M. Gabriele
I changed it from using a .jws file to using the sample
deploy.wsdd file from samples/userguide/example3, then
deployed it with the AdminClient as described in the
User's Guide, and now can get it to give me its wsdl
using that "?wsdl" appended to the URL.

Still have to test to see how things work with those
inner classes though.

---John


--- "John M. Gabriele" <[EMAIL PROTECTED]> wrote:

> I'm having trouble getting a .jws file working
> as a web service when it contains inner classes.
> 
> I can navigate my browser to the .jws file, but
> when I try and get its wsdl, I get:
> 
> AXIS error
> 
> Sorry, something seems to have gone wrong... here are the details:
> 
> Exception - java.lang.NoClassDefFoundError: MyWebService$MyInnerClass
> 
> Can I use static inner classes inside my .jws files
> and have it work?
> 
> I've tried moving my .class files around in
> axis/WEB-INF/jwsClasses (into subfolders matching
> my package declaration in the .jws file), and it
> axis/WEB-INF/classes but it hasn't helped.
> 
> Thanks,
> ---John
> 




Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


Multivalued parameters in server-config.wsdd?

2005-08-03 Thread Javier Gonzalez
Hi,

I'm deploying a web service using the server-config.wsdd file, and
pass to the service a number of parameters. There's a parameter that
can have one or more values (files that must be opened and loaded).
The problem is that, for every file, I have to create a new parameter
name.

Is there a way to pass multiple values for a single parameter name?
(other than entering the value as a string with a known separator to
be parsed inside the code)

-- 
Javier Gonzalez Nicolini


Deserialize subclasses with AXIS

2005-08-03 Thread Ken Tam
I have a web service which returns an array of a base abstracted class with
the actual subclasses as the entries. I am getting an error when this web
service is invoked from an AXIS client. It doesn't seem like the
BeanDeserializer know how to deserialize a subclass and an exception is
thrown saying a subclass member is not found in the base class.

I checked the SOAP response and found the subclasses are returned correctly.
In addition, I was able to get this to work with a .NET client.

I am using the latest AXIS 1.2.1. Is there another deserializer I should use
or do I have to write my own deserializer to handle subclasses.

Thanks.




can my .jws file have static inner classes in it?

2005-08-03 Thread John M. Gabriele
I'm having trouble getting a .jws file working
as a web service when it contains inner classes.

I can navigate my browser to the .jws file, but
when I try and get its wsdl, I get:

AXIS error

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

Exception - java.lang.NoClassDefFoundError: MyWebService$MyInnerClass

Can I use static inner classes inside my .jws files
and have it work?

I've tried moving my .class files around in
axis/WEB-INF/jwsClasses (into subfolders matching
my package declaration in the .jws file), and it
axis/WEB-INF/classes but it hasn't helped.

Thanks,
---John


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


How to enforce maxLength validation in Axis

2005-08-03 Thread Jeremy Nix
Title: How to enforce maxLength validation in Axis






My WSDL+XSD constrains all my fields down to specific lengths or enumerated values.  I'm noticing however that the maxLength constraints are not being validated by my web service.  Is there some sort of option you must set to turn on this sort of validation?  

___

Jeremy Nix

Senior Application Developer

Southwest Financial Services, LTD.

(513) 621-6699 x1158

www.sfsltd.com






Re: JAXB (de)serializers

2005-08-03 Thread Davanum Srinivas
Maarten,

Sure. Please open a JIRA enchancement request and upload your zip
(with test cases/samples if any)

thanks,
dims

On 8/3/05, Maarten Coene <[EMAIL PROTECTED]> wrote:
>  
> Hi, 
>   
> Is there any reason why there are Castor (de)serializers included with Axis
> and not JAXB (de)serializers? 
>   
> We have written such (de)serializers for JAXB (analogue to the Castor
> (de)serializers). If you are interested, we might contribute this code to
> Axis. 
>   
> regards, 
> Maarten
> 
>  
>  Start your day with Yahoo! - make it your home page 
> 
> 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/


Re: Congratulations to Sanjiva, Dims, and the Sri Lankan team

2005-08-03 Thread Davanum Srinivas
Thanks a ton Anne.

On 8/3/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> Sanjiva, Dims, and all the hardworking folks in Sri Lanka,
> 
> Congratulations on the successful launch of your new business, wso2.
> (See http://www.wso2.com/). Who could be more fit to provide support
> for Axis than the folks that develop it?
> 
> And congratulations on forming partnerships with Covalent and Source Labs.
> 
> You've even managed to get press coverage:
> http://news.com.com/SourceLabs+sees+green+in+grassroots+Java/2100-7344_3-5815110.html?tag=nefd.top
> 
> Best of luck in your new venture!
> 
> Anne
> 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/


Congratulations to Sanjiva, Dims, and the Sri Lankan team

2005-08-03 Thread Anne Thomas Manes
Sanjiva, Dims, and all the hardworking folks in Sri Lanka,

Congratulations on the successful launch of your new business, wso2.
(See http://www.wso2.com/). Who could be more fit to provide support
for Axis than the folks that develop it?

And congratulations on forming partnerships with Covalent and Source Labs. 

You've even managed to get press coverage:
http://news.com.com/SourceLabs+sees+green+in+grassroots+Java/2100-7344_3-5815110.html?tag=nefd.top

Best of luck in your new venture!

Anne


Handlers and threads

2005-08-03 Thread Guy Pardon
Hi,

We want to extract a transaction context header from an incoming SOAP request (via a Handler in JAX-RPC) and associate the service thread with the incoming transaction.
According to the JAX-RPC spec, there is no guarantee that handlers are in the same thread as the service itself (which complicates this scheme).

Hence my question: are handlers called in the _same_ thread as the service?
If not, are there any better ways of doing this?

Many thanks,
Guy

Dr. Guy Pardon ( [EMAIL PROTECTED] )
Atomikos: The Transaction Processing Company
http://www.atomikos.com/

The information in this email is confidential and only meant for the addressee(s). The content of this email is informal and will not be legally binding for Atomikos.


JAXB (de)serializers

2005-08-03 Thread Maarten Coene

Hi,
 
Is there any reason why there are Castor (de)serializers included with Axis and not JAXB (de)serializers?
 
We have written such (de)serializers for JAXB (analogue to the Castor (de)serializers). If you are interested, we might contribute this code to Axis.
 
regards,
Maarten
		 Start your day with Yahoo! - make it your home page 

constructor in a subclassed data object

2005-08-03 Thread richard falconer

Hi,

I've a data object which is defined as a java bean with a bunch of common 
parameters that will be shared by 2 classes subclassing this one. The 
problem is that when I create a constructor in the subclass the wsdl2java 
generated class does not have the correct constructor - it seems to ignore 
parameters  available in the superclass. It does recognise that its a 
subclassed object but it doesn't create the correct constructor.


Any ideas?

thanks,
Richard