Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-17 Thread Afkham Azeez
MessageContext.getCurrentMessageContext().getConfigurationContext().getAxisConfiguration().getTransportIn("http").getParameter("port")

However, the port needs to be provided as a parameter in the TransportIn
config in the axis2.xml file.

HTH
Azeez

On Wed, Dec 17, 2008 at 8:51 PM, Srinath Perera  wrote:

> I did not see a way to get a TransportListener from config contex,
> however, in the listener manager, there is something called getEPR
> forService(), which I think will do the trick. Will try it and let you
> know.
>
> Thanks deepal, Azeez !!!
>
> Srinath
>
>
> On Wed, Dec 17, 2008 at 10:09 AM, Deepal jayasinghe 
> wrote:
> > Hi Srinath,
> >
> > Nice to see you asking a question in the list :)
> > You can get the reply to address as follows
> >  - first get the configuration context
> > - from that you can get something called TransportListener
> > - from that you can ask for a reply to address.
> >
> > Thank you!
> > Deepal
> >> Hi All;
> >>
> >> Is there a way to find the current tomcat port using Axis2 (I need it
> >> to set a replyto address)? Ideally I want to find the service port at
> >> the start up, before any request arrived. If that does not work, I
> >> might be able to live with getting it with message context. Does the
> >> message context property TRANSPORT_ADDR give what I want to find?
> >>
> >> Thanks very much
> >> Srinath
> >>
> >>
> >
> >
> > --
> > Thank you!
> >
> >
> > http://blogs.deepal.org
> > http://deepal.org
> >
> >
>
>
>
> --
> 
> Srinath Perera:
>   Indiana University, Bloomington
>   http://www.cs.indiana.edu/~hperera/
>   http://www.bloglines.com/blog/hemapani
>



-- 
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760


Re: Error getting attachments from SOAPMessage

2008-12-17 Thread Chinmoy Chakraborty
Andreas,

Here is my code snippet.

String contentType = multipart/related;
 boundary=MIMEBoundaryurn_uuid_D988AB74BC9802BDC21229577126047;
 type="text/xml";
 
start="<0.urn:uuid:d988ab74bc9802bdc21229577126...@apache.org<0.urn%3auuid%3ad988ab74bc9802bdc21229577126...@apache.org>
>"

MimeHeaders mimeHeaders = new MimeHeaders();
mimeHeaders.addHeader("Content-Type", contentType);
// Create the SOAP Message using mimeHeader and inputStream
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage soapMsg = mf.createMessage(mimeHeaders, in);

The inputstream is a SOAPMessage with attachments. Now the newly created
soapMsg in above code snippet does not contain any attachment parts.

I am trying to get attachment parts in the following code snippet:

List attachments = new ArrayList()
if (soapMsg.countAttachments() > 0) {
Iterator itr = soapMsg.getAttachments();
while (itr.hasNext()) {
  AttachmentPart att = (AttachmentPart) itr.next();
  DataHandler dh = att.getDataHandler();
  attachments.add(dh);
}
  }

The attachment list is always empty. I am using following jars:

axiom-api-SNAPSHOT.jar (modified on 16th Dec, 2008)
axiom-dom-SNAPSHOT.jar (modified on 16th Dec, 2008)
axiom-impl-SNAPSHOT.jar (modified on 16th Dec, 2008)
axis2-saaj-SNAPSHOT.jar (modified on 12th Dec, 2008)
axis2-saaj-api-1.4.jar (modified on 4th April, 2008)

Chinmoy




On Thu, Dec 18, 2008 at 6:49 AM, Andreas Veithen
wrote:

> Chinmoy,
>
> Can you post the code that demonstrates the problem?
>
> Andreas
>
> On Wed, Dec 17, 2008 at 13:40, Chinmoy Chakraborty 
> wrote:
> > Hi All,
> >
> > I am creating SOAPMessage from inputstream. The inputstream is SOAP with
> > attachments. But the attachmentParts becomes zero in the newly created
> > SOAPMessage though the content type is "multipart/related".
> >
> > Why it is not created attachments when I am creating SOAP from
> inputstream
> > (with attachments)? I am using axiom-api-SNAPSHOT.jar,
> > axiom-dom-SNAPSHOT.jar, axiom-impl-SNAPSHOT.jar.(Axis2 1.4.1)
> >
> > Chinmoy
>


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-17 Thread Srinath Perera
Hi All;

It worked for me with , but with simple axis server. I will later
chack with tomcat and let you know.

Thanks
Srinath

On Wed, Dec 17, 2008 at 11:15 PM, Thilina Gunarathne  wrote:
> Hi Srinath,
> Recently I tried doing this and ended up getting 8080 even if the port is
> changed, which forced me to switch back to passing the port number as a JVM
> property. Please make sure you test this with a  port other than 8080
> Also let me know if it's working now :)...
>
> thanks,
> Thilina
>
> On Wed, Dec 17, 2008 at 10:21 AM, Srinath Perera  wrote:
>>
>> I did not see a way to get a TransportListener from config contex,
>> however, in the listener manager, there is something called getEPR
>> forService(), which I think will do the trick. Will try it and let you
>> know.
>>
>> Thanks deepal, Azeez !!!
>>
>> Srinath
>>
>>
>> On Wed, Dec 17, 2008 at 10:09 AM, Deepal jayasinghe 
>> wrote:
>> > Hi Srinath,
>> >
>> > Nice to see you asking a question in the list :)
>> > You can get the reply to address as follows
>> >  - first get the configuration context
>> > - from that you can get something called TransportListener
>> > - from that you can ask for a reply to address.
>> >
>> > Thank you!
>> > Deepal
>> >> Hi All;
>> >>
>> >> Is there a way to find the current tomcat port using Axis2 (I need it
>> >> to set a replyto address)? Ideally I want to find the service port at
>> >> the start up, before any request arrived. If that does not work, I
>> >> might be able to live with getting it with message context. Does the
>> >> message context property TRANSPORT_ADDR give what I want to find?
>> >>
>> >> Thanks very much
>> >> Srinath
>> >>
>> >>
>> >
>> >
>> > --
>> > Thank you!
>> >
>> >
>> > http://blogs.deepal.org
>> > http://deepal.org
>> >
>> >
>>
>>
>>
>> --
>> 
>> Srinath Perera:
>>   Indiana University, Bloomington
>>   http://www.cs.indiana.edu/~hperera/
>>   http://www.bloglines.com/blog/hemapani
>
>
>
> --
> Thilina Gunarathne  - http://thilinag.blogspot.com
>



-- 

Srinath Perera:
   Indiana University, Bloomington
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-17 Thread Thilina Gunarathne
Hi Srinath,
Recently I tried doing this and ended up getting 8080 even if the port is
changed, which forced me to switch back to passing the port number as a JVM
property. Please make sure you test this with a  port other than 8080
Also let me know if it's working now :)...

thanks,
Thilina

On Wed, Dec 17, 2008 at 10:21 AM, Srinath Perera  wrote:

> I did not see a way to get a TransportListener from config contex,
> however, in the listener manager, there is something called getEPR
> forService(), which I think will do the trick. Will try it and let you
> know.
>
> Thanks deepal, Azeez !!!
>
> Srinath
>
>
> On Wed, Dec 17, 2008 at 10:09 AM, Deepal jayasinghe 
> wrote:
> > Hi Srinath,
> >
> > Nice to see you asking a question in the list :)
> > You can get the reply to address as follows
> >  - first get the configuration context
> > - from that you can get something called TransportListener
> > - from that you can ask for a reply to address.
> >
> > Thank you!
> > Deepal
> >> Hi All;
> >>
> >> Is there a way to find the current tomcat port using Axis2 (I need it
> >> to set a replyto address)? Ideally I want to find the service port at
> >> the start up, before any request arrived. If that does not work, I
> >> might be able to live with getting it with message context. Does the
> >> message context property TRANSPORT_ADDR give what I want to find?
> >>
> >> Thanks very much
> >> Srinath
> >>
> >>
> >
> >
> > --
> > Thank you!
> >
> >
> > http://blogs.deepal.org
> > http://deepal.org
> >
> >
>
>
>
> --
> 
> Srinath Perera:
>   Indiana University, Bloomington
>   http://www.cs.indiana.edu/~hperera/
>   http://www.bloglines.com/blog/hemapani
>



-- 
Thilina Gunarathne  - http://thilinag.blogspot.com


RE: axis2, cxf, spring or Metro

2008-12-17 Thread Shehan Simen
Hi Keith,
Thanx for the reply.
Could you please tell me axis2 tutorial which describe how to write a wsdl2java 
web service using jaxb binding? If I use jaxb data binding, that means I am 
using jax-ws, right?

Regards,
Shehan

From: keith chapman [mailto:keithgchap...@gmail.com]
Sent: 2008-12-18 14:33
To: axis-user@ws.apache.org
Subject: Re: axis2, cxf, spring or Metro

Hi Shehan,

Yes Axis2 does support JAX-WS. ADB does not have full schema support but it 
does support the 90% case very effectively. It supports the most widely used 
schema constructs and most of the time they are the only ones that you will be 
using. In case you need 100% schema support you could always use XMLBeans with 
Axis2. But ADB will give you the best performance.

I am not too familiar with the other frameworks but here are some points about 
Axis2. Axis2 performs very well and also is very extensible. If you find 
something that Axis2 lacks out of the box there are several plug points that 
you can plug into and get your job done the way you want. Also there are quite 
a few companies around that provide enterprise support for Axis2.

Thanks,
Keith.
On Thu, Dec 18, 2008 at 8:17 AM, Shehan Simen 
mailto:ssi...@itree.com.au>> wrote:

Hi,

We are evaluating different ws platforms to select the most suitable one for 
our big projects to come in future. I would like to know whether axis2 is 
supporting JAX-WS which is the preferred standard. Seems adb is still buggy and 
no fully schema support.

Please advise us soon as this is a big decision to our company.



--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


Re: Newbee to webservices

2008-12-17 Thread keith chapman
Hi,

You could refer the quickstart guide [1] as well as the user guide [2]. The
developer portal at WSO2 [3] also has quite a few good articles to get you
started. You could fine a Hello World with Axis2 [4] there too.

Thanks,
Keith.

[1] http://ws.apache.org/axis2/1_4_1/quickstartguide.html
[2] http://ws.apache.org/axis2/1_4_1/userguide.html
[3] http://wso2.org/
[4] http://wso2.org/library/95

On Wed, Dec 17, 2008 at 6:15 PM, Harikrishna Imadabattina <
harikrishna.imadabatt...@techendeavour.com> wrote:

>  Hi all,
>
>  I am a new bee to the web services. And soon I am going to work in a
> project where Axis web services are my assignments. Can you guys please send
> me links where I can learn the core basics, tutorials of web services and
> axis? I already worked in web applications built using frameworks like
> struts, spring and j2ee.
>
>
>
> Thanks
>
> HariKrishna
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


Re: axis2, cxf, spring or Metro

2008-12-17 Thread keith chapman
Hi Shehan,

Yes Axis2 does support JAX-WS. ADB does not have full schema support but it
does support the 90% case very effectively. It supports the most widely used
schema constructs and most of the time they are the only ones that you will
be using. In case you need 100% schema support you could always use XMLBeans
with Axis2. But ADB will give you the best performance.

I am not too familiar with the other frameworks but here are some points
about Axis2. Axis2 performs very well and also is very extensible. If you
find something that Axis2 lacks out of the box there are several plug points
that you can plug into and get your job done the way you want. Also there
are quite a few companies around that provide enterprise support for Axis2.

Thanks,
Keith.

On Thu, Dec 18, 2008 at 8:17 AM, Shehan Simen  wrote:

>  Hi,
>
> We are evaluating different ws platforms to select the most suitable one
> for our big projects to come in future. I would like to know whether axis2
> is supporting JAX-WS which is the preferred standard. Seems adb is still
> buggy and no fully schema support.
>
> Please advise us soon as this is a big decision to our company.
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


axis2, cxf, spring or Metro

2008-12-17 Thread Shehan Simen
Hi,
We are evaluating different ws platforms to select the most suitable one for 
our big projects to come in future. I would like to know whether axis2 is 
supporting JAX-WS which is the preferred standard. Seems adb is still buggy and 
no fully schema support.
Please advise us soon as this is a big decision to our company.


Re: Error getting attachments from SOAPMessage

2008-12-17 Thread Andreas Veithen
Chinmoy,

Can you post the code that demonstrates the problem?

Andreas

On Wed, Dec 17, 2008 at 13:40, Chinmoy Chakraborty  wrote:
> Hi All,
>
> I am creating SOAPMessage from inputstream. The inputstream is SOAP with
> attachments. But the attachmentParts becomes zero in the newly created
> SOAPMessage though the content type is "multipart/related".
>
> Why it is not created attachments when I am creating SOAP from inputstream
> (with attachments)? I am using axiom-api-SNAPSHOT.jar,
> axiom-dom-SNAPSHOT.jar, axiom-impl-SNAPSHOT.jar.(Axis2 1.4.1)
>
> Chinmoy


Axis 1.4 getResponseHeaders() sometimes returning empty array

2008-12-17 Thread McCullough, Ryan
I am using Axis (not Axis2) 1.4.

After submitting a request to the server and receiving a response, I am calling 
SoapBindingStub.getResponseHeaders() (extends org.apache.axis.client.Stub).

Sometimes (rarely), getResponseHeaders() returns an empty SOAPHeaderElement[] 
array. The length of the array is 0.

The response from the server has what looks like a valid header:
http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>8.4.0.95





Here is the function from org/apache/axis/client/Stub.java:
/**
 * Get the array of response header elements
 */
public SOAPHeaderElement[] getResponseHeaders() {
SOAPHeaderElement[] array = new SOAPHeaderElement[0];
try
{
if (_call == null)
return array;
Vector h = 
_call.getResponseMessage().getSOAPEnvelope().getHeaders();
array = new SOAPHeaderElement[h.size()];
h.copyInto(array);
return array;
}
catch (Exception e)
{
return array;
}
}

It looks like an exception is being thrown in the try block somewhere before 
the array is resized.

Any ideas what may be causing this?

I have enabled log4j logging and set the root category to be DEBUG and am 
waiting for the issue to be reproduced.

-Ryan

Ryan McCullough | RightNow Technologies | Integration Tools Engineer
406-556-3162 office | Bozeman, MT | 
rmccullo...@rightnow.com | 
http://www.rightnow.com



RE: [axis2] clustering support

2008-12-17 Thread Tony Dean
thanks for the reply.

From: Afkham Azeez [mailto:afk...@gmail.com]
Sent: Wednesday, December 17, 2008 6:24 AM
To: axis-user@ws.apache.org
Subject: Re: [axis2] clustering support

Yes the config is not necessary but it depends on your definition of a cluster.

Even though your services are stateless, if there are other components such as 
modules that require to keep the states across the cluster in sync, the 
clustering configuration needs to be available.

Azeez
On Wed, Dec 17, 2008 at 12:31 AM, Tony Dean 
mailto:tony.d...@sas.com>> wrote:
Hi,

To enable clustering support for stateless Axis2 services, I think all that is 
necessary is to make the services available from all nodes participating in the 
cluster.  This can be accomplished by either of the following methods:
1.  duplicate service repository on each node
2.  use a URL-based repository to act as a central repository shared by all 
nodes ("axis2.repository.url" web.xml configuration)

Since the services are stateless (no information saved in configuration context 
or service context), it is not necessary to configure Axis2 specific 
clustering, right?  Therefore, the sample cluster configuration below is not 
necessary.

  

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

  

Please confirm.

Thanks.

Tony Dean
SAS Institute Inc.
919.531.6704
tony.d...@sas.com

SAS... The Power to Know
http://www.sas.com




--
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760


[ANNOUNCE] Axis2 1.5 beta-1 is out and ready for testing!

2008-12-17 Thread Glen Daniels

Hi y'all!

I've put the first beta version of Axis2 1.5 up here:

http://people.apache.org/~gdaniels/axis2/dist/1.5-beta-1/

Major Changes Since 1.4.1:
- Refactored, pluggable transports (separate jars, with deployer)
- Clustering improvements (works with EC2)
- Over 100 JIRA issues resolved

This is an initial beta, so there are still a few bugs we expect to nail 
before 1.5 goes out, and we'll be doing a once-over of the docs/etc 
before we go final as well.  Thanks to the team for all the good work so 
far.


For now, please pick it up and kick the tires if you can, paying 
particular attention to any JIRAs you might want to confirm fixes for. 
As always, file new issues (or comment on old ones) at:


http://issues.apache.org/jira/browse/AXIS2

If we can manage to get the final version out before the end of the year 
that would be great.


Thanks,
--Glen


Re: How to create or write to an existing file inside .aar during runtime?

2008-12-17 Thread Seem

Step by Step I getting to the source of my problems

During the runtime process, I will get FileNames as Strings which are
composed with an associated relative path (like "etc/file.name"). Without
the relative path the creating is possible, but with the unknown path...
Do you know any tricks?

Other Question:

Is it possible to save a created file persistently inside an .aar? Also
after the shutdown of the server. Or do I need to save them inside a folder
of tomcat for persistence?


Thanks in advance!



Seem wrote:
> 
> I also tried with no success.
> 
>   FileOutputStream create = new FileOutputStream(ccFilename);
>   create.close();
> 
> In Eclipse everything is working fine, but not if packed as an .aar and
> deployed inside the axis-container.
> 
> 
> 
> 
> Seem wrote:
>> 
>> Hi,
>> 
>> is it possible to create or update a file inside the .aar during the
>> service process?
>> Is there an examplary workaround?
>> 
>> I tried it like this:
>> 
>> String ccFilename = Name of the File anf not a FileObject
>> 
>> try 
>> {
>>  FileWriter create = new FileWriter(ccFilename);
>>  create.close();
>> } 
>> catch (IOException e)
>> {
>>  System.err.println(" FATAL: file to read "
>>  +"consistent context was not found and could 
>> not be created");
>> }
>> 
>> and I always got the IOE.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-create-or-write-to-an-existing-file-inside-.aar-during-runtime--tp21057898p21058755.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: How to create or write to an existing file inside .aar during runtime?

2008-12-17 Thread Seem

I also tried with no success.

  FileOutputStream create = new FileOutputStream(ccFilename);
  create.close();

In Eclipse everything is working fine, but not if packed as an .aar and
deployed inside the axis-container.




Seem wrote:
> 
> Hi,
> 
> is it possible to create or update a file inside the .aar during the
> service process?
> Is there an examplary workaround?
> 
> I tried it like this:
> 
> String ccFilename = Name of the File anf not a FileObject
> 
> try 
> {
>   FileWriter create = new FileWriter(ccFilename);
>   create.close();
> } 
> catch (IOException e)
> {
>   System.err.println(" FATAL: file to read "
>   +"consistent context was not found and could 
> not be created");
> }
> 
> and I always got the IOE.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-create-or-write-to-an-existing-file-inside-.aar-during-runtime--tp21057898p21058316.html
Sent from the Axis - User mailing list archive at Nabble.com.



How to create or write to an existing file inside .aar during runtime?

2008-12-17 Thread Seem

Hi,

is it possible to create or update a file inside the .aar during the service
process?
Is there an examplary workaround?

I tried it like this:

String ccFilename = Name of the File anf not a FileObject

try 
{
FileWriter create = new FileWriter(ccFilename);
create.close();
} 
catch (IOException e)
{
System.err.println(" FATAL: file to read "
+"consistent context was not found and could 
not be created");
}

and I always got the IOE.

-- 
View this message in context: 
http://www.nabble.com/How-to-create-or-write-to-an-existing-file-inside-.aar-during-runtime--tp21057898p21057898.html
Sent from the Axis - User mailing list archive at Nabble.com.



Axis2 stub targetnamespace configuration

2008-12-17 Thread Igor Barma

Hi everybody,
I made a simple SOAP client using wsdl2java.sh, ii have no problems  
and it works fine.
My goal is to have a client that i can easly configure to request  
different WS target.


here is my simply code i play with:

MoodleWSStub stub = new MoodleWSStub();
LoginDocument loginDocument= LoginDocument.Factory.newInstance();
LoginDocument.Login loginDocumentLogin= loginDocument.addNewLogin();
loginDocumentLogin.setUsername("-");
loginDocumentLogin.setPassword("-");
loginDocument.setLogin(loginDocumentLogin);
LoginResponseDocument rep=stub.login(loginDocument);

This request works and uses configuration from my wsdl file. The wsdl  
i used to create my stub with wsdl2java


Now, i want to configure this client to request an other WSTarget (in  
fact, i just change the port of my WS server).


So, in my client i now call:
...
MoodleWSStub stub = new MoodleWSStub("http://localhost:PORT/../../..";);
...

This nearly works but in my SOAP request i have always the old  
namespace definition and so, the following error:


org.apache.axis2.AxisFault: error: The document is not a loginrespo...@http://localhost:8890/moodle19/wspp/wsdl 
: document element namespace mismatch expected "http://localhost:8890/moodle19/wspp/wsdl 
" got "http://localhost:8891/moodle19/wspp/wsdl";

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at localhost.moodle19.wspp.wsdl.MoodleWSStub.fromOM(MoodleWSStub.java: 
19923)
	at localhost.moodle19.wspp.wsdl.MoodleWSStub.login(MoodleWSStub.java: 
2827)

at Test1.main(Test1.java:61)
Caused by: org.apache.xmlbeans.XmlException: error: The document is  
not a loginrespo...@http://localhost:8890/moodle19/wspp/wsdl: document  
element namespace mismatch expected "http://localhost:8890/moodle19/wspp/wsdl 
" got "http://localhost:8891/moodle19/wspp/wsdl";
	at  
org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java: 
452)
	at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java: 
357)
	at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java: 
850)
	at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java: 
826)
	at  
org 
.apache 
.xmlbeans 
.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)
	at localhost.moodle19.wspp.wsdl.LoginResponseDocument 
$Factory.parse(LoginResponseDocument.java:128)
	at localhost.moodle19.wspp.wsdl.MoodleWSStub.fromOM(MoodleWSStub.java: 
19002)

... 2 more



Is anybody knows how can i change the namespace attribute, generated  
by the axis2 stub.


Thx

Igor Barma
i...@pentila.com

Ce message est protégé par les règles relatives au secret de la  
correspondance ; il peut, en outre, contenir des informations à  
caractère confidentiel ou protégées par différentes règles  
déontologiques ; il est établi à destination exclusive de son  
destinataire. Toute divulgation, utilisation, diffusion ou  
reproduction (totale ou partielle) de ce message, ou des informations  
qu'il contient, doit être préalablement autorisée. Tout message  
électronique est susceptible d'altération et son intégrité ne peut  
être assurée. L'auteur décline toute responsabilité au titre de ce  
message s'il a été modifié ou falsifié. Si vous n'êtes pas  
destinataire de ce message, merci de le détruire immédiatement et  
d'avertir l'expéditeur de l'erreur de distribution et de la  
destruction du message.








Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-17 Thread Srinath Perera
I did not see a way to get a TransportListener from config contex,
however, in the listener manager, there is something called getEPR
forService(), which I think will do the trick. Will try it and let you
know.

Thanks deepal, Azeez !!!

Srinath


On Wed, Dec 17, 2008 at 10:09 AM, Deepal jayasinghe  wrote:
> Hi Srinath,
>
> Nice to see you asking a question in the list :)
> You can get the reply to address as follows
>  - first get the configuration context
> - from that you can get something called TransportListener
> - from that you can ask for a reply to address.
>
> Thank you!
> Deepal
>> Hi All;
>>
>> Is there a way to find the current tomcat port using Axis2 (I need it
>> to set a replyto address)? Ideally I want to find the service port at
>> the start up, before any request arrived. If that does not work, I
>> might be able to live with getting it with message context. Does the
>> message context property TRANSPORT_ADDR give what I want to find?
>>
>> Thanks very much
>> Srinath
>>
>>
>
>
> --
> Thank you!
>
>
> http://blogs.deepal.org
> http://deepal.org
>
>



-- 

Srinath Perera:
   Indiana University, Bloomington
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-17 Thread Deepal jayasinghe
Hi Srinath,

Nice to see you asking a question in the list :)
You can get the reply to address as follows
 - first get the configuration context
- from that you can get something called TransportListener
- from that you can ask for a reply to address.

Thank you!
Deepal
> Hi All;
>
> Is there a way to find the current tomcat port using Axis2 (I need it
> to set a replyto address)? Ideally I want to find the service port at
> the start up, before any request arrived. If that does not work, I
> might be able to live with getting it with message context. Does the
> message context property TRANSPORT_ADDR give what I want to find?
>
> Thanks very much
> Srinath
>
>   


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-17 Thread Afkham Azeez
The servlet API does not support getting the port before any requests have
arrived AFAIK. Also, you cannot write Tomcat specific code to get the ports
since Axis2 has to run on multiple App servers. However, if you can live
with writing custom Tomcat code, there is a Tomcat MBean that will give you
this information.



HTH
Azeez

On Wed, Dec 17, 2008 at 6:35 PM, Srinath Perera  wrote:

> Hi All;
>
> Is there a way to find the current tomcat port using Axis2 (I need it
> to set a replyto address)? Ideally I want to find the service port at
> the start up, before any request arrived. If that does not work, I
> might be able to live with getting it with message context. Does the
> message context property TRANSPORT_ADDR give what I want to find?
>
> Thanks very much
> Srinath
>
> --
> 
> Srinath Perera:
>   Indiana University, Bloomington
>   http://www.cs.indiana.edu/~hperera/
>   http://www.bloglines.com/blog/hemapani
>



-- 
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760


[Axis2]Finding current tomcat Port from Axis2

2008-12-17 Thread Srinath Perera
Hi All;

Is there a way to find the current tomcat port using Axis2 (I need it
to set a replyto address)? Ideally I want to find the service port at
the start up, before any request arrived. If that does not work, I
might be able to live with getting it with message context. Does the
message context property TRANSPORT_ADDR give what I want to find?

Thanks very much
Srinath

-- 

Srinath Perera:
   Indiana University, Bloomington
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani


Newbee to webservices

2008-12-17 Thread Harikrishna Imadabattina
Hi all,

 I am a new bee to the web services. And soon I am going to work in a
project where Axis web services are my assignments. Can you guys please send
me links where I can learn the core basics, tutorials of web services and
axis? I already worked in web applications built using frameworks like
struts, spring and j2ee.

 

Thanks

HariKrishna



Error getting attachments from SOAPMessage

2008-12-17 Thread Chinmoy Chakraborty
Hi All,

I am creating SOAPMessage from inputstream. The inputstream is SOAP with
attachments. But the attachmentParts becomes zero in the newly created
SOAPMessage though the content type is "multipart/related".

Why it is not created attachments when I am creating SOAP from inputstream
(with attachments)? I am using axiom-api-SNAPSHOT.jar,
axiom-dom-SNAPSHOT.jar, axiom-impl-SNAPSHOT.jar.(Axis2 1.4.1)

Chinmoy


Re: [axis2] clustering support

2008-12-17 Thread Afkham Azeez
Yes the config is not necessary but it depends on your definition of a
cluster.

Even though your services are stateless, if there are other components such
as modules that require to keep the states across the cluster in sync, the
clustering configuration needs to be available.

Azeez

On Wed, Dec 17, 2008 at 12:31 AM, Tony Dean  wrote:

> Hi,
>
> To enable clustering support for stateless Axis2 services, I think all that
> is necessary is to make the services available from all nodes participating
> in the cluster.  This can be accomplished by either of the following
> methods:
> 1.  duplicate service repository on each node
> 2.  use a URL-based repository to act as a central repository shared by
> all nodes ("axis2.repository.url" web.xml configuration)
>
> Since the services are stateless (no information saved in configuration
> context or service context), it is not necessary to configure Axis2 specific
> clustering, right?  Therefore, the sample cluster configuration below is not
> necessary.
>
>   
>  class="org.apache.axis2.clustering.context.DefaultContextManager">
> class="org.apache.axis2.clustering.context.DefaultContextManagerListener"/>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
>   
>
> Please confirm.
>
> Thanks.
>
> Tony Dean
> SAS Institute Inc.
> 919.531.6704
> tony.d...@sas.com
>
> SAS... The Power to Know
> http://www.sas.com
>
>
>


-- 
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760


Re: How to Use JSON Objects in a Web Service

2008-12-17 Thread Jan Freitag


Hi,

do you have any idea how to implement a web services with the gears  
request and the resposne in JSON?


@Keith: Do you have any idea? You wrote that you know how to do that .

Thanks, JF

Am 12.12.2008 um 17:57 schrieb Jan Freitag:


Hi,

I want to write the web service with plain Axis2, but I'm open for  
other solutions. Here is an example request and response from the  
geolocation api:


Gears Request


{
  "version": "1.1.0",
  "host": "maps.google.com",
  "access_token": "2:k7j3G6LaL6u_lafw:4iXOeOpTh1glSXe",
  "home_mobile_country_code": 310,
  "home_mobile_network_code": 410,
  "radio_type": "gsm",
  "carrier": "Vodafone",
  "request_address": true,
  "address_language": "en_GB",
  "location": {
"latitude": 51.0,
"longitude": -0.1
  },
  "cell_towers": [
{
  "cell_id": 42,
  "location_area_code": 415,
  "mobile_country_code": 310,
  "mobile_network_code": 410,
  "age": 0,
  "signal_strength": -60,
  "timing_advance": 
},
{
  "cell_id": 88,
  "location_area_code": 415,
  "mobile_country_code": 310,
  "mobile_network_code": 580,
  "age": 0,
  "signal_strength": -70,
  "timing_advance": 
}
  ],
  "wifi_towers": [
{
  "mac_address": "01-23-45-67-89-ab",
  "signal_strength": 8,
  "age": 0
},
{
  "mac_address": "01-23-45-67-89-ac",
  "signal_strength": 4,
  "age": 0
}
  ]
}

Server Response


{
  "location": {
"latitude": 51.0,
"longitude": -0.1,
"altitude": 30.1,
"accuracy": 1200.4,
"altitude_accuracy": 10.6,
"address": {
  "street_number": "100",
  "street": "Amphibian Walkway",
  "postal_code": "94043",
  "city": "Mountain View",
  "county": "Mountain View County",
  "region": "California",
  "country": "United States of America",
  "country_code": "US"
}
  },
  "access_token": "2:k7j3G6LaL6u_lafw:4iXOeOpTh1glSXe"
}

Greets,

JF

Am 12.12.2008 um 17:44 schrieb keith chapman:

I'm not familiar with the Geolocation API. Could you post a sample  
request and response message (or JSON objects) for this scenario.


No you do not need to start from WSDL. you could use Java code if  
you wanna use plain Axis2 or you could alternatively use the WSO2  
Mashup Server [1] and write your service using JavaScript.


Thanks,
Keith.

[1] http://wso2.org/projects/mashup

On Fri, Dec 12, 2008 at 10:08 PM, Jan Freitag   
wrote:

Hi,

thank you for the answer. I've seen your blog before, but I don't  
know how to start. Should I start to implement my web service (with  
java) or should i write the wsdl file? I don't know where i can  
configure the rquest format for the JSOn object. The Geolocation  
Api tells me how the JSOn Request Objects look like, but I'm to new  
to Web Services and Axis and JSON to find where I can start.


Perhaps you have som tips how I can start to implement the  web  
Service?


Do you know the Geolocation API ?

Greets

JF

Am 12.12.2008 um 13:44 schrieb keith chapman:


These links might help you. [1] and [2].

Thanks,
Keith.

[1] http://www.keith-chapman.org/2008/09/enabling-json-in-apache-axis2.html
[2] http://www.keith-chapman.org/2008/09/invoking-mashups-using-json.html

On Fri, Dec 12, 2008 at 5:27 PM, Jan Freitag   
wrote:

Hi,

I'm trying to implement a Web Service that gets as Request JSON
Objects ( I try to write my own Location Proivder Service for the
Google Gears Geolocation API). I want to write these JSOn Objects  
on a
HTML page to display them and I want to create a response to the  
JSOn

Request that is also a JSON Response.

When you know how I can use JSON Objects out of the Request and
respond also as JSOn let me know. I looked at the Yahoo example  
but it

did not helped me enough.

Greets.

JF



--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org





--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org






Axis deployment & classloader issue

2008-12-17 Thread Olivier Serve
Hi there !

I'm facing a deployment problem with Axis 1.4 on Tomcat 5.5.26 (using Sun jvm 
1.5.0_10).

I have a webapp that uses Axis.
No problem so far, I just put the Axis jars and dependencies into WEB-INF/lib/ 
and everything works fine.

To secure the access to this webapp (and others on the same Tomcat instance), I 
use a component (set of jars) that is installed in
shared/lib/ in order to be shared amongst all the webapps (this provides an 
instant SSO).
This component implements a Filter that is defined in the web.xml of all our 
protected webapps.
Still nothing unusual here.

The problem is that the security component (a.k.a. security agent) also uses 
Axis (same version). So it needs the Axis jar and dependencies
in shared/lib/.
Doing so, nothing works anymore as I have the following exception when the 
security agent tries to connect to the security infrastructure with Axis :
java.lang.NullPointerException
at 
org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.(Service.java:113)


If I remove the Axis jar and dependencies from the webapp (i.e. Axis is 
installed in shared/lib/ only), it works well until I try to reload the webapp.
Each time I try to use Axis from the webapp, I get the following exception :
java.lang.NullPointerException
at 
org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:973)
at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
at 
org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
at 
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
at 
org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
at 
org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
at 
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
at 
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
at 
org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
at 
org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
at 
org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
at 
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
at 
org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
at 
org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.(Service.java:113)

Restarting Tomcat after each update makes it work again, but it's not very 
practical.

This seems to be a ClassLoader issue, but I don't know enough to fix that by 
myself.

So my question is : is there a clean way to deploy this ? And if so, what is it 
?

Thanks in advance.
-- 
Olivier SERVE
Bull, Architect of an Open World TM
http://www.bull.com


Fwd: Working memory class not found Error in axis2 services

2008-12-17 Thread Kiran Narasareddy
-- Forwarded message --
From: Kiran Narasareddy 
Date: Wed, Dec 17, 2008 at 1:43 PM
Subject: Working memory class not found Error in axis2 services
To: axis-user-h...@ws.apache.org


Hello,
   I am a new axis2 user. I am  trying to execute a set of rules in my
axis2 webservice. The project builds without any error or warning in my
eclipse ( i hve all the necessary library and plugin installed ).When i
deploy the .aar file of my service , it gives me following error.

Error: org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules with an error of The following error occurred during
schema generation: java.lang.ClassNotFoundException: Class Not found :
org.drools.WorkingMemory at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:147)
at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:79)
at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:582)
at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:201)
at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:271)
at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:189)
at
org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:110)
at
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:257)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:74)
at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:486)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:406) at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831) at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720) at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150) at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
org.apache.catalina.core.StandardService.start(StandardService.java:448) at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
org.apache.catalina.startup.Catalina.start(Catalina.java:552) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by:
org.apache.axis2.deployment.DeploymentException: Processing Operations
Modules with an error of The following error occurred during schema
generation: java.lang.ClassNotFoundException: Class Not found :
org.drools.WorkingMemory at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:381)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:98)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:140)
... 36 more Caused by: org.apache.axis2.deployment.DeploymentException: The
following error occurred during schema generation:
java.lang.ClassNotFoundException: Class Not found : org.drools.WorkingMemory
at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:346)
... 38 more Caused by: java.lang.RuntimeException:
java.lang.ClassNotFoundException: Class Not found : org.drools.WorkingMemory
at
org.apache.axis2.deployment.DeploymentClassLoader.findClass(DeploymentClassLoader.java:88)
at java.lang.ClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClassInternal(Unknown Source) at
java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown
Source) at
org.apache.ws.java2wsdl.SchemaGenerator.(SchemaGenerator.java:121) at
org