AW: Large xml response

2008-12-18 Thread Matthias.Gaiser
I thought into the same direction that not the SOAP framework but the
underlying transport framework should take care of this, e.g. like the
tomcat my webapp is running on. Is there somehow an option to do this?

 

With such an option I then might run into interoperability issues on the
other hand or is there a standard solution for such an issue?

 

Matthias.

 

 

I believe this would be a configuration option in Apache to gzip
responses.

 

From: matthias.gai...@t-systems.com
[mailto:matthias.gai...@t-systems.com] 
Sent: Thursday, December 18, 2008 9:38 AM
To: axis-user@ws.apache.org
Subject: Large xml response

 

Hi group,

 

I have read some earlier threads but haven't found an answer there.

I want to implement a web service which will forward large xml strings
which it receives via backend services. I have a few points where I want
to ask if there is a standard solution.

 

- Does Axis offer some standard mechanism to compress the contents which
it delivers back? The packed size of the xml might be around 5mb which
should be ok to return.

- Is there a way to make Axis not (de)serializing the whole xml? AXIOM
is going in that direction that it parses on demand, so I might save
memory if I just take the OMElement I get via the backend services and
return it with my service. What do you think?

 

I am helpful for any hints to a solution.

 

Matthias.

 



Re: generateWSDL method in Axis2

2008-12-18 Thread keith chapman
Hi,

With Axis2 you do not have such a callback method. But here is a workaround
that you could use. Extend the AxisServlet and override the doGet method. In
there check whether its a request for a WSDL and invoke your code for
generating the WSDL.

Thanks,
Keith.

On Thu, Dec 18, 2008 at 10:52 PM, Shah Asrani  wrote:

> In Axis1, I had implemented a call back method "generateWSDL" in my
> provider that extended the BasicProvider.
> In moving to Axis2, I have MessageReceiver that extends
> RawXMLInOutMessageReceiver.  Which callback method is equivalent
> to generateWSDL method in Axis1. I need to generate WSDL with my custom
> code.
>
> Shah Asrani.
>



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

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


Re: JSON - Badgerfish

2008-12-18 Thread Daniel Hiebert
Keith,

I used your information, I tried to change the WSDL from qualified to
elementFormDefault="unqualified", but still having the same problems.
Hence, I started digging on the problem.

Note: I am on Axis2 1.4.1

Here is what I uncovered... and I think I found few things in the
"JSONBadgerfishMessageFormatter".  Basically, I interrogated the  actual
message, which should be post MessageFormatters.

Problem #1:
If my message uses the same NameSpace name  for the operations and the
complex type... the message looks like the following
{"ns:converttemp_XML_Dan":{"@xmlns":{"ns":"http:\/\/converttemp.wsbeans.iseries
\/xsd"},"ns:param0":{"$":"34"}}}

and fails with the following exception:
javax.xml.stream.XMLStreamException: Invalid prefix ns on element ns:param0
at
org.codehaus.jettison.badgerfish.BadgerFishConvention.createQName
(BadgerFishConvention.java:76)
at org.codehaus.jettison.Node.(Node.java:50)
at
org.codehaus.jettison.badgerfish.BadgerFishXMLStreamReader.processKey
(BadgerFishXMLStreamReader.java:100)
at
org.codehaus.jettison.badgerfish.BadgerFishXMLStreamReader.processElement
(BadgerFishXMLStreamReader.java:87)
at org.codehaus.jettison.badgerfish.BadgerFishXMLStreamReader.next
(BadgerFishXMLStreamReader.java:67)
at org.apache.axis2.json.JSONDataSource.serialize
(JSONDataSource.java:104)
at
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.toStringWithConsume
(OMSourcedElementImpl.java:545)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass
(RPCUtil.java:124)
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic
(RPCMessageReceiver.java:102)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic
(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive
(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest
(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.HTTPWorker.service
(HTTPWorker.java:278)
at org.apache.axis2.transport.http.server.AxisHttpService.doService
(AxisHttpService.java:281)
at
org.apache.axis2.transport.http.server.AxisHttpService.handleRequest
(AxisHttpService.java:187)
at org.apache.axis2.transport.http.server.HttpServiceProcessor.run
(HttpServiceProcessor.java:82)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:595)

Workaround:
Give the namespaces different names:
{"ns:converttemp_XML_Dan":{"@xmlns":{"ns":"http:\/\/converttemp.wsbeans.iseries
\/xsd"},"tns:param0":{"@xmlns":{"tns":"http:\/\/converttemp.wsbeans.iseries
\/xsd"},"$":"34"}}}


Problem #2  Occurs after the above workaround:  BTW...the above work-around
works with text/xml

Identical Working Standard MessageType = text/xml  -  This is basic
methodElement.toStringWithConsume()
http://converttemp.wsbeans.iseries/xsd";>
http://converttemp.wsbeans.iseries/xsd";>34


Identical Non-Working Badgerfish MessageType = application/json/badgerfish
This is basic  methodElement.toStringWithConsume()

http://converttemp.wsbeans.iseries/xsd";>
http://converttemp.wsbeans.iseries/xsd";>34


My  XML heading in my XML documents:


I notice the ' verses  " and that is unique, so potentially a problem.
Otherwise I believe the problem, might actually be just removeing the  XML
declaration entirely from the message.

Thoughts??  I will can test further on Monday.


Daniel  Hiebert




|>
| From:  |
|>
  
>--|
  |"keith chapman" 
 |
  
>--|
|>
| To:|
|>
  
>--|
  |axis-user@ws.apache.org  
 |
  
>--|
|>
| Date:  |
|>
  
>--|
  |12/04/2008 09:43 AM   

Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Andreas Veithen
The JSR home page [1] provides some instructions. There is an email
address to send comments to. Note however that the Early Draft Review
is now over and that they are in Public Review until Jan 12, so it
might be a bit too late to bring in new features at this moment...

[1] http://jcp.org/en/jsr/detail?id=315

On Thu, Dec 18, 2008 at 21:50, Deepal jayasinghe  wrote:
>
>> Maybe you should propose that as an enhancement for the upcoming
>> Servlet 3.0 specification (JSR-135)...
>>
> I would love to, because this was something I was looking for few years
> back too. Do you know the procedure of doing that, I mean purposing the
> enhancement request ?
>
> Deepal
>


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal jayasinghe

> Maybe you should propose that as an enhancement for the upcoming
> Servlet 3.0 specification (JSR-135)...
>   
I would love to, because this was something I was looking for few years
back too. Do you know the procedure of doing that, I mean purposing the
enhancement request ?

Deepal


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal jayasinghe
> This is a bit tricky since the Tomcat's server.xml file is different
> from version to version. Hence you will be tied to one or just a few
> versions of Tomcat. On the other hand, if you had used the MBean, you
> could have easily supported multiple versions of Tomcat.
Is there any way we can add the tomcat handler and feed those
information into the servlet context ?

That would be a better approach then dealing with server.xml and MBens.

Deepal
>
> Azeez
>



Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal jayasinghe

> No, that code again go and call listenerManager.getEPRforService(..),
> which I was using. I walked through the code, and
> listenerManager.getEPRforService(..) work fine with other transports,
> but with tomcat, it reads the port off the first request. When in
> doubt  (before the request arrives) it give 8080, which is the case
> thilina was complaining .
>   
I think that is the intended behavior, because the same code should work
for both client side and the server side.
> For my usecase, I can not wait for the first request as what I am
> developing is a management agent. for now, I wrote a code to parse
> tomcat server.xml.
>   
Well, what you are doing is ok, iff you are going to use your
application in tomcat. A better approach would be either feed the port
number using axis2.xml or web.xml

Deepal


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Srinath Perera
yep, but MBean work only if MBean server is truned on (am I right?),
which is off by default  AFAIK. Group of people suppose to use my
agent and I can not ask them all to turn on JMX. If worse come to
worse I would provide a configuration parameter.
Thanks
Srinath


On Thu, Dec 18, 2008 at 3:15 PM, Afkham Azeez  wrote:
> This is a bit tricky since the Tomcat's server.xml file is different from
> version to version. Hence you will be tied to one or just a few versions of
> Tomcat. On the other hand, if you had used the MBean, you could have easily
> supported multiple versions of Tomcat.
>
> Azeez
>
> On Fri, Dec 19, 2008 at 1:38 AM, Srinath Perera  wrote:
>>
>> No, that code again go and call listenerManager.getEPRforService(..),
>> which I was using. I walked through the code, and
>> listenerManager.getEPRforService(..) work fine with other transports,
>> but with tomcat, it reads the port off the first request. When in
>> doubt  (before the request arrives) it give 8080, which is the case
>> thilina was complaining .
>>
>> For my usecase, I can not wait for the first request as what I am
>> developing is a management agent. for now, I wrote a code to parse
>> tomcat server.xml.
>>
>> Thanks very much
>> Srinath
>>
>>
>> On Thu, Dec 18, 2008 at 2:50 PM, Sanjiva Weerawarana
>>  wrote:
>> > Srinath, doesn't ServiceContext.getMyEPR() give you the info you need?
>> >
>> > Sanjiva.
>> >
>> > 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
>> >
>> >
>> > --
>> > Sanjiva Weerawarana, Ph.D.
>> > Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
>> > Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
>> > Member; Apache Software Foundation; http://www.apache.org/
>> > Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>> >
>> > Blog: http://sanjiva.weerawarana.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
>



-- 

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-18 Thread Srinath Perera
thread is going much faster than I could keep up :)

As I understood in tomcat case Axis2 get the port off the first
request (all methods points to getEPRsForService() of the AxisServelt,
which points to ListingAgent). May be that is best we can do given the
situation.

Thanks very much everybody for help!!
Srinath

On Thu, Dec 18, 2008 at 3:06 PM, Sanjiva Weerawarana
 wrote:
> Yes, but EPR is a better way to get the info from rather than hacking around
> message context properties.
>
> Srinath, FYI, see:
>
> http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/ListingAgent.java?view=markup
>
> extractHostAndPort is what pulls the host and port from the request URI. In
> particular, ServiceContext.getMyEPR() was implemented *exactly* for the
> purpose of setting a replyTo address in WS-Addressing.
>
> Sanjiva.
>
> Deepal Jayasinghe wrote:
>>
>> In Srinth's case there is no issue since he gets the request first, and
>> message context has everything he needs. And even he can construct the
>> reply to address from the TO address.
>>
>> Deepal
>>>
>>> Srinath, doesn't ServiceContext.getMyEPR() give you the info you need?
>>>
>>> Sanjiva.
>>>
>>> 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
>>>
>>
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> Blog: http://sanjiva.weerawarana.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-18 Thread Afkham Azeez
This is a bit tricky since the Tomcat's server.xml file is different from
version to version. Hence you will be tied to one or just a few versions of
Tomcat. On the other hand, if you had used the MBean, you could have easily
supported multiple versions of Tomcat.

Azeez

On Fri, Dec 19, 2008 at 1:38 AM, Srinath Perera  wrote:

> No, that code again go and call listenerManager.getEPRforService(..),
> which I was using. I walked through the code, and
> listenerManager.getEPRforService(..) work fine with other transports,
> but with tomcat, it reads the port off the first request. When in
> doubt  (before the request arrives) it give 8080, which is the case
> thilina was complaining .
>
> For my usecase, I can not wait for the first request as what I am
> developing is a management agent. for now, I wrote a code to parse
> tomcat server.xml.
>
> Thanks very much
> Srinath
>
>
> On Thu, Dec 18, 2008 at 2:50 PM, Sanjiva Weerawarana
>  wrote:
> > Srinath, doesn't ServiceContext.getMyEPR() give you the info you need?
> >
> > Sanjiva.
> >
> > 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
> >
> >
> > --
> > Sanjiva Weerawarana, Ph.D.
> > Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
> > Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> > Member; Apache Software Foundation; http://www.apache.org/
> > Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
> >
> > Blog: http://sanjiva.weerawarana.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: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Srinath Perera
No, that code again go and call listenerManager.getEPRforService(..),
which I was using. I walked through the code, and
listenerManager.getEPRforService(..) work fine with other transports,
but with tomcat, it reads the port off the first request. When in
doubt  (before the request arrives) it give 8080, which is the case
thilina was complaining .

For my usecase, I can not wait for the first request as what I am
developing is a management agent. for now, I wrote a code to parse
tomcat server.xml.

Thanks very much
Srinath


On Thu, Dec 18, 2008 at 2:50 PM, Sanjiva Weerawarana
 wrote:
> Srinath, doesn't ServiceContext.getMyEPR() give you the info you need?
>
> Sanjiva.
>
> 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
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> Blog: http://sanjiva.weerawarana.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-18 Thread Sanjiva Weerawarana
Yes, but EPR is a better way to get the info from rather than hacking 
around message context properties.


Srinath, FYI, see:

http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/ListingAgent.java?view=markup

extractHostAndPort is what pulls the host and port from the request URI. 
In particular, ServiceContext.getMyEPR() was implemented *exactly* for the 
purpose of setting a replyTo address in WS-Addressing.


Sanjiva.

Deepal Jayasinghe wrote:

In Srinth's case there is no issue since he gets the request first, and
message context has everything he needs. And even he can construct the
reply to address from the TO address.

Deepal

Srinath, doesn't ServiceContext.getMyEPR() give you the info you need?

Sanjiva.

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







--
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal Jayasinghe
In Srinth's case there is no issue since he gets the request first, and
message context has everything he needs. And even he can construct the
reply to address from the TO address.

Deepal
> Srinath, doesn't ServiceContext.getMyEPR() give you the info you need?
>
> Sanjiva.
>
> 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
>
>

-- 
Thank you!


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



Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Andreas Veithen
Deepal,

Maybe you should propose that as an enhancement for the upcoming
Servlet 3.0 specification (JSR-135)...

Andreas

On Thu, Dec 18, 2008 at 20:53, Deepal Jayasinghe  wrote:
> Yes, that is because something important property is missing in servlet
> API [1]. I think API should be able to provide the ports and type
> (http,https etc) of ports that the servlet is being exposed. Since that
> is available in the application server it should not be that hard to
> expose via servlet.
>
> Thank you!
> Deepal
>
> [1] :
> http://blogs.deepal.org/2008/12/servlet-api-and-available-ports-of.html
>
> Afkham Azeez wrote:
>> There is no simple & straightforward way to get the ports before the
>> server has seen any requests.
>>
>> Azeez
>>
>> On Fri, Dec 19, 2008 at 1:02 AM, Deepal Jayasinghe
>> mailto:dee...@opensource.lk>> wrote:
>>
>> Well, I think that works at the runtime when you receive a request not
>> the system start up time,
>> let's say we need to get the port before we get any request to the
>> system, then how do we do that?
>>
>> I remember I tried to resolve this issue a lot in Axis2, but I
>> could not
>> able to do that, so I have use the request to get the port. Which
>> is not
>> totally correct.
>> > I think you can get the port from the HTTP "Host" header:
>> >
>> > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
>> >
>> > So just get the message context, pull the HTTP headers and get Host.
>> > Will work with HTTP 1.1.
>> >
>> > Sanjiva.
>> >
>> > Srinath Perera wrote:
>> >> Hi Guys;
>> >>
>> >> Does that mean even though it worked for simple axis server, it
>> does
>> >> not work on tomcat?
>> >>
>> >> Azeez, by any chance do you know a pointer to how to do it with
>> >> tomcat? e.g. like JMX approach you mentioned.
>> >>
>> >> Thanks
>> >> Srinath
>> >>
>> >>
>> >> On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez
>> mailto:afk...@gmail.com>> wrote:
>> >>> Rather, the servlet API does not support getting such
>> information, but
>> >>> different App servers do provide ways of getting this information.
>> >>> However,
>> >>> you'd need to write app server specific code to get this
>> information.
>> >>>
>> >>> Azeez
>> >>>
>> >>> On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe
>> mailto:deep...@gmail.com>>
>> >>> wrote:
>> >
>> 
>> 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.
>>  As thilina mentioned, in the case of tomcat you have the
>> issues of the
>>  port. But I do not think you need to ask for the port in
>>  SimpleHttpServer.
>> 
>>  The problem of Tomcat or any other application server is,
>> there is no
>>  way to get the the ports that are available for a given servlet.
>> > HTH
>> > Azeez
>> >
>> > On Wed, Dec 17, 2008 at 8:51 PM, Srinath Perera
>> mailto:hemap...@gmail.com>
>> > >> 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
>> > mailto:deep...@gmail.com>
>> >> 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
>> >

Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal Jayasinghe
Yes, that is because something important property is missing in servlet
API [1]. I think API should be able to provide the ports and type
(http,https etc) of ports that the servlet is being exposed. Since that
is available in the application server it should not be that hard to
expose via servlet.

Thank you!
Deepal

[1] :
http://blogs.deepal.org/2008/12/servlet-api-and-available-ports-of.html

Afkham Azeez wrote:
> There is no simple & straightforward way to get the ports before the
> server has seen any requests.
>
> Azeez
>
> On Fri, Dec 19, 2008 at 1:02 AM, Deepal Jayasinghe
> mailto:dee...@opensource.lk>> wrote:
>
> Well, I think that works at the runtime when you receive a request not
> the system start up time,
> let's say we need to get the port before we get any request to the
> system, then how do we do that?
>
> I remember I tried to resolve this issue a lot in Axis2, but I
> could not
> able to do that, so I have use the request to get the port. Which
> is not
> totally correct.
> > I think you can get the port from the HTTP "Host" header:
> >
> > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
> >
> > So just get the message context, pull the HTTP headers and get Host.
> > Will work with HTTP 1.1.
> >
> > Sanjiva.
> >
> > Srinath Perera wrote:
> >> Hi Guys;
> >>
> >> Does that mean even though it worked for simple axis server, it
> does
> >> not work on tomcat?
> >>
> >> Azeez, by any chance do you know a pointer to how to do it with
> >> tomcat? e.g. like JMX approach you mentioned.
> >>
> >> Thanks
> >> Srinath
> >>
> >>
> >> On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez
> mailto:afk...@gmail.com>> wrote:
> >>> Rather, the servlet API does not support getting such
> information, but
> >>> different App servers do provide ways of getting this information.
> >>> However,
> >>> you'd need to write app server specific code to get this
> information.
> >>>
> >>> Azeez
> >>>
> >>> On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe
> mailto:deep...@gmail.com>>
> >>> wrote:
> >
> 
> 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.
>  As thilina mentioned, in the case of tomcat you have the
> issues of the
>  port. But I do not think you need to ask for the port in
>  SimpleHttpServer.
> 
>  The problem of Tomcat or any other application server is,
> there is no
>  way to get the the ports that are available for a given servlet.
> > HTH
> > Azeez
> >
> > On Wed, Dec 17, 2008 at 8:51 PM, Srinath Perera
> mailto:hemap...@gmail.com>
> > >> 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
> > mailto:deep...@gmail.com>
> >> 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!
> > >
> >>

Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Sanjiva Weerawarana

Srinath, doesn't ServiceContext.getMyEPR() give you the info you need?

Sanjiva.

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



--
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Afkham Azeez
There is no simple & straightforward way to get the ports before the server
has seen any requests.

Azeez

On Fri, Dec 19, 2008 at 1:02 AM, Deepal Jayasinghe wrote:

> Well, I think that works at the runtime when you receive a request not
> the system start up time,
> let's say we need to get the port before we get any request to the
> system, then how do we do that?
>
> I remember I tried to resolve this issue a lot in Axis2, but I could not
> able to do that, so I have use the request to get the port. Which is not
> totally correct.
> > I think you can get the port from the HTTP "Host" header:
> >
> > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
> >
> > So just get the message context, pull the HTTP headers and get Host.
> > Will work with HTTP 1.1.
> >
> > Sanjiva.
> >
> > Srinath Perera wrote:
> >> Hi Guys;
> >>
> >> Does that mean even though it worked for simple axis server, it does
> >> not work on tomcat?
> >>
> >> Azeez, by any chance do you know a pointer to how to do it with
> >> tomcat? e.g. like JMX approach you mentioned.
> >>
> >> Thanks
> >> Srinath
> >>
> >>
> >> On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez 
> wrote:
> >>> Rather, the servlet API does not support getting such information, but
> >>> different App servers do provide ways of getting this information.
> >>> However,
> >>> you'd need to write app server specific code to get this information.
> >>>
> >>> Azeez
> >>>
> >>> On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe 
> >>> wrote:
> >
> 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.
>  As thilina mentioned, in the case of tomcat you have the issues of the
>  port. But I do not think you need to ask for the port in
>  SimpleHttpServer.
> 
>  The problem of Tomcat or any other application server is, there is no
>  way to get the the ports that are available for a given servlet.
> > 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
> > mailto:deep...@gmail.com>> 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
> 
>  --
>  Thank you!
> 
> 
>  http://blogs.deepal.org
>  http://deepal.org
> 
> >>>
> >>>
> >>> --
> >>> 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 4

Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal Jayasinghe
Well, I think that works at the runtime when you receive a request not
the system start up time,
let's say we need to get the port before we get any request to the
system, then how do we do that?

I remember I tried to resolve this issue a lot in Axis2, but I could not
able to do that, so I have use the request to get the port. Which is not
totally correct.
> I think you can get the port from the HTTP "Host" header:
>
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
>
> So just get the message context, pull the HTTP headers and get Host.
> Will work with HTTP 1.1.
>
> Sanjiva.
>
> Srinath Perera wrote:
>> Hi Guys;
>>
>> Does that mean even though it worked for simple axis server, it does
>> not work on tomcat?
>>
>> Azeez, by any chance do you know a pointer to how to do it with
>> tomcat? e.g. like JMX approach you mentioned.
>>
>> Thanks
>> Srinath
>>
>>
>> On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez  wrote:
>>> Rather, the servlet API does not support getting such information, but
>>> different App servers do provide ways of getting this information.
>>> However,
>>> you'd need to write app server specific code to get this information.
>>>
>>> Azeez
>>>
>>> On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe 
>>> wrote:
> 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.
 As thilina mentioned, in the case of tomcat you have the issues of the
 port. But I do not think you need to ask for the port in
 SimpleHttpServer.

 The problem of Tomcat or any other application server is, there is no
 way to get the the ports that are available for a given servlet.
> 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
> mailto:deep...@gmail.com>> 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

 -- 
 Thank you!


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

>>>
>>>
>>> -- 
>>> 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
>>>
>>
>>
>>
>
>

-- 
Thank you!


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



Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Sanjiva Weerawarana

I think you can get the port from the HTTP "Host" header:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

So just get the message context, pull the HTTP headers and get Host. Will 
work with HTTP 1.1.


Sanjiva.

Srinath Perera wrote:

Hi Guys;

Does that mean even though it worked for simple axis server, it does
not work on tomcat?

Azeez, by any chance do you know a pointer to how to do it with
tomcat? e.g. like JMX approach you mentioned.

Thanks
Srinath


On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez  wrote:

Rather, the servlet API does not support getting such information, but
different App servers do provide ways of getting this information. However,
you'd need to write app server specific code to get this information.

Azeez

On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe 
wrote:

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.

As thilina mentioned, in the case of tomcat you have the issues of the
port. But I do not think you need to ask for the port in SimpleHttpServer.

The problem of Tomcat or any other application server is, there is no
way to get the the ports that are available for a given servlet.

HTH
Azeez

On Wed, Dec 17, 2008 at 8:51 PM, Srinath Perera mailto:hemap...@gmail.com>> 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
mailto:deep...@gmail.com>> 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


--
Thank you!


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




--
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








--
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/


Re: Axis 1 in semi-RESTful way

2008-12-18 Thread kat kat
On Thu, Dec 18, 2008 at 4:54 AM, keith chapman wrote:

> Hi,
>
> The WSAS 2.3 release does not support exposing Axis1 services in a RESTfull
> manner. This was fixed very recenly and hence will be available in WSAS 3.0
> which will be out in mid January. If you wanna try it out for the moment you
> could use the public beta [1] that we released last week. There will be
> another beta out before the end of the year.
>
> I will provide you with an example...


All right thanks. This 3.0 release looks really interesting with pick and
choose capability. Looking forward for your example.



>
>
> Thanks,
> Keith.
>
> [1] 
> http://ww2.wso2.org/~wsasbuilder/wsas_3_0/beta1/wso2wsas-SNAPSHOT.zip
>
>
> On Wed, Dec 17, 2008 at 12:44 PM, kat kat  wrote:
>
>> On Fri, Dec 12, 2008 at 7:06 AM, keith chapman 
>> wrote:
>>
>>> AFAIK Axis1 does not have support for REST, but Axis2 has rich support
>>> for REST. Therefore the following might be a good option for you.
>>>
>>> The WSO2 Web Services Application Server (WSO2 WSAS) [1] which is a
>>> complete runtime for web services built on top of Axis2 has a key feature
>>> that lets you expose Axis1 services as Axis2 services (It proxies requests
>>> for Axis1 services via Axis2. Therefore WSAS will accept a REST request and
>>> pass it on as a SOAP request to Axis1). We've just released a public beta of
>>> WSAS 3.0 [2]. (It is available under the Apache Liscense, hence you could
>>> download it and tryit out your self).
>>
>>
>>
>> Is there any example service of this proxy-ing Axis1 service via Axis2? I
>> did download wsas2.3 binary and saw the e.g's TinyURL and Flickr..
>>
>>
>>
>>>
>>>
>>> Thanks,
>>> Keith.
>>>
>>> [1] http://wso2.org/projects/wsas/java
>>> [2]
>>> http://ww2.wso2.org/~wsasbuilder/wsas_3_0/beta1/wso2wsas-SNAPSHOT.zip
>>>
>>>
>>> On Tue, Dec 2, 2008 at 3:39 AM, kat kat  wrote:
>>>


 On Fri, Nov 28, 2008 at 9:07 PM, kat kat  wrote:

> On Fri, Nov 28, 2008 at 8:41 PM, keith chapman <
> keithgchap...@gmail.com> wrote:
>
>> Can you explain why you have to use Axis2 a.4 and not Axis2 a.4.1?
>
>
> Is Axis 1.4 ( http://ws.apache.org/axis/ ) referred as Axis2 a.4?
>
> Well, I am planning to manage the VMWare ESX 3.5 virtual machines using
> the SOAP web service they provide. They have given the WSDL although the
> code generated by WSDL2JAVA class from Axis (
> http://ws.apache.org/axis/ ) and Axis2 are pretty different. VMWare
> recommends development of client code accessing their service on Axis 1.4.
>
> Me being new to both and in the interest to develop the client faster I
> want to kick start with the client code examples they have given. They
> generate client stubs using WSDL2JAVA of Axis 1.4.
>
> I agree same is possible with AXIS2 as well and my original aim was to
> develop a service which will act as a REST server (other projects in my
> company follow REST) and SOAP client for VMWare with REST acting just as a
> interface between my webservice and other projects which use REST client 
> in
> Python.
>
> So is the reason.
>
>
> On Sat, Nov 29, 2008 at 8:27 AM, kat kat  wrote:
>>
>>> Hello All,
>>>
>>> For some reason I will have to use axis 1.4 and not axis2 1.4.1.
>>>
>>> So, can Axis 1, current release 1.4, be used in semi-RESTful way with
>>> just POST/GET methods since it supports WSDL 1.1 and WSDL 1.1, I 
>>> believe,
>>> does support POST and GET methods?
>>
>>

 Any feedback on this? If I want a simple
 application/x-www-form-urlencoded HTTP POST to be performed on one service
 and equivalently a simple GET, can this be done with Axis 1.4. In brief 
 REST
 style POST and GET with Axis 1.4.



> If yes, is there any example for this?
>>>
>>

>>>
>>>
>>> --
>>> 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
>


Re: listServices issue

2008-12-18 Thread Shah Asrani
Thanks Raghu, your answer explains the reasoning.

On Thu, Dec 18, 2008 at 1:48 PM, Raghu Upadhyayula
 wrote:
> Hi Shah,
>
>The listServices will only work if you have the axis2-web folder
> which comes with the Axis2 webapp in your war at the same level of
> WEB-INF, because the listServices functionality in AxisServlet is
> referring a jsp file (listServices.jsp) which is inside axis2-web
> folder.
>
> Thanks
> Raghu
>
> -Original Message-
> From: Shah Asrani [mailto:shahasr...@gmail.com]
> Sent: Thursday, December 18, 2008 11:19 AM
> To: axis-user@ws.apache.org
> Subject: Re: listServices issue
>
> yes, I must have missed something. I can even do ?wsdl on the service
> and get wsdl.  really weird. I will try do some more debugging and may
> be I can find out what is wrong.
>
> On Thu, Dec 18, 2008 at 11:40 AM, Deepal jayasinghe 
> wrote:
>> Shah Asrani wrote:
>>> I have deployed a web service dynamically in Axis2.  The web service
>>> works fine.  When client make a call, web service is found and a
>>> response is returned.  However, if I use the url to list the
> services,
>>> it returns nothing:
>>> http://localhost:8080//services/listServices
>> it is weird  :), if you can access the service then it should be list
> under the available services. May be you have missed something.
>>
>> Deepal
>>
>>> Any Ideas?
>>>
>>> Shah Asrani
>>>
>>>
>>
>>
>> --
>> Thank you!
>>
>>
>> http://blogs.deepal.org
>> http://deepal.org
>>
>>
>


RE: listServices issue

2008-12-18 Thread Raghu Upadhyayula
Hi Shah,

The listServices will only work if you have the axis2-web folder
which comes with the Axis2 webapp in your war at the same level of
WEB-INF, because the listServices functionality in AxisServlet is
referring a jsp file (listServices.jsp) which is inside axis2-web
folder.

Thanks
Raghu

-Original Message-
From: Shah Asrani [mailto:shahasr...@gmail.com] 
Sent: Thursday, December 18, 2008 11:19 AM
To: axis-user@ws.apache.org
Subject: Re: listServices issue

yes, I must have missed something. I can even do ?wsdl on the service
and get wsdl.  really weird. I will try do some more debugging and may
be I can find out what is wrong.

On Thu, Dec 18, 2008 at 11:40 AM, Deepal jayasinghe 
wrote:
> Shah Asrani wrote:
>> I have deployed a web service dynamically in Axis2.  The web service
>> works fine.  When client make a call, web service is found and a
>> response is returned.  However, if I use the url to list the
services,
>> it returns nothing:
>> http://localhost:8080//services/listServices
> it is weird  :), if you can access the service then it should be list
under the available services. May be you have missed something.
>
> Deepal
>
>> Any Ideas?
>>
>> Shah Asrani
>>
>>
>
>
> --
> Thank you!
>
>
> http://blogs.deepal.org
> http://deepal.org
>
>


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Afkham Azeez
Run tomcat with JMX enabled and start jconsole. Connect to the Tomcat
process and go to the MBeans section.

https://wso2.org/repos/wso2/trunk/carbon/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/ServerManagement.javawaitForCompletion
method in WSO2 Carbon code contains some code which
queries Tomcat MBeans.

Azeez

On Thu, Dec 18, 2008 at 10:22 PM, Srinath Perera  wrote:

> Hi Guys;
>
> Does that mean even though it worked for simple axis server, it does
> not work on tomcat?
>
> Azeez, by any chance do you know a pointer to how to do it with
> tomcat? e.g. like JMX approach you mentioned.
>
> Thanks
> Srinath
>
>
> On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez  wrote:
> > Rather, the servlet API does not support getting such information, but
> > different App servers do provide ways of getting this information.
> However,
> > you'd need to write app server specific code to get this information.
> >
> > Azeez
> >
> > On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe 
> > wrote:
> >>
> >> >
> >> >
> 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.
> >> As thilina mentioned, in the case of tomcat you have the issues of the
> >> port. But I do not think you need to ask for the port in
> SimpleHttpServer.
> >>
> >> The problem of Tomcat or any other application server is, there is no
> >> way to get the the ports that are available for a given servlet.
> >> >
> >> > 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
> >> > mailto:deep...@gmail.com>> 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
> >>
> >>
> >> --
> >> Thank you!
> >>
> >>
> >> http://blogs.deepal.org
> >> http://deepal.org
> >>
> >
> >
> >
> > --
> > 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
> >
>
>
>
> --
> 
> 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


Serialize - Deserizalize

2008-12-18 Thread Andre
Hi guys,
I have a big problem for my thesis.I have a class that receives as the only
constructor an Axis MessageContext..and from it divides the Soap message
,inside the context,,into header+body (2 get methods).
My aim is to serialize-deserizalize that class from a test main , using the
2 methods deserialize/serialized that I should override in the class.
I know that MessageContext is not serializable...my prof. keeps on telling
me that I should use Axis ser/dese context...but I don't know how and I
can't find documentation...


Thanks in Advance
-- 
A.P.


Adding Custom elements to an AxisFault's detail

2008-12-18 Thread callagc4

Hi,

I am trying to add a custom element to the detail of an AxisFault. I simply
want to append another element to the detail of the fault. The code snippet
below is my attempt. It works to a point but i am having sporadic issues
with it. 

For example when i debug the code and in doing so slow things down all is
well and the element is added and seen in the resulting SOAP envelope.
However when i let it run at execution speed the added element is not seen
in the SOAP envelope.

Does anyone has any insite as to why this may be the case? Has anyone
successfully added a custom element to an AxisFaults detail.

Thanks,
Cathal

= Code Snippet ==

catch (AxisFault e) {

   OMFactory fac = e.getDetail().getOMFactory();

   OMElement jmsMessageElement = fac.createOMElement(new
QName("errorMessage2"), null);
   jmsMessageElement.setText(message.toString());

   e.getDetail().addChild(jmsMessageElement);

   MessageContext faultContext =
MessageContextBuilder.createFaultMessageContext(msgCtx, e);
   engine.sendFault(faultContext);
}

= Code Snippet ==
-- 
View this message in context: 
http://www.nabble.com/Adding-Custom-elements-to-an-AxisFault%27s-detail-tp21077286p21077286.html
Sent from the Axis - User mailing list archive at Nabble.com.



generateWSDL method in Axis2

2008-12-18 Thread Shah Asrani
In Axis1, I had implemented a call back method "generateWSDL" in my
provider that extended the BasicProvider.
In moving to Axis2, I have MessageReceiver that extends
RawXMLInOutMessageReceiver.  Which callback method is equivalent
to generateWSDL method in Axis1. I need to generate WSDL with my custom code.

Shah Asrani.


Re: listServices issue

2008-12-18 Thread Shah Asrani
yes, I must have missed something. I can even do ?wsdl on the service
and get wsdl.  really weird. I will try do some more debugging and may
be I can find out what is wrong.

On Thu, Dec 18, 2008 at 11:40 AM, Deepal jayasinghe  wrote:
> Shah Asrani wrote:
>> I have deployed a web service dynamically in Axis2.  The web service
>> works fine.  When client make a call, web service is found and a
>> response is returned.  However, if I use the url to list the services,
>> it returns nothing:
>> http://localhost:8080//services/listServices
> it is weird  :), if you can access the service then it should be list under 
> the available services. May be you have missed something.
>
> Deepal
>
>> Any Ideas?
>>
>> Shah Asrani
>>
>>
>
>
> --
> Thank you!
>
>
> http://blogs.deepal.org
> http://deepal.org
>
>


Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Michele Mazzucco

Hi,

a possible solution for tomcat would be to parse the server.xml file.  
As alternative, enable JMX and query the MBean.


Michele


On 18 Dec 2008, at 16:52, Srinath Perera wrote:


Azeez, by any chance do you know a pointer to how to do it with
tomcat? e.g. like JMX approach you mentioned.




Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal jayasinghe
In Tomcat there is some other way, get the request EPR and from that you
can create the reply to address.

Deepal
> Hi Guys;
>
> Does that mean even though it worked for simple axis server, it does
> not work on tomcat?
>
> Azeez, by any chance do you know a pointer to how to do it with
> tomcat? e.g. like JMX approach you mentioned.
>
> Thanks
> Srinath
>
>
> On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez  wrote:
>   
>> Rather, the servlet API does not support getting such information, but
>> different App servers do provide ways of getting this information. However,
>> you'd need to write app server specific code to get this information.
>>
>> Azeez
>>
>> On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe 
>> wrote:
>> 
 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.
 
>>> As thilina mentioned, in the case of tomcat you have the issues of the
>>> port. But I do not think you need to ask for the port in SimpleHttpServer.
>>>
>>> The problem of Tomcat or any other application server is, there is no
>>> way to get the the ports that are available for a given servlet.
>>>   
 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
 mailto:deep...@gmail.com>> 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
 
>>> --
>>> Thank you!
>>>
>>>
>>> http://blogs.deepal.org
>>> http://deepal.org
>>>
>>>   
>>
>> --
>> 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
>>
>> 
>
>
>
>   


-- 
Thank you!


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



RE: Large xml response

2008-12-18 Thread McCullough, Ryan
I believe this would be a configuration option in Apache to gzip responses.

From: matthias.gai...@t-systems.com [mailto:matthias.gai...@t-systems.com]
Sent: Thursday, December 18, 2008 9:38 AM
To: axis-user@ws.apache.org
Subject: Large xml response

Hi group,

I have read some earlier threads but haven't found an answer there.
I want to implement a web service which will forward large xml strings which it 
receives via backend services. I have a few points where I want to ask if there 
is a standard solution.

- Does Axis offer some standard mechanism to compress the contents which it 
delivers back? The packed size of the xml might be around 5mb which should be 
ok to return.
- Is there a way to make Axis not (de)serializing the whole xml? AXIOM is going 
in that direction that it parses on demand, so I might save memory if I just 
take the OMElement I get via the backend services and return it with my 
service. What do you think?

I am helpful for any hints to a solution.

Matthias.



Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Srinath Perera
Hi Guys;

Does that mean even though it worked for simple axis server, it does
not work on tomcat?

Azeez, by any chance do you know a pointer to how to do it with
tomcat? e.g. like JMX approach you mentioned.

Thanks
Srinath


On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez  wrote:
> Rather, the servlet API does not support getting such information, but
> different App servers do provide ways of getting this information. However,
> you'd need to write app server specific code to get this information.
>
> Azeez
>
> On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe 
> wrote:
>>
>> >
>> > 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.
>> As thilina mentioned, in the case of tomcat you have the issues of the
>> port. But I do not think you need to ask for the port in SimpleHttpServer.
>>
>> The problem of Tomcat or any other application server is, there is no
>> way to get the the ports that are available for a given servlet.
>> >
>> > 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
>> > mailto:deep...@gmail.com>> 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
>>
>>
>> --
>> Thank you!
>>
>>
>> http://blogs.deepal.org
>> http://deepal.org
>>
>
>
>
> --
> 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
>



-- 

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


Re: listServices issue

2008-12-18 Thread Deepal jayasinghe
Shah Asrani wrote:
> I have deployed a web service dynamically in Axis2.  The web service
> works fine.  When client make a call, web service is found and a
> response is returned.  However, if I use the url to list the services,
> it returns nothing:
> http://localhost:8080//services/listServices
it is weird  :), if you can access the service then it should be list under the 
available services. May be you have missed something.

Deepal

> Any Ideas?
>
> Shah Asrani
>
>   


-- 
Thank you!


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



Large xml response

2008-12-18 Thread Matthias.Gaiser
Hi group,

 

I have read some earlier threads but haven't found an answer there.

I want to implement a web service which will forward large xml strings
which it receives via backend services. I have a few points where I want
to ask if there is a standard solution.

 

- Does Axis offer some standard mechanism to compress the contents which
it delivers back? The packed size of the xml might be around 5mb which
should be ok to return.

- Is there a way to make Axis not (de)serializing the whole xml? AXIOM
is going in that direction that it parses on demand, so I might save
memory if I just take the OMElement I get via the backend services and
return it with my service. What do you think?

 

I am helpful for any hints to a solution.

 

Matthias.

 



Need advice on authentication

2008-12-18 Thread Nan Null
I need to implement both the client and the server of a webservice.
It needs to be secured.  The server end is implemented in Java Axis2
and runs under Unix.  However, I have to create it in a way that if
the server is re-implemented with .Net and running under Windows, then
the client will still work.

Please tell me what is authentication method to use for this.  I
rather avoid the basic scheme.  I am looking at NTLM, but the document
for Axis2 on the server side is very little.  Would NTLM
authentication on the server side of a webservice works in a Unix box?
 Is there any issue with it (since NTLM is Windows based
authentication).


listServices issue

2008-12-18 Thread Shah Asrani
I have deployed a web service dynamically in Axis2.  The web service
works fine.  When client make a call, web service is found and a
response is returned.  However, if I use the url to list the services,
it returns nothing:
http://localhost:8080//services/listServices

Any Ideas?

Shah Asrani


Re: Error getting attachments from SOAPMessage

2008-12-18 Thread Andreas Veithen
Chinmoy,

I walked through the axis2-saaj code and indeed when creating a
message from an input stream using MessageFactory, axis2-saaj doesn't
even request the attachments from Axiom. However, I'm not familiar
enough with the code to be able to fix this myself.

Maybe somebody else can help here?

Andreas

On Thu, Dec 18, 2008 at 13:05, Chinmoy Chakraborty  wrote:
> Andreas,
>
> Please find attached attachment.xml which I am using as inputstream to
> create SOAPMessage. The MIME boundary in my previous code snippet may differ
> since it is generated at runtime but this is the file generated by another
> system. I am also sending you the code that generates the attached file.
>
> SOAPMessage soapMsg = MessageFactory.newInstance().createMessage();
>   //setting the namespace declaration.
>   SOAPPart sp = soapMsg.getSOAPPart();
>   SOAPEnvelope se = sp.getEnvelope();
>   se.addNamespaceDeclaration("lw", "http://www.abc.com/xml/soap/";);
>   soapMsg.setProperty(soapMsg.CHARACTER_SET_ENCODING, "UTF-8");
>   soapMsg.setProperty(soapMsg.WRITE_XML_DECLARATION, "true");
>   //setting the soap header.
>   SOAPHeader soapHeader = soapMsg.getSOAPHeader();
>   //setting the session id
>   SOAPElement soapHeaderElement1 =
> soapHeader.addChildElement("session", "lw", "http://www.abc.com/xml/soap/";);
>
> soapHeaderElement1.addTextNode("8e0b383911e3942c87fda0be8ae1879b");
>   //setting the transactionId
>   SOAPElement soapHeaderElement2 =
> soapHeader.addChildElement("transactionId", "lw",
> "http://www.abc.com/xml/soap/";);
>   soapHeaderElement2.addTextNode(String.valueOf("2"));
>   //setting the serverId
>   SOAPElement soapHeaderElement3 =
> soapHeader.addChildElement("serverId", "lw",
> "http://www.abc.com/xml/soap/";);
>
> soapHeaderElement3.addTextNode(String.valueOf("192.168.1.66_d7618e5711e394247a7da0be8ae08921"));
>   SOAPBody soapBody = soapMsg.getSOAPBody();
>   SOAPElement callElement = soapBody.addChildElement("call", "lw",
> "http://www.abc.com/xml/soap/";);
>   SOAPElement msgObjectId = callElement.addChildElement("objectId");
>   msgObjectId.addTextNode("system");
>   SOAPElement msgMethod = callElement.addChildElement("method");
>   msgMethod.addTextNode("setRetVal");
>   SOAPElement paramElement = callElement.addChildElement("param");
>   SOAPElement valueElement = paramElement.addChildElement("value");
>   valueElement.addTextNode("attachment.txt");
>   DataHandler dh = new DataHandler(new FileDataSource("C:\\Documents
> and Settings\\lab\\Desktop\\car.txt"));
>   AttachmentPart ap = soapMsg.createAttachmentPart();
>   ap.setContentId("attachment.txt");
>   ap.setContent(dh.getContent(), dh.getContentType());
>   soapMsg.addAttachmentPart(ap);
>
>  OutputStream out = null;
> try {
>   out = socket.getOutputStream();
>   out.write(0x02);
>   soapMsg.writeTo(out);
>   out.write(0x03);
>   out.flush();
> } catch (Exception e) {
>   getLog().error("Exception sending the soap " + e, e);
> } finally {
>   //   if (out == null) out.close();
> }
>
>
> Chinmoy
>
> On Thu, Dec 18, 2008 at 5:21 PM, Andreas Veithen 
> wrote:
>>
>> Chinmoy,
>>
>> Can you also attach a sample message that you try to read with this code?
>>
>> Andreas
>>
>> On Thu, Dec 18, 2008 at 06:23, Chinmoy Chakraborty 
>> wrote:
>> > Andreas,
>> >
>> > Here is my code snippet.
>> >
>> > String contentType = multipart/related;
>> >  boundary=MIMEBoundaryurn_uuid_D988AB74BC9802BDC21229577126047;
>> >  type="text/xml";
>> >  start="<0.urn:uuid:d988ab74bc9802bdc21229577126...@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)
>

Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Afkham Azeez
Rather, the servlet API does not support getting such information, but
different App servers do provide ways of getting this information. However,
you'd need to write app server specific code to get this information.

Azeez

On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe wrote:

>
> >
> 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.
> As thilina mentioned, in the case of tomcat you have the issues of the
> port. But I do not think you need to ask for the port in SimpleHttpServer.
>
> The problem of Tomcat or any other application server is, there is no
> way to get the the ports that are available for a given servlet.
> >
> > 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
> > mailto:deep...@gmail.com>> 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
>
>
> --
> Thank you!
>
>
> http://blogs.deepal.org
> http://deepal.org
>
>


-- 
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: Multiref and Axis2

2008-12-18 Thread Deepal Jayasinghe

>
>
> Hi,
> I am using an Axis2 client to hit an Axis1.4 based WS(rpc/encoded). I
> am constructing the SOAP request payload. The response has multirefs -
> 'multiref href="#id0"'. I am unable to retrive this attachment using
> the Axis2 client.
> How can I get this to work? How can I disbale multirefs on the server
> side? Is there a way to do the same from client side?
As I know there is a parameter you can turn off, I mean then Axis server
will not serialize the response with multirefs. However I can not
exactly remember the name, just go though the configuration file then
you can easily get that.

Deepal
> Thanks,
> Nishant

-- 
Thank you!


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



Re: [Axis2]Finding current tomcat Port from Axis2

2008-12-18 Thread Deepal jayasinghe

> 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.
As thilina mentioned, in the case of tomcat you have the issues of the
port. But I do not think you need to ask for the port in SimpleHttpServer.

The problem of Tomcat or any other application server is, there is no
way to get the the ports that are available for a given servlet.
>
> 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
> mailto:deep...@gmail.com>> 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


-- 
Thank you!


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



Multiref and Axis2

2008-12-18 Thread Nishant Chandra
Hi,
I am using an Axis2 client to hit an Axis1.4 based WS(rpc/encoded). I am
constructing the SOAP request payload. The response has multirefs -
'multiref href="#id0"'. I am unable to retrive this attachment using the
Axis2 client.
How can I get this to work? How can I disbale multirefs on the server side?
Is there a way to do the same from client side?
Thanks,
Nishant


Re: Axis 1 in semi-RESTful way

2008-12-18 Thread keith chapman
Hi,

The WSAS 2.3 release does not support exposing Axis1 services in a RESTfull
manner. This was fixed very recenly and hence will be available in WSAS 3.0
which will be out in mid January. If you wanna try it out for the moment you
could use the public beta [1] that we released last week. There will be
another beta out before the end of the year.

I will provide you with an example...

Thanks,
Keith.

[1] 
http://ww2.wso2.org/~wsasbuilder/wsas_3_0/beta1/wso2wsas-SNAPSHOT.zip

On Wed, Dec 17, 2008 at 12:44 PM, kat kat  wrote:

> On Fri, Dec 12, 2008 at 7:06 AM, keith chapman wrote:
>
>> AFAIK Axis1 does not have support for REST, but Axis2 has rich support for
>> REST. Therefore the following might be a good option for you.
>>
>> The WSO2 Web Services Application Server (WSO2 WSAS) [1] which is a
>> complete runtime for web services built on top of Axis2 has a key feature
>> that lets you expose Axis1 services as Axis2 services (It proxies requests
>> for Axis1 services via Axis2. Therefore WSAS will accept a REST request and
>> pass it on as a SOAP request to Axis1). We've just released a public beta of
>> WSAS 3.0 [2]. (It is available under the Apache Liscense, hence you could
>> download it and tryit out your self).
>
>
>
> Is there any example service of this proxy-ing Axis1 service via Axis2? I
> did download wsas2.3 binary and saw the e.g's TinyURL and Flickr..
>
>
>
>>
>>
>> Thanks,
>> Keith.
>>
>> [1] http://wso2.org/projects/wsas/java
>> [2] 
>> http://ww2.wso2.org/~wsasbuilder/wsas_3_0/beta1/wso2wsas-SNAPSHOT.zip
>>
>>
>> On Tue, Dec 2, 2008 at 3:39 AM, kat kat  wrote:
>>
>>>
>>>
>>> On Fri, Nov 28, 2008 at 9:07 PM, kat kat  wrote:
>>>
 On Fri, Nov 28, 2008 at 8:41 PM, keith chapman >>> > wrote:

> Can you explain why you have to use Axis2 a.4 and not Axis2 a.4.1?


 Is Axis 1.4 ( http://ws.apache.org/axis/ ) referred as Axis2 a.4?

 Well, I am planning to manage the VMWare ESX 3.5 virtual machines using
 the SOAP web service they provide. They have given the WSDL although the
 code generated by WSDL2JAVA class from Axis (
 http://ws.apache.org/axis/ ) and Axis2 are pretty different. VMWare
 recommends development of client code accessing their service on Axis 1.4.

 Me being new to both and in the interest to develop the client faster I
 want to kick start with the client code examples they have given. They
 generate client stubs using WSDL2JAVA of Axis 1.4.

 I agree same is possible with AXIS2 as well and my original aim was to
 develop a service which will act as a REST server (other projects in my
 company follow REST) and SOAP client for VMWare with REST acting just as a
 interface between my webservice and other projects which use REST client in
 Python.

 So is the reason.


 On Sat, Nov 29, 2008 at 8:27 AM, kat kat  wrote:
>
>> Hello All,
>>
>> For some reason I will have to use axis 1.4 and not axis2 1.4.1.
>>
>> So, can Axis 1, current release 1.4, be used in semi-RESTful way with
>> just POST/GET methods since it supports WSDL 1.1 and WSDL 1.1, I believe,
>> does support POST and GET methods?
>
>
>>>
>>> Any feedback on this? If I want a simple
>>> application/x-www-form-urlencoded HTTP POST to be performed on one service
>>> and equivalently a simple GET, can this be done with Axis 1.4. In brief REST
>>> style POST and GET with Axis 1.4.
>>>
>>>
>>>
 If yes, is there any example for this?
>>
>
>>>
>>
>>
>> --
>> 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


Re: axis2, cxf, spring or Metro

2008-12-18 Thread Charith Wickramarachchi
Hi Shehan,

Can you please tell me what you mean  by "wsdl2java web service"? In Axis2
Jax-ws implementation You can simply put a jar file containing a webservice
annotated service class to servicejars directory and make it a web service.

if you want to make stubs from WSDL with jaxb binding you can use wsimport
tool.

thank you,
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/



On Thu, Dec 18, 2008 at 4:50 PM, robert lazarski
wrote:

> On Thu, Dec 18, 2008 at 12:44 AM, Shehan Simen 
> wrote:
> > 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?
> >
>
> http://ws.apache.org/axis2/tools/1_4_1/CodegenToolReference.html
>
> It doesn't seem to be documented there, but anyways, use "-d jaxbri"
> for jaxb. As for Spring and jaxws - someone who knows jaxws will have
> to comment. AFAICT jaxws doesn't use an axis2 services.xml file nor
> the typical MessageRecievers and therefore I'm not what state spring
> and jaxws is in for axis2. Anyways, see the axis2 spring guide because
> setting up a static reference to get your spring beans is simple - see
> this post from a few days ago if interested:
>
> http://marc.info/?l=axis-user&m=122943466610253&w=2
>
> HTH,
> Robert
>



-- 
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/


Re: Error getting attachments from SOAPMessage

2008-12-18 Thread Chinmoy Chakraborty
Andreas,

Please find attached attachment.xml which I am using as inputstream to
create SOAPMessage. The MIME boundary in my previous code snippet may differ
since it is generated at runtime but this is the file generated by another
system. I am also sending you the code that generates the attached file.

SOAPMessage soapMsg = MessageFactory.newInstance().createMessage();
  //setting the namespace declaration.
  SOAPPart sp = soapMsg.getSOAPPart();
  SOAPEnvelope se = sp.getEnvelope();
  se.addNamespaceDeclaration("lw", "http://www.abc.com/xml/soap/";);
  soapMsg.setProperty(soapMsg.CHARACTER_SET_ENCODING, "UTF-8");
  soapMsg.setProperty(soapMsg.WRITE_XML_DECLARATION, "true");
  //setting the soap header.
  SOAPHeader soapHeader = soapMsg.getSOAPHeader();
  //setting the session id
  SOAPElement soapHeaderElement1 =
soapHeader.addChildElement("session", "lw", "http://www.abc.com/xml/soap/";);

soapHeaderElement1.addTextNode("8e0b383911e3942c87fda0be8ae1879b");
  //setting the transactionId
  SOAPElement soapHeaderElement2 =
soapHeader.addChildElement("transactionId", "lw", "
http://www.abc.com/xml/soap/";);
  soapHeaderElement2.addTextNode(String.valueOf("2"));
  //setting the serverId
  SOAPElement soapHeaderElement3 =
soapHeader.addChildElement("serverId", "lw", "http://www.abc.com/xml/soap/
");

soapHeaderElement3.addTextNode(String.valueOf("192.168.1.66_d7618e5711e394247a7da0be8ae08921"));
  SOAPBody soapBody = soapMsg.getSOAPBody();
  SOAPElement callElement = soapBody.addChildElement("call", "lw", "
http://www.abc.com/xml/soap/";);
  SOAPElement msgObjectId = callElement.addChildElement("objectId");
  msgObjectId.addTextNode("system");
  SOAPElement msgMethod = callElement.addChildElement("method");
  msgMethod.addTextNode("setRetVal");
  SOAPElement paramElement = callElement.addChildElement("param");
  SOAPElement valueElement = paramElement.addChildElement("value");
  valueElement.addTextNode("attachment.txt");
  DataHandler dh = new DataHandler(new FileDataSource("C:\\Documents
and Settings\\lab\\Desktop\\car.txt"));
  AttachmentPart ap = soapMsg.createAttachmentPart();
  ap.setContentId("attachment.txt");
  ap.setContent(dh.getContent(), dh.getContentType());
  soapMsg.addAttachmentPart(ap);

 OutputStream out = null;
try {
  out = socket.getOutputStream();
  out.write(0x02);
  soapMsg.writeTo(out);
  out.write(0x03);
  out.flush();
} catch (Exception e) {
  getLog().error("Exception sending the soap " + e, e);
} finally {
  //   if (out == null) out.close();
}


Chinmoy

On Thu, Dec 18, 2008 at 5:21 PM, Andreas Veithen
wrote:

> Chinmoy,
>
> Can you also attach a sample message that you try to read with this code?
>
> Andreas
>
> On Thu, Dec 18, 2008 at 06:23, Chinmoy Chakraborty 
> wrote:
> > 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 <
> andreas.veit...@gmail.com>
> > 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
> >> > attachme

Re: Error getting attachments from SOAPMessage

2008-12-18 Thread Andreas Veithen
Chinmoy,

Can you also attach a sample message that you try to read with this code?

Andreas

On Thu, Dec 18, 2008 at 06:23, Chinmoy Chakraborty  wrote:
> Andreas,
>
> Here is my code snippet.
>
> String contentType = multipart/related;
>  boundary=MIMEBoundaryurn_uuid_D988AB74BC9802BDC21229577126047;
>  type="text/xml";
>  start="<0.urn:uuid:d988ab74bc9802bdc21229577126...@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, cxf, spring or Metro

2008-12-18 Thread robert lazarski
On Thu, Dec 18, 2008 at 12:44 AM, Shehan Simen  wrote:
> 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?
>

http://ws.apache.org/axis2/tools/1_4_1/CodegenToolReference.html

It doesn't seem to be documented there, but anyways, use "-d jaxbri"
for jaxb. As for Spring and jaxws - someone who knows jaxws will have
to comment. AFAICT jaxws doesn't use an axis2 services.xml file nor
the typical MessageRecievers and therefore I'm not what state spring
and jaxws is in for axis2. Anyways, see the axis2 spring guide because
setting up a static reference to get your spring beans is simple - see
this post from a few days ago if interested:

http://marc.info/?l=axis-user&m=122943466610253&w=2

HTH,
Robert


generating java code from an existing wsdl file

2008-12-18 Thread sarvajithraj

HI,

I am using jdk1.6.0_11, axis2-1.4.1.i am new to webservices. i want to
create the java code from the wsdl. i am using
"https://webservices.netsuite.com/wsdl/v2008_1_0/netsuite.wsdl";. when i run
usimg the below command,
wsdl2java -uri https://webservices.netsuite.com/wsdl/v2008_1_0/netsuite.wsdl 
it is showing the following error.
please tell me if where i was going wrong.
and how to reslove this???.
Exception in thread "main" java.lang.NoSuchMethodError:
javax.wsdl.Operation.getExtensionAttributes()Ljava/util/Map;
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateOperations(WSDL11ToAxisServiceBuilder.java:1295)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populatePortType(WSDL11ToAxisServiceBuilder.java:592)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:469)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:363)
at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:147)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)

With Regards
-- 
View this message in context: 
http://www.nabble.com/generating-java-code-from-an-existing-wsdl-file-tp21070498p21070498.html
Sent from the Axis - User mailing list archive at Nabble.com.



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

2008-12-18 Thread Pär Malmqvist

Hi!

It would be great if you could fix this JIRA to the Axis2 1.5 release:
 https://issues.apache.org/jira/browse/AXIS2-3412
Regards
Pär Malmqvist




> Date: Wed, 17 Dec 2008 13:37:16 -0500
> To: axis-...@ws.apache.org; axis-user@ws.apache.org
> Subject: [ANNOUNCE] Axis2 1.5 beta-1 is out and ready for testing!
> From: g...@thoughtcraft.com
> 
> 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

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

Re: Axis2 stub targetnamespace configuration

2008-12-18 Thread Amila Suriarachchi
2008/12/17 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 loginResponse@
> 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.
>

This is not a possible option.

thanks,
Amila.

>
> 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.
>
>
>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/