Wiki page changes

2006-05-19 Thread Thom Hehl
I have some modifications I'd like to make since I spent about a day 
researching to clarify this wiki page: 
http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression


How does one go about editing these? Politcally and technically?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Compression proprosal

2006-05-18 Thread Thom Hehl
I'm kind of new to Axis. I read the below document, but do not know how 
to use the following code:


VersionSoapBindingStub binding = (VersionSoapBindingStub) new 
VersionServiceLocator()
   .getVersion();

// Compress the request
binding._setProperty(HTTPConstants.MC_GZIP_REQUEST, Boolean.TRUE);
// Tell the server it can compress the response
binding._setProperty(HTTPConstants.MC_ACCEPT_GZIP, Boolean.TRUE);

// invoke the service
String result = binding.getVersion();


The classes referenced are not in the API docs. Also, there is no 
documentation on how to turn it on on the server side. Do we just turn 
it on in tomcat?


Has someone done this already that can help?

Thanks.

Davanum Srinivas wrote:

already done :)

http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression

-- dims

On 5/17/06, Thom Hehl <[EMAIL PROTECTED]> wrote:

We're using Axis-java 1.3. I have a project to compress the SOAP
payload. I was thinking it would be better to compress the entire SOAP
envelope. How would I do this?

At some point, invoke is probably using java.net and sending data in and
out through some kind of input stream. I would like to have axis look at
startup for certain classes that I feed it as subclasses of
FilterInputStream and FilterOutputStream. They would wrap these around
the InputStream and OutputStream currently communicating with the
sockets. THis would allow fast cheap and easy implementation of
compression of the entire SOAP envelope, speeding along the process with
VERY low impact to the axis code base itself.

These streams would be specified in the configuration file or using
system properties and would be bound at run time using reflection.

I would be interested in hearing any opinions about this.






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Compression proprosal

2006-05-17 Thread Thom Hehl

OK, where does the following code go?

VersionSoapBindingStub binding = (VersionSoapBindingStub) new 
VersionServiceLocator()
   .getVersion();

// Compress the request
binding._setProperty(HTTPConstants.MC_GZIP_REQUEST, Boolean.TRUE);
// Tell the server it can compress the response
binding._setProperty(HTTPConstants.MC_ACCEPT_GZIP, Boolean.TRUE);

// invoke the service
String result = binding.getVersion();

I use WSDL2JAVA to generate my classes. Am I going to have to hand edit 
one of these classes I don't normally change? Can I plug something into 
wsdl2java to do that for me?


Thanks.

Davanum Srinivas wrote:

already done :)

http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression

-- dims

On 5/17/06, Thom Hehl <[EMAIL PROTECTED]> wrote:

We're using Axis-java 1.3. I have a project to compress the SOAP
payload. I was thinking it would be better to compress the entire SOAP
envelope. How would I do this?

At some point, invoke is probably using java.net and sending data in and
out through some kind of input stream. I would like to have axis look at
startup for certain classes that I feed it as subclasses of
FilterInputStream and FilterOutputStream. They would wrap these around
the InputStream and OutputStream currently communicating with the
sockets. THis would allow fast cheap and easy implementation of
compression of the entire SOAP envelope, speeding along the process with
VERY low impact to the axis code base itself.

These streams would be specified in the configuration file or using
system properties and would be bound at run time using reflection.

I would be interested in hearing any opinions about this.






Re: Compression proprosal

2006-05-17 Thread Thom Hehl

Wow! What a great idea!

Davanum Srinivas wrote:

already done :)

http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression

-- dims

On 5/17/06, Thom Hehl <[EMAIL PROTECTED]> wrote:

We're using Axis-java 1.3. I have a project to compress the SOAP
payload. I was thinking it would be better to compress the entire SOAP
envelope. How would I do this?

At some point, invoke is probably using java.net and sending data in and
out through some kind of input stream. I would like to have axis look at
startup for certain classes that I feed it as subclasses of
FilterInputStream and FilterOutputStream. They would wrap these around
the InputStream and OutputStream currently communicating with the
sockets. THis would allow fast cheap and easy implementation of
compression of the entire SOAP envelope, speeding along the process with
VERY low impact to the axis code base itself.

These streams would be specified in the configuration file or using
system properties and would be bound at run time using reflection.

I would be interested in hearing any opinions about this.






Compression proprosal

2006-05-17 Thread Thom Hehl
We're using Axis-java 1.3. I have a project to compress the SOAP 
payload. I was thinking it would be better to compress the entire SOAP 
envelope. How would I do this?


At some point, invoke is probably using java.net and sending data in and 
out through some kind of input stream. I would like to have axis look at 
startup for certain classes that I feed it as subclasses of 
FilterInputStream and FilterOutputStream. They would wrap these around 
the InputStream and OutputStream currently communicating with the 
sockets. THis would allow fast cheap and easy implementation of 
compression of the entire SOAP envelope, speeding along the process with 
VERY low impact to the axis code base itself.


These streams would be specified in the configuration file or using 
system properties and would be bound at run time using reflection.


I would be interested in hearing any opinions about this.


Re: [axis2] AEGIS: The WS-Security module for Axis2

2006-04-28 Thread Thom Hehl
How about "pendulum" since it was Foucault's pendulum that first proved 
the earth rotated on its "axis?"


Ruchith Fernando wrote:

+1 to "Ceasar" from me :-)

http://en.wikipedia.org/wiki/Caesar_cipher

Thanks,
Ruchith

On 4/28/06, Rodrigo Ruiz <[EMAIL PROTECTED]> wrote:

I personally would like "Caesar". A little tribute to the first encoder
in History :-)

Regards,
Rodrigo

Ruchith Fernando wrote:
> Oops ... thanks Ali...
>
> BTW I also stumbled upon another piece of software called aegis [1]
>
> Apologies about rushing this change and I'd like to propose to revert
> the name change and to come up with a better name.
>
> Would the devs/users please to suggest a better name (for this module
> that implements WS-Security support)?
>
> It'll be great if we can settle on a name before Axis2 1.0 :-)
>
> Thanks,
> Ruchith
>
>
> [1] http://en.wikipedia.org/wiki/Aegis_(software)
>
> On 4/28/06, Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
>> Hi Ruchith,
>>
>> Have you seen "Aegis Databinding" (
>> http://xfire.codehaus.org/Aegis+Binding) ?
>>
>> Don't you think it would be better to choose another name to prevent
>> possible confusions?
>>
>> Best regards,
>>
>> Ali Sadik Kumlali
>>
>> --- Ruchith Fernando <[EMAIL PROTECTED]> wrote:
>>
>> > Hi All,
>> >
>> > Please note that the name of the WS-Security implementation 
module is
>> > now changed to "aegis". [1] (Greek Mythology. The goatskin 
shield or

>> > breastplate of Zeus or Athena) [2] .
>> >
>> > Earlier this was called "security" and I believe it was too 
abstract.

>> >
>> > See the first synonym of the first entry here : [3]
>> >
>> > This change is effective from Axis2 RC4.
>> >
>> > Thanks,
>> > Ruchith
>> >
>> > [1] http://dictionary.reference.com/search?q=aegis
>> > [2]
>> >
>> 
http://www.florentine-persona.com/Images/Phreaknic03/Parthenon/athena_aegis.jpg 


>>
>> > [3] http://thesaurus.reference.com/search?q=security
>> >
>>
>>
>> __
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>>
>
>

--
---
GRIDSYSTEMSRodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorcamailto:[EMAIL PROTECTED]
Baleares - España  Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
---


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 
27/04/2006







Re: [SPAM] - Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body - Found word(s) check out in the subject

2006-04-07 Thread Thom Hehl
Sorry, you are passing my area of expertise. What we were seeing was we 
were sending a custom fault, but it was de-serializing as another, 
random, fault. Not sure what you're looking for here, then.


Sorry I couldn't be of more help.

Veprinsky, Michael wrote:

Well, I guess the question would be what do you mean by "correct". I get
XML very similar to what Jack got, namely:

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>


soapenv:Server.userException
subprod.dis.fault.MVException: Hello world my
...


http://schemas.xmlsoap.org/soap/encoding/";>
BAD_DAY
RAIN
WS_SUCK


http://xml.apache.org/axis/";>
myhost





It obviously is not formated this way, I made it more readable (tried at
least). Basically what I did was I extended Exception with my own class
and added a list of error codes (just a list of Strings called "codes",
list is not typed)
As you can see, I get this fault and I can deserialize it (and I can
probably even get into "details"). It is possible that if I generate a
client with WSDL2Java (for now I just use Call class) I will even get
this exception (not sure, would need to test). However as I mentioned
before the service is supposed to be cross-platform so I would very much
like to control faultcode and faultstring so that C++ or Python would be
able to process it. I can probably get them to process custom XML but
you must agree this kinda violates the purpose of using SOAP in the
first place.
I was able to set both values I need through making my exception extend
AxisFault, which is an option, but I wanted to see if there are other
options too (namely custom serialization of standard exceptions).

Another question - I think SOAP allows to have multiple Faults in one
response. Is this correct and if it is, is there a way to have multiple
faults with Axis?

Thank you,
-Michael

___
Tell a man there are 300 billion stars in the universe and he'll believe
Tell him a bench has wet paint on it and he'll have to touch to be sure
  -- /usr/bin/fortune


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Thom Hehl
Sent: Thursday, April 06, 2006 5:10 AM
To: axis-user@ws.apache.org
Subject: Re: [SPAM] - Re: [SPAM] - Re: Problems getting user exceptions
to work - Found word(s) check out in the Text body - Found word(s) check
out in the subject


Right. We use the WSDL to build java from, not the other way round. The 
problem is a bug in axis. We're going to write it up when we get the 
chance. In the meantime, you will need to decide whether or not to 
modify the WSDL.


I will bet that if you look at the XML coming from the server, it is 
correct. The problem lies in the de-serialization of the fault. This is 
a work-around for that problem.


Veprinsky, Michael wrote:
  

Hello!
I decided to piggy-back on this thread... I am having similar 
problems.


Thom,
What did you mean? I suppose recommend changing WSDL definition but a)



  

my WSDL is auto-published so I can't really change it and b) even if I



  
do, it does not change the XML that server generates and that is 
totally language-specific which kinda violates the purpose. Or did you



  

mean something else?

I am using Axis 1.3. I have following questions:
1) Is there a way to set server to use SOAP 1.2 (RTFMs are welcome, 
just tell where)?
2) Is there a way to specify custom values for faultcode/faultstring? 
Best I could get was my exception being serialized into XML under 
details but then I have to process it as XML :-\
3) Overall, I need to publish a web service that is going to be used 
from different platforms. Is my best bet to just give up faults 
altogether and use some custom base result structure with generic 
error passing engine? Any recommendations (again, RTFMs are welcome)


I do not expect much success since the envelope XSD itself is pretty 
limiting (http://schemas.xmlsoap.org/soap/envelope, toward the end), 
it's just those two fields and freeform XML "details". SOAP 1.2 looks 
a little better but without documentation it did not help much either.


Any recommendations/insights are welcome.
Thank you,
-Michael

___
Tell a man there are 300 billion stars in the universe and he'll 
believe Tell him a bench has wet paint on it and he'll have to touch


to be sure
  

  -- /usr/bin/fortune


-Original Message-
From: Thom Hehl [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 1:47 PM
To:

Re: [SPAM] - Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body - Found word(s) check out in the subject

2006-04-06 Thread Thom Hehl
Right. We use the WSDL to build java from, not the other way round. The 
problem is a bug in axis. We're going to write it up when we get the 
chance. In the meantime, you will need to decide whether or not to 
modify the WSDL.


I will bet that if you look at the XML coming from the server, it is 
correct. The problem lies in the de-serialization of the fault. This is 
a work-around for that problem.


Veprinsky, Michael wrote:

Hello!
I decided to piggy-back on this thread... I am having similar problems.

Thom,
What did you mean? I suppose recommend changing WSDL definition but a)
my WSDL is auto-published so I can't really change it and b) even if I
do, it does not change the XML that server generates and that is totally
language-specific which kinda violates the purpose. Or did you mean
something else?

I am using Axis 1.3. I have following questions:
1) Is there a way to set server to use SOAP 1.2 (RTFMs are welcome, just
tell where)?
2) Is there a way to specify custom values for faultcode/faultstring?
Best I could get was my exception being serialized into XML under
details but then I have to process it as XML :-\
3) Overall, I need to publish a web service that is going to be used
from different platforms. Is my best bet to just give up faults
altogether and use some custom base result structure with generic error
passing engine? Any recommendations (again, RTFMs are welcome)

I do not expect much success since the envelope XSD itself is pretty
limiting (http://schemas.xmlsoap.org/soap/envelope, toward the end),
it's just those two fields and freeform XML "details". SOAP 1.2 looks a
little better but without documentation it did not help much either.

Any recommendations/insights are welcome.
Thank you,
-Michael

___
Tell a man there are 300 billion stars in the universe and he'll believe
Tell him a bench has wet paint on it and he'll have to touch to be sure
  -- /usr/bin/fortune


-----Original Message-
From: Thom Hehl [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 30, 2006 1:47 PM

To: axis-user@ws.apache.org
Subject: Re: [SPAM] - Re: [SPAM] - Re: Problems getting user exceptions
to work - Found word(s) check out in the Text body - Found word(s) check
out in the subject


Have a look at this:

Give him This:
_original type def from imported xsd___
  
   
  

_also needed in wsdl file___

type="ns:InvalidDateException"/>



*(in the portType operation definition for a method throwing a fault)*
message="ns:InvalidDateExceptionFault"/>


*(in the binding operation definintion for a method throwing a fault)*






Jack Lund wrote:

  

See, I'm not really sure. The JAX/RPC spec is kinda hazy on how
exceptions are handled, and how the soap fault maps to an exception. 
Here's what I'm seeing come back from the server:



xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

   
   
   soapenv:Server.userException
   com.foobar.ecommerce.beans.InvalidDateException: A



  

valid date must be specified in the form of MM/DD/.
   
   xsi:type="ns1:InvalidDateException" xmlns:ns1="urn:ClaimsData"/>
   


xmlns:ns2="http://xml.apache.org/axis/";>staportal01.stratarc.netstname> 
  

   
   
   


And here's what the corresponding part of the WSDL looks like:


 http://www.w3.org/2001/XMLSchema";>
  http://hib.ecommerce.foobar.com"/>
  namespace="http://portal01.foobar.com:8080/axis/services/ClaimsData"/>

  http://dao.ecommerce.foobar.com"/>
  http://beans.ecommerce.foobar.com"/>
  http://schemas.xmlsoap.org/soap/encoding/"/>
  
   








type="xsd:string"/>
  





   
  
  
   
  
 

What makes me think the serialization isn't working is that the
definition of the InvalidDateException is pretty much empty. However, 
it also looks like there's enough information in the passed soap 
message to be able to deserialize the exception properly, so I don't 
really know what's going on here.


Do you (or anybody) have an example of what a "good" soap fault mapped
from a java exception looks like?

Thanks.

-Jack


Thom Hehl wrote:



Hmmm. Check your SOAP messae. Our problem is that we're sending the
correct data from the server and the error happens during 
deserialization. If that's not it, it's a different problem.


Jack Lund wrote:

  

Thanks! I'd love to hear the workaround - I've tried everything I
can. It looks like the problem is that the server side doesn't 
really know how to serialize the exception, even though 

Re: [SPAM] - Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body - Found word(s) check out in the subject

2006-03-30 Thread Thom Hehl

Have a look at this:

Give him This:
_original type def from imported xsd___
 
  
 

_also needed in wsdl file___
   
   type="ns:InvalidDateException"/>

   

*(in the portType operation definition for a method throwing a fault)*
message="ns:InvalidDateExceptionFault"/>


*(in the binding operation definintion for a method throwing a fault)*

   




Jack Lund wrote:

See, I'm not really sure. The JAX/RPC spec is kinda hazy on how 
exceptions are handled, and how the soap fault maps to an exception. 
Here's what I'm seeing come back from the server:



xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

   
   
   soapenv:Server.userException
   com.foobar.ecommerce.beans.InvalidDateException: A 
valid date must be specified in the form of MM/DD/.

   
   xsi:type="ns1:InvalidDateException" xmlns:ns1="urn:ClaimsData"/>
   xmlns:ns2="http://xml.apache.org/axis/";>staportal01.stratarc.net 


   
   
   


And here's what the corresponding part of the WSDL looks like:


 xmlns="http://www.w3.org/2001/XMLSchema";>

  http://hib.ecommerce.foobar.com"/>
  namespace="http://portal01.foobar.com:8080/axis/services/ClaimsData"/>

  http://dao.ecommerce.foobar.com"/>
  http://beans.ecommerce.foobar.com"/>
  http://schemas.xmlsoap.org/soap/encoding/"/>
  
   











   
  
  
   
  
 

What makes me think the serialization isn't working is that the 
definition of the InvalidDateException is pretty much empty. However, 
it also looks like there's enough information in the passed soap 
message to be able to deserialize the exception properly, so I don't 
really know what's going on here.


Do you (or anybody) have an example of what a "good" soap fault mapped 
from a java exception looks like?


Thanks.

-Jack


Thom Hehl wrote:

Hmmm. Check your SOAP messae. Our problem is that we're sending the 
correct data from the server and the error happens during 
deserialization. If that's not it, it's a different problem.


Jack Lund wrote:

Thanks! I'd love to hear the workaround - I've tried everything I 
can. It looks like the problem is that the server side doesn't 
really know how to serialize the exception, even though it should.


-Jack

Thom Hehl wrote:

We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be 
fixed. The guy on our team that found it was going to write 
something up for the list. I'll ask him to step this up a bit as it 
would be of benefit to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have 
no control over the exceptions being thrown - I just need the 
client-side to be able to catch them *as* the exceptions that are 
originally thrown. I also am doing dynamic proxying rather than 
stubs/skeletons, so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much 
randomly trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things 
are subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to 
the JAX-RPC specification, your subclass of Exception must have 
accessor methods to access all the fields in the object to be 
marshalled /and/ a constructor that takes as parameters all the 
same fields (i.e, arguments of the same name and type). This is a 
kind of immutable variant of a normal JavaBean 
<http://java.sun.com/products/javabeans>. The fields in the object 
must be of the datatypes that can be reliably mapped into WSDL.


If your exception meets this specification, then the WSDL 
describing the method will describe the exception too, enabling 
callers to create stub implementations of the exception, 
regardless of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* 
of the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server als

Re: [SPAM] - Re: Problems getting user exceptions to work - Found word(s) check out in the Text body

2006-03-30 Thread Thom Hehl
Hmmm. Check your SOAP messae. Our problem is that we're sending the 
correct data from the server and the error happens during 
deserialization. If that's not it, it's a different problem.


Jack Lund wrote:

Thanks! I'd love to hear the workaround - I've tried everything I can. 
It looks like the problem is that the server side doesn't really know 
how to serialize the exception, even though it should.


-Jack

Thom Hehl wrote:

We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be 
fixed. The guy on our team that found it was going to write something 
up for the list. I'll ask him to step this up a bit as it would be of 
benefit to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have no 
control over the exceptions being thrown - I just need the 
client-side to be able to catch them *as* the exceptions that are 
originally thrown. I also am doing dynamic proxying rather than 
stubs/skeletons, so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much 
randomly trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things are 
subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to 
the JAX-RPC specification, your subclass of Exception must have 
accessor methods to access all the fields in the object to be 
marshalled /and/ a constructor that takes as parameters all the same 
fields (i.e, arguments of the same name and type). This is a kind of 
immutable variant of a normal JavaBean 
<http://java.sun.com/products/javabeans>. The fields in the object 
must be of the datatypes that can be reliably mapped into WSDL.


If your exception meets this specification, then the WSDL describing 
the method will describe the exception too, enabling callers to 
create stub implementations of the exception, regardless of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* of 
the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server also extend 
org.apache.axis.AxisFault, rather than Exception.


This is a decidedly dodgy area, imo, especially when it comes to 
interop with non-Axis clients.




From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 14:51:47 -0600

Nope, didn't work. Wouldn't think it would - AxisFault isn't a 
subclass of InvalidDateException.


-Jack

Jarmo Doc wrote:


Try doing this:

catch (AxisFault ex)
{
if (ex instanceof InvalidDateException)
{
InvalidDateException myex = (InvalidDateException)ex;
// deal with myex here
}
// deal with others here
}



From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 12:21:33 -0600

Hi. I'm using axis 1.2.1, and I'm trying to get the exceptions 
sent by my service thrown to the client. For instance, my 
service can throw an "InvalidDateException" exception, which is 
a subclass of java.lang.Exception, and I want the client code to 
get that exception. What little is said on the axis website 
about this implies that it should "just work", but it doesn't 
seem to - what I get on the other side is an AxisFault with the 
message string from my exception embedded inside.


Is there something special I have to do, on either side, to get 
this to work?


Thanks.

-Jack






_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/





_
Express yourself instantly with MSN Messenger! Download today - 
it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/









Re: Problems getting user exceptions to work

2006-03-30 Thread Thom Hehl
We had EXACTLY the same problem! We just found it and found a 
work-around, but believe this to be a bug in AXIS that should be fixed. 
The guy on our team that found it was going to write something up for 
the list. I'll ask him to step this up a bit as it would be of benefit 
to you.


Jack Lund wrote:

Yeah, I can see that that would be easier. Unfortunately, I have no 
control over the exceptions being thrown - I just need the client-side 
to be able to catch them *as* the exceptions that are originally 
thrown. I also am doing dynamic proxying rather than stubs/skeletons, 
so it makes it that more complicated.


>From the debugging I've been able to do, it looks like the fault 
coming across contains the fully-qualified package name of the 
exception class, but for some reason on the client side it's not 
creating the exception. Since this is an area where there's 
practically no documentation, I'm finding myself pretty much randomly 
trying different things and seeing if they work.


The user's guide is really vague about this subject:

"If a method is marked as throwing an Exception that is not an 
instance or a subclass of java.rmi.RemoteException, then things are 
subtly different. The exception is no longer a SOAP Fault, but 
described as a wsdl:fault in the WSDL of the method. According to the 
JAX-RPC specification, your subclass of Exception must have accessor 
methods to access all the fields in the object to be marshalled /and/ 
a constructor that takes as parameters all the same fields (i.e, 
arguments of the same name and type). This is a kind of immutable 
variant of a normal JavaBean . 
The fields in the object must be of the datatypes that can be reliably 
mapped into WSDL.


If your exception meets this specification, then the WSDL describing 
the method will describe the exception too, enabling callers to create 
stub implementations of the exception, regardless of platform."


I was kind of hoping someone else out there would have had some 
experience with getting this to work.


-Jack

Jarmo Doc wrote:

I have an Axis client stub which was generated from WSDL. *All* of 
the client-side user-defined exceptions extend 
org.apache.axis.AxisFault.


The equivalent exceptions at the server also extend 
org.apache.axis.AxisFault, rather than Exception.


This is a decidedly dodgy area, imo, especially when it comes to 
interop with non-Axis clients.




From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 14:51:47 -0600

Nope, didn't work. Wouldn't think it would - AxisFault isn't a 
subclass of InvalidDateException.


-Jack

Jarmo Doc wrote:


Try doing this:

catch (AxisFault ex)
{
if (ex instanceof InvalidDateException)
{
InvalidDateException myex = (InvalidDateException)ex;
// deal with myex here
}
// deal with others here
}



From: Jack Lund <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Problems getting user exceptions to work
Date: Wed, 29 Mar 2006 12:21:33 -0600

Hi. I'm using axis 1.2.1, and I'm trying to get the exceptions 
sent by my service thrown to the client. For instance, my service 
can throw an "InvalidDateException" exception, which is a subclass 
of java.lang.Exception, and I want the client code to get that 
exception. What little is said on the axis website about this 
implies that it should "just work", but it doesn't seem to - what 
I get on the other side is an AxisFault with the message string 
from my exception embedded inside.


Is there something special I have to do, on either side, to get 
this to work?


Thanks.

-Jack




_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/





_
Express yourself instantly with MSN Messenger! Download today - it's 
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





Re: Deploying .class files to a symlink directory instead of /web-inf/classes (easy question?)

2006-03-21 Thread Thom Hehl
For security purposes, tomcat doesn't ship with support for symlinks 
turned on. There is a setting that is something like follow-symlinks 
that you can enable.


I did that once, then it occurred to me that, rather than defeat the 
security, make the webapps sub-directory the main directory and symlink 
to it from your build area. That gets you the best of both worlds.


HTH.

Ennamorato, Andrew wrote:


Might be an easy one.
We're installing Tomcat 5.0.28 and Axis 1.1 on several machines. We 
usually set up an "operations" and "test" version at the same time.


Typically, we'll install .html/.jsp/whatever files within the 
/tomcat/classes directory, but that directory is just a symlink to 
something like /usr/deployment/classes. I found that when I did this 
in Axis1.1 I'd get "class not found" exceptions and the like.


1) Can this be done? Can I put my services and .class files in 
/usr/classes and just point /axis/WEB-INF/classes/myproject to that 
area? Did I do something wrong before?


2) Is there another way to simulate this setup? Reason being that we 
don't want to come along and upgrade Axis to 1.2 or Tomcat to 5.5.x 
and wipe out our development code.


I tried reading through old lists and didn't seem to find an answer. 
I'm hoping it's something as simple as adding a classpath in the .wsdd 
file or just that it's not possible. If that is the case it's okay, 
but wanted to rule it out.


Fyi, we're installing on an SGI (not sure it matters).

Thanks in advance,

Andy