RE: code generated by wsdl2java

2007-07-20 Thread Desmond Whewell (CV/ETL)
Thanks for the heads-up. I'd never heard of xmltask, but is sounds very
useful.
 

-Original Message-
From: Alejandro Calbazana [mailto:[EMAIL PROTECTED] 
Sent: 20 July 2007 12:34
To: axis-user@ws.apache.org
Subject: Re: code generated by wsdl2java

I'm not a fan of storing generated code under source control.

I don't store anything under source control but the WSDL and my
implementation source files.  I let the build generate my skeleton each
time and I always generate an interface.  I have a custom implementation
for my service living outside of the generated source tree and keep this
under source control.  This implementation implements the generated
interface.  I then muck with the services.xml post build to point to my
own service impl.  I use xmltask
(http://www.oopsconsultancy.com/software/xmltask/) to do the dirty work
of adding necessary attributes and elements to the services.xml
document.  Seems to work out ok..

Here is a snap from an ant build:

   


===
= Generate Source

===
   
   
  


  
   
   

   






===
= Build 

===
   
   
   








   











   



   


Thanks,

Alejandro
.
Desmond Whewell (CV/ETL) wrote:
> Jeff,
>  
> The only files that I store are:
>  
> 1. The ant files that control the generation from the WSDL
>  
> 2. The receiver and skeleton files that replace the boiler plate 
> versions generated by Axis2.
>  
> All others are derived at build time.
>  
> Cheers, Des
>
> --
> --
> *From:* Jeff Gardner [mailto:[EMAIL PROTECTED]
> *Sent:* 20 July 2007 00:12
> *To:* axis-user@ws.apache.org
> *Subject:* code generated by wsdl2java
>
> In general, should code that has been generated by wsdl2java be 
> committed to your version/source control repository?
>  
> Why or why not?



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


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



Support for JMX?

2007-07-20 Thread Desmond Whewell (CV/ETL)
 
Tomcat 5.5 provides rich support for control of the server through JMX.
Are there any plans for Axis2 to provide similar mechanisms?

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



RE: code generated by wsdl2java

2007-07-20 Thread Desmond Whewell (CV/ETL)
Jeff, 
 
The only files that I store are:
 
1. The ant files that control the generation from the WSDL
 
2. The receiver and skeleton files that replace the boiler plate
versions generated by Axis2.
 
All others are derived at build time.
 
Cheers, Des



From: Jeff Gardner [mailto:[EMAIL PROTECTED] 
Sent: 20 July 2007 00:12
To: axis-user@ws.apache.org
Subject: code generated by wsdl2java


In general, should code that has been generated by wsdl2java be
committed to your version/source control repository?
 
Why or why not?


RE: useOriginalwsdl again

2007-07-17 Thread Desmond Whewell (CV/ETL)
They are indentical. I can tell that the two are related because at one point 
the value of useOriginalwsdl was incorrect and I spotted that problem during 
debug of the invoked service.

What I'm unclear about is at what point is the wsld4jdefinition parameter 
created. Does Axis2 create this in advance of the '?wsdl' invocation, at 
start-up, say? Maybe that is where the problem lies? I had the naïve idea that 
when useOriginalwsdl was set to 'true', Axis 2 would simply stream the 
appropriate file in the response. Is the wsdl4j stuff used to support port 
re-writing?

-Original Message-
From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2007 18:44
To: axis-user@ws.apache.org
Subject: Re: useOriginalwsdl again

Did you check the wsdl service name and the service name in the services.xml. 
Those two should be equal .


 



 


Thanks
Deepal

Desmond Whewell (CV/ETL) wrote:
> Axis2 1.2/Tomcat 5.5.9
>
> I have put the following in my services.xml file, as suggested on this
> list:
>
> true
>  name="modifyUserWSDLPortAddress">true
>
> I want the server to supply the original WSDL file but allow it to 
> modify the port address. The original WSDL file is in the META-INF 
> directory. Despite this, it fails with an error in IE:
>
> - 
>   Unable to generate WSDL 1.1 for this 
> service
>   If you wish Axis2 to automatically generate the WSDL 1.1, 
> then please +set useOriginalwsdl as false in your services.xml
>   
>
> Which is a bit odd because I wasn't asking it to generate the WSDL.
>
> If I run in debug, it drops into:
>
> ...
> public void printWSDL(OutputStream out, String requestIP, String
> servicePath) throws AxisFault {
> if (isUseUserWSDL()) {
> Parameter wsld4jdefinition = 
> getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
> if (wsld4jdefinition != null) { ...
>
> It fails at this point because it can't get this parameter. Is this a 
> parameter that I was supposed to add? If so, what value has it?
>
> Cheers, Des
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>   

--
Thanks,
Deepal

"The highest tower is built one brick at a time"



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


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



useOriginalwsdl again

2007-07-16 Thread Desmond Whewell (CV/ETL)
Axis2 1.2/Tomcat 5.5.9

I have put the following in my services.xml file, as suggested on this
list:

true
true

I want the server to supply the original WSDL file but allow it to
modify the port address. The original WSDL file is in the META-INF
directory. Despite this, it fails with an error in IE:

- 
  Unable to generate WSDL 1.1 for this
service 
  If you wish Axis2 to automatically generate the WSDL 1.1, then
please +set useOriginalwsdl as false in your services.xml 
  

Which is a bit odd because I wasn't asking it to generate the WSDL.

If I run in debug, it drops into:

...
public void printWSDL(OutputStream out, String requestIP, String
servicePath) throws AxisFault {
if (isUseUserWSDL()) {
Parameter wsld4jdefinition =
getParameter(WSDLConstants.WSDL_4_J_DEFINITION);
if (wsld4jdefinition != null) {
...

It fails at this point because it can't get this parameter. Is this a
parameter that I was supposed to add? If so, what value has it?

Cheers, Des

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



RE: Pulling wsdl off a server (solved)

2007-07-16 Thread Desmond Whewell (CV/ETL)
For anyone else who is curious,

Ok, just looked on the wire and it appears that Axis2 is munging the
schema locations as

Formal:


Supplied by Axis2:


Dropping ".../axis2/service/MyService?xsd=xsd0" into a browser returns
the schema contents (ie myImportedSchema.xsd).

It does this for all the schemas it comes across.

Cheers,

-Original Message-----
From: Desmond Whewell (CV/ETL) [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2007 13:16
To: axis-user@ws.apache.org
Subject: RE: Pulling wsdl off a server

So if my wsdl used:

...

...

Would that be sufficient? Or do I have to specify the location as a URL?

Cheers, Des

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: 16 July 2007 13:14
To: axis-user@ws.apache.org
Subject: Re: Pulling wsdl off a server

Included or imported schemas should specify a schemaLocation attribute
that specifies the path to the XSDs.

Anne

On 7/16/07, Desmond Whewell (CV/ETL) <[EMAIL PROTECTED]>
wrote:
> I understand that I can retrieve the WSDL of  a service by performing 
> a GET to a URL, ".../axis2/service/MyService?wsdl", say. If I choose 
> to use the original WSDL and that WSDL performs includes or imports, 
> from where should the referenced XSD files be retrieved?
>
> Cheers, Des
>
> Axis2 1.2/Tomcat 5.5.9
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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


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



RE: Pulling wsdl off a server

2007-07-16 Thread Desmond Whewell (CV/ETL)
So if my wsdl used:

...
 
...

Would that be sufficient? Or do I have to specify the location as a URL?

Cheers, Des

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: 16 July 2007 13:14
To: axis-user@ws.apache.org
Subject: Re: Pulling wsdl off a server

Included or imported schemas should specify a schemaLocation attribute
that specifies the path to the XSDs.

Anne

On 7/16/07, Desmond Whewell (CV/ETL) <[EMAIL PROTECTED]>
wrote:
> I understand that I can retrieve the WSDL of  a service by performing 
> a GET to a URL, ".../axis2/service/MyService?wsdl", say. If I choose 
> to use the original WSDL and that WSDL performs includes or imports, 
> from where should the referenced XSD files be retrieved?
>
> Cheers, Des
>
> Axis2 1.2/Tomcat 5.5.9
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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



Pulling wsdl off a server

2007-07-16 Thread Desmond Whewell (CV/ETL)
I understand that I can retrieve the WSDL of  a service by performing a
GET to a URL, ".../axis2/service/MyService?wsdl", say. If I choose to
use the original WSDL and that WSDL performs includes or imports, from
where should the referenced XSD files be retrieved?
 
Cheers, Des
 
Axis2 1.2/Tomcat 5.5.9
 
 

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



RE: axis and UTF-8

2007-07-12 Thread Desmond Whewell (CV/ETL)
What do the bytes look like 'on the wire', using Ethereal, say? 

-Original Message-
From: Frédéric Viollet [mailto:[EMAIL PROTECTED] 
Sent: 12 July 2007 08:40
To: axis-user@ws.apache.org
Subject: Re: axis and UTF-8

Yes, I understand this, but it shouldn't be é
é is a Latin representation that means that I won't be able to send eastern 
characters...
It should be é in UTF-8 representation.

Alick Buckley a écrit :
>
> Hi,
>
> é is an entity
>
> http://www.w3.org/TR/REC-xml/#sec-references
>
>
> -Original Message-
> From: Frédéric Viollet [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 12 July 2007 2:04 AM
> To: axis-user@ws.apache.org
> Subject: axis and UTF-8
>
>
> Hi everybody,
>
> here's my problem. Maybe someone will be able to help me.
> I'm trying to send accents to my web service. But on the client side, 
> the generated XML contains a strange encoding of these characters.
> Here's an example:
> I try to send the 'é' character.
> The generated XML looks like this:
>
> POST /apmadmws HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related, 
> text/*
> User-Agent: Axis/1.4
> Host: zembra:
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: ""
> Content-Length: 919
> Cookie: apmsession=xaNwgUevQncs9ztbdypjrlE1eN+q2Ybr
>
> 
> 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";>
>   
>  http://evidian.com/security/apmadmws";>
> 
>d6a8d2b60475294b8a6221a47ad9507f
>APMOBJTYPEunknown
> 
> 
> ns1:type="APMATTTYPESTRING"
> xmlns:ns1="http://evidian.com/security/apmadmws";>
>   APMATTNAMEAPMDISPLAYNAME
>   
>  fvi
>   
>
> ns2:type="APMATTTYPESTRING"
> xmlns:ns2="http://evidian.com/security/apmadmws";>
>   APMATTNAMEDESCRIPTION
>   
> > é
> <--- Here's the problem
>   
>
>
> 
>  
>   
>
>
>
> The character is not UTF-8 encoded. It looks like the serialization is 
> not done using UTF-8 encoding.
> Does anyone have an idea of what I could do?
>
> Thanks for your help.
>
> Fred
>


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



RE: book

2007-07-06 Thread Desmond Whewell (CV/ETL)
Oops, sorry!



From: Desmond Whewell (CV/ETL) [mailto:[EMAIL PROTECTED] 
Sent: 06 July 2007 12:49
To: axis-user@ws.apache.org
Subject: book



http://www.amazon.co.uk/Professional-Java-Development-Spring-Framework/d
p/0764574833/ref=pd_bowtega_1/026-7101567-0830869?ie=UTF8&s=books&qid=11
83722541&sr=1-1
<http://www.amazon.co.uk/Professional-Java-Development-Spring-Framework/
dp/0764574833/ref=pd_bowtega_1/026-7101567-0830869?ie=UTF8&s=books&qid=1
183722541&sr=1-1> 



book

2007-07-06 Thread Desmond Whewell (CV/ETL)
http://www.amazon.co.uk/Professional-Java-Development-Spring-Framework/d
p/0764574833/ref=pd_bowtega_1/026-7101567-0830869?ie=UTF8&s=books&qid=11
83722541&sr=1-1


RE: Eclipse Europa and XML bindings

2007-07-03 Thread Desmond Whewell (CV/ETL)
Shucks, that's disappointing. :-(
 
Do you have a timeframe for when we might expect xmlbeans support?
 
Cheers, Des



From: Lahiru Sandakith [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2007 10:03
To: axis-user@ws.apache.org
Subject: Re: Eclipse Europa and XML bindings


Hi Desmond, 

For the initial release, it was agreed that we will go ahead with the
default Axis2 data binding (i.e ADB).
Its a feature improvement to the 'jst.ws' component under Eclipse WTP.
AFAIK it will be handled in next release. 

Thanks

Lahiru.


On 7/3/07, Desmond Whewell (CV/ETL) <[EMAIL PROTECTED]>
wrote: 


I have downloaded the new Europa release for Eclipse to make use
of the
improved support for Axis2. However, when setting the Axis
preferences 
for the data binding, the only option is 'ADB'. Does anyone know
what I
have to do to enable support for xmlbeans?

Cheers, Des


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






-- 
Thanks
Lahiru Sandakith

http://sandakith.wordpress.com/
GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC  1AB1 FE5E 7464 1F01 9A0F



Eclipse Europa and XML bindings

2007-07-03 Thread Desmond Whewell (CV/ETL)
 
I have downloaded the new Europa release for Eclipse to make use of the
improved support for Axis2. However, when setting the Axis preferences
for the data binding, the only option is 'ADB'. Does anyone know what I
have to do to enable support for xmlbeans?

Cheers, Des

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



RE: Axis2 1.1.1 WSDL2JAVA - Not generating java classes for

2007-06-25 Thread Desmond Whewell (CV/ETL)
The multiple-run and merge option is exactly what I did. If you study
the generated code, you will see that is it fairly regular and it is
straightforward to merge the results of multiple runs into one
implementation. 

Despite this, it *is* error-prone and extremely tedious. Thankfully, my
wsdl is pretty stable, but if you were going around this loop several
times, it could send you mad! On the other hand, you may find, as I did,
that the generated code is only sufficient to get you started; I had to
add several bits of code to manage header faults. Therefore, you will
probably end up with your own receiver code that is always used in place
of the boiler-plate.

YMMV

Cheers, Des

-Original Message-
From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] 
Sent: 24 June 2007 20:10
To: axis-user@ws.apache.org
Subject: Re: Axis2 1.1.1 WSDL2JAVA - Not generating java classes for


Hi,
>From a glance at the WSDL I feel that you can use the code generator to
generate multiple stubs for the different porttypes and still use it. I
believe even if the codegen had the ability to handle multiple ports, it
would have done the same thing, the difference in this case is that you
have to invoke the codegen multiple times to generate the code for all
ports.

Ajith

On 6/23/07, Alexey Zavizionov <[EMAIL PROTECTED]>
wrote:
> Hi,
> I really haven't time in my wsrp implementation and this impossibility

> for multiple porttypes blocked my project. This leads me to seek other

> soap implementations... :(
>
> Will be fix it soon?
> When will be the next release?
>
> Regards,
> Alexey
>
> On 6/22/07, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> > Hi,
> > You can use -pn, -sn options to specify the different port/service 
> > combinations. As for the point raised by Kim, yes it is a problem 
> > since now each port will yield a different service. Really this 
> > becomes a issue when you have multiple bindings and multiple 
> > porttypes.
> >
> > Ajith
> >
> > On 6/22/07, Alexey Zavizionov <[EMAIL PROTECTED]>
wrote:
> > > How can I do "generate code for each port with separate WSDL2Java 
> > > calls" if I can't modify wsdl file, because it was given by wsrp 
> > > specification 
> > > http://www.oasis-open.org/committees/wsrp/specifications/version1/
> > > wsrp_service.wsdl
> > >  ?
> > >
> > > Regards,
> > > Alexey
> > >
> > >
> > > On 6/22/07, Sagnwoo Kim <[EMAIL PROTECTED]> wrote:
> > > > Ajith suggested multiple wsdl files for the solution of multiple

> > > > ports. I have a question for that. When you want to create 
> > > > client from the wsdl files. with WSDL2Java and if you have
multiple wsdl files for one service.
> > > > Then you have to create multiple clients as well for every 
> > > > ports? Even though they are all under the same service?
> > > >
> > > > Thanks
> > > > Sangwoo Kim
> > > >
> > > >
> > > > On 6/22/07, Bo Xie <[EMAIL PROTECTED]> wrote:
> > > > > Hi Ajith,
> > > > >
> > > > >   Thanks for the comments. Look forward to your explanation. 
> > > > > Like to know
> > > > the difference between the workaround and the expected.
> > > > >
> > > > > Thanks,
> > > > > -Bo
> > > > >
> > > > >
> > > > > On 6/13/07, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> > > > > > Hi,
> > > > > > We will definitely look at the possibility of supporting 
> > > > > > this during the hackathon. I will perhaps explain in a 
> > > > > > separate mail what is the thinking behind starting from the 
> > > > > > port but it seems that we need to rethink this when it comes
to skeletons.
> > > > > >
> > > > > > What I can suggest as a workaround is to generate code for 
> > > > > > each port with separate WSDL2Java calls (which will yield
multiple skeletons).
> > > > > > You can make this easy if you use the ant task
> > > > > >
> > > > > > Ajith
> > > > > >
> > > > > > On 6/13/07, Bo Xie <[EMAIL PROTECTED]> wrote:
> > > > > > > Hi Amila and all,
> > > > > > >
> > > > > > >   In case this is not working yet, can you suggest any 
> > > > > > > alternative? I
> > > > have a
> > > > > > > few services that shared a lot of common data among them. 
> > > > > > > I have to
> > > > move all
> > > > > > > the methods in all services into one mega service and 
> > > > > > > change method
> > > > name if
> > > > > > > necessary to avoid conflicts. Mixing methods of different 
> > > > > > > purpose into
> > > > one
> > > > > > > service looks messy.
> > > > > > >
> > > > > > >Appreciate any advice.
> > > > > > >
> > > > > > > -Bo
> > > > > > >
> > > > > > >
> > > > > > > On 5/24/07, Jess Fisher < [EMAIL PROTECTED]> wrote:
> > > > > > > > I still cannot get all the portTypes generated even with
Axis 1.2.
> > > > Any
> > > > > > > plans on fixing this ?
> > > > > > > >
> > > > > > > >
> > > > > > > > Bo Xie < [EMAIL PROTECTED]> wrote:
> > > > > > > > Sorry to bother you again. Just want to know if this is 
> > > > > > > > a bug or I
> > > > did not
> > > > > > > set the parameter correctly. Any advice on how to make
this work.
> > > > > > > >
>

[axis2] wsdl2java versus scomp (xmlbeans)

2007-06-18 Thread Desmond Whewell (CV/ETL)
Using: Axis2 1.2, xmlbeans 2.2.0

I have a wdsl file and a set of schemas that I am trying to process
using wsdl2java. When invoked, wsdl2java fails with:

---
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:256)
...
... Stuff chopped out
...
Caused by: org.apache.xmlbeans.XmlException:
project://local/.xsd:3:1: error: Included schema has a target
namespace "one-uri" that does not match the source namespace "two-uri"
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaT
ypeSystemCompiler.java:225)
---

Note: the above is obfuscated, but it shows the intent.

The wsdl file and schema set are valid, according to XMLSpy.

As an experiment, I downloaded xmlbeans 2.2.0 and compiled the very same
wsdl file. xmlbeans completed without complaint, generating all of the
expected class and xsb files.

In short, why does Axis2 and xmlbeans have different behaviour when
processing identical schemas.

I can always fall back to calling Axis2 with no data binding and then
use the explicit xmlbeans classes, but I'd prefer to use the monolithic
approach.

Cheers, Des

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



RE: Forcing the unpacking of aar files

2007-05-31 Thread Desmond Whewell (CV/ETL)
Yes, that is what I have reverted to doing. I have an issue with my
business logic such that it will only work correctly when some of the
bundled resources are held as real files on Tomcat, rather than
contained in a Jar.

I really should fix this problem, but I was hoping for a quick fix that
would allow me to deploy an aar file and then let Axis2 unpack it into
the typical directory tree layout. It's easier to manage the single aar
file in my build system.

Thanks anyway.

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: 31 May 2007 13:47
To: axis-user@ws.apache.org
Subject: Re: Forcing the unpacking of aar files

Des,

You can actually deploy an unpacked aar :

http://www.developer.com/open/article.php/10930_3557741_2

-- dims

On 5/31/07, Desmond Whewell (CV/ETL) <[EMAIL PROTECTED]>
wrote:
>
> Is there a configuration option that will force Axis2 (1.2) to unpack 
> the the aar files upon deployment?
>
> Cheers, Des
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Davanum Srinivas :: http://davanum.wordpress.com

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


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



Forcing the unpacking of aar files

2007-05-31 Thread Desmond Whewell (CV/ETL)
 
Is there a configuration option that will force Axis2 (1.2) to unpack
the the aar files upon deployment?

Cheers, Des

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



RE: [axis2]What is the equivalent of 'ServletContextListener' in Axis2?

2007-05-25 Thread Desmond Whewell \(CV/ETL\)
Thank you, I will study that.

Was that information available on the Axis2 site? I always look there
first for reference documentation. I will add the wso2 site to my trawl
net.

Cheers, Des
 

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: 25 May 2007 13:29
To: axis-user@ws.apache.org
Subject: Re: [axis2]What is the equivalent of 'ServletContextListener'
in Axis2?

Try ServiceLifeCycle:
http://wso2.org/library/333

-- dims

On 5/25/07, Desmond Whewell (CV/ETL) <[EMAIL PROTECTED]>
wrote:
>
>
> Sorry, I omitted to say I'm using Axis2 1.2 as a war file on Tomcat 
> 5.5
>
>  ____________________
>  From: Desmond Whewell (CV/ETL) [mailto:[EMAIL PROTECTED]
> Sent: 25 May 2007 10:17
> To: axis-user@ws.apache.org
> Subject: [axis2]What is the equivalent of 'ServletContextListener' in
Axis2?
>
>
>
>
> Is there an equivalent in Axis2 that gives the capability that 
> ServletContextListener gives in Servlets?
>
> I have used ServletContextListener in Tomcat as a way of copying 
> , defined in web.xml, into System properties. These 
> properties can then be examined throughout the buisness logic to 
> control behaviour. The listener looks like:
>
> // Copy the context parameters into the System properties
> ServletContext context = event.getServletContext();
>
> String itemName = null;
> String itemValue = null;
> Enumeration names = context.getInitParameterNames();
> while (names.hasMoreElements()) {
> itemName = (String) (names.nextElement());
>
> // Do not overwrite properties that already exist. I.e. 
> those that
> // may have been passed in by other means.
> if (System.getProperty(itemName) == null) {
> itemValue = context.getInitParameter(itemName);
> if (itemValue != null) {
> System.setProperty(itemName, itemValue);
> }
> }
> }
>
>
> I would like to do the same with Axis2 services using the equivalent 
> services.xml and . Do such hooks exist in Axis2 and will it

> ensure that the properties end up in the correct classloader?
>
> Incidently, is there a schema definition for the services.xml
instances?
>
> Cheers, Des


--
Davanum Srinivas :: http://davanum.wordpress.com

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


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



RE: [axis2]What is the equivalent of 'ServletContextListener' in Axis2?

2007-05-25 Thread Desmond Whewell \(CV/ETL\)
Sorry, I omitted to say I'm using Axis2 1.2 as a war file on Tomcat 5.5



From: Desmond Whewell (CV/ETL) [mailto:[EMAIL PROTECTED] 
Sent: 25 May 2007 10:17
To: axis-user@ws.apache.org
Subject: [axis2]What is the equivalent of 'ServletContextListener' in
Axis2?



Is there an equivalent in Axis2 that gives the capability that
ServletContextListener gives in Servlets? 

I have used ServletContextListener in Tomcat as a way of copying
, defined in web.xml, into System properties. These
properties can then be examined throughout the buisness logic to control
behaviour. The listener looks like:

// Copy the context parameters into the System properties 
ServletContext context = event.getServletContext(); 

String itemName = null; 
String itemValue = null; 
Enumeration names = context.getInitParameterNames(); 
while (names.hasMoreElements()) { 
itemName = (String) (names.nextElement()); 

// Do not overwrite properties that already exist. I.e.
those that 
// may have been passed in by other means. 
if (System.getProperty(itemName) == null) { 
itemValue = context.getInitParameter(itemName); 
if (itemValue != null) { 
System.setProperty(itemName, itemValue); 
} 
} 
} 


I would like to do the same with Axis2 services using the equivalent
services.xml and . Do such hooks exist in Axis2 and will it
ensure that the properties end up in the correct classloader? 

Incidently, is there a schema definition for the services.xml instances?


Cheers, Des 



[axis2]What is the equivalent of 'ServletContextListener' in Axis2?

2007-05-25 Thread Desmond Whewell \(CV/ETL\)
Is there an equivalent in Axis2 that gives the capability that
ServletContextListener gives in Servlets?

I have used ServletContextListener in Tomcat as a way of copying
, defined in web.xml, into System properties. These
properties can then be examined throughout the buisness logic to control
behaviour. The listener looks like:

// Copy the context parameters into the System properties
ServletContext context = event.getServletContext();

String itemName = null;
String itemValue = null;
Enumeration names = context.getInitParameterNames();
while (names.hasMoreElements()) {
itemName = (String) (names.nextElement());

// Do not overwrite properties that already exist. I.e.
those that
// may have been passed in by other means.
if (System.getProperty(itemName) == null) {
itemValue = context.getInitParameter(itemName);
if (itemValue != null) {
System.setProperty(itemName, itemValue);
}
}
}


I would like to do the same with Axis2 services using the equivalent
services.xml and . Do such hooks exist in Axis2 and will it
ensure that the properties end up in the correct classloader? 

Incidently, is there a schema definition for the services.xml instances?

Cheers, Des



Trouble adding SOAP Header elements when faults occur

2007-05-17 Thread Desmond Whewell \(CV/ETL\)
I am trying to build my first web-service using Axis2 (vers 1.2) and I
am having trouble with the SOAP Header when faults occur. I have:

@ generated the Java code from the WSDL, with xmlbeans bindings, 

@ implemented the business logic in the generated
MyServiceMessageReceiverInOut, shown in outline below

@ successfully invoked the no-fault case for the service.

If MySkeleton throws a MyFaultException, it is caught and wrapped in an
AxisFault. As a result, the client gets a SOAP Body with an embedded
SOAP Fault, so that's good.

The bit I can't figure out is what I need to do when I have a problem
with one of the SOAP headers and I want to put a particular SOAP header
in the SOAP envelope carrying the SOAP Fault back to the client. I have
searched the list and the Axis2 documentation with no luck.



Cheers, Des

The generated MyServiceMessageReceiverInOut looks roughly like this
structure
-
public void
invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext,
 
org.apache.axis2.context.MessageContext newMsgContext)
throws org.apache.axis2.AxisFault {

try {

// get the implementation class for the Web Service
...
// prepare the out Envelop
org.apache.axiom.soap.SOAPEnvelope envelope = null;
// Find the axisOperation that has been set by the Dispatch
phase.
...
if (op.getName() != null
& (methodName =
org.apache.axis2.util.JavaUtils.xmlNameToJava(op.getName().getLocalPart(
))) != null) {

if ("MyOperation".equals(methodName)) {

// Unwrap header
SOAPHeader sOAPHeader = .
// Check the header and possibley throw
MyServiceFaultException 
...
// Unwrap body
...
// Invoke the logic
result = skel.MySkeleton(body, header); // This can
throw MyServiceFaultException 
// Create new envelope
envelope =
getSOAPFactory(msgContext).getDefaultEnvelope();
// Add the body
envelope.getBody().addChild(toOM(result, false));
// Replace the header
envelope.getHeader().detach();
envelope.getBody().insertSiblingBefore(sOAPHeader);
}
   
newMsgContext.setEnvelope(envelope);
}
} catch (MyFaultException e) {
// HOW DO I GET SOME HEADERS IN THE SOAP response???
org.apache.axis2.AxisFault f = createAxisFault(e);
f.setDetail(toOM(e.getFaultMessage(), false));
throw f;
}

catch (Exception e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
-


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