[ANNOUNCE] Axis2 1.5.1

2009-10-23 Thread Glen Daniels
Hi all:

The Apache Axis2 team is pleased to announce the release of Axis2 version 1.5.1.

Major Changes Since 1.5:

*  Fix for the dreaded "CLOSE_WAIT" problem (JIRA issues 935, 2883, etc).
We now share an instance of HTTPClient across each ConfigurationContext (i.e.
each Axis2 server or ServiceClient) - connection reuse is now automatic. This
means the REUSE_HTTP_CLIENT flag is no longer necessary or useful, nor is
creating your own MultithreadedHttpConnectionManager.  We also now throw a
useful exception after 30 seconds if you DO run into connection starvation
issues.

* Transport deployer is now actually functional, and getListenerManager()
in ConfigurationContext now creates a new LM if there isn't one already.

* Fix for AXIS2-4034, module versions now support real versions like "1.5.1"

* NPE problem (see AXIS2-4114) fixed in MessageContext while retrieving
policy.

You can find the new version at the usual location:
  http://ws.apache.org/axis2

(please note that it may be an hour or two before all the mirrors update)

Please report any issues via JIRA:
  http://issues.apache.org/jira/browse/AXIS2.

As always, we welcome any and all feedback at:
  axis-...@ws.apache.org - for developer-related questions/concerns
  axis-user@ws.apache.org - for general questions, usage, etc.

Also, don't forget that ApacheCon 2009 is around the corner, November 2-6 in
Oakland CA!  Many of the Axis2 / Apache Web Services developers will be on
hand, and we're running a track day for the project on Thursday.  We hope to
see you there.

Sign up today at http://us.apachecon.com/c/acus2009/

Thanks for your interest in Apache Axis2!

--Glen Daniels


How to get an instance of java.io.Socket class of HTTP response

2009-10-23 Thread Yuzo Koga
Hi, I'm new to axis2.

I would like to implement to check at server side, if there is a TCP
connection between client and server (i.e., check that the connection
has not yet been time-outed), before I send a SOAP response message to
the client over HTTP.  In order to check it, I think I have to get an
instance of java.io.Socket class into which the server sends the SOAP
response message as a HTTP response.

Does anybody know how to program it?
Is there any sample code, or reference manuals on the web?

Yuzo

-- 
Yuzo Koga


Re: Is WRAPPED LITERAL web service not compatible for C# clients?

2009-10-23 Thread Srinivasa K
Thanks for your help on this. We prefer to use "Wrapped Literal". We got a
work around this issue.
If we comment line like:  [System.Xml.Serialization.XmlTypeAttribute
(Namespace=http://data.us.org.test)] in the C# reference file, its working.
I dont know that we have better approach than this one.

Anyway, Thank you!

On Tue, Sep 29, 2009 at 11:39 AM, Srinivasa K wrote:

> Thank you very much for your reply on this.
>
> We dont have C# connectivity issue. Below is the wsdd file where style is
> wrapped and use is literal. This is not working from C# client.
> The response has null references. But, in server side, we clearly see
> incoming and outgoing soap messages.
>
>  If I change style to "rpc" and use to "encoded", C# client gettting the
> results without changing anything esle. I dont know whats missing here. I
> really appreciate if you have any clue on this.
>
> Please note that I changed some namespace in the below wsdd file just for
> company privacy.
>
> +
>use="literal">
>   
> 
>  
>   https://us.org.test/WS/services/perservice"/
> >
>   
>   https://us.org.test/WS/services/perservice,http://data.ws.test.org.us"/
> >
>   
>value="us.org.test.ws.PersonServiceImpl"/>
>   
>   
>xmlns:operNS="https://us.org.test/WS/services/perservice";
> returnQName="retNS:findPersonsReturn" xmlns:retNS="
> https://us.org.test/WS/services/perservice"; returnType="rtns:
> WSSearchResult" xmlns:rtns="http://data.ws.test.org.us"; soapAction="" >
> https://us.org.test/WS/services/perservice"; type="tns: WSSearchCriteria"
> xmlns:tns="http://data.ws.test.org.us"/ >
>   
> .
> .
> .
> .
> .
>
>
> +
>
> Thanks,
> Srini
> 2009/9/26 José Ferreiro 
>
>
>> Hello,
>>
>> I am using "Wrapped" and it works well with Java and C# dotnet 2.0
>> See links below.
>>
>> ht
>> tp://magnot.blogspot.com/2008/04/secure-web-services-interoperability.html
>>
>> http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html
>>
>> Hope this helps.
>>
>> José Ferreiro
>>
>>   On Fri, Sep 25, 2009 at 11:22 PM, Srinivasa K > > wrote:
>>
>>> We are having issue with WRAPPED LITERAL web service for our C# clients.
>>> The response object contains nulls.
>>>
>>> But, If I use RPC ENCODED, they are working fine. I see some
>>> discouragement to use the RPC ENCODED.
>>>
>>> I really appreciate if somebody suggest the right use and style of WSDL
>>> for both Java and C# clients.
>>>
>>> We produce web services using Axis1.4
>>>
>>> Thanks,
>>>
>>> Srini
>>>
>>
>>
>>
>> --
>> José Ferreiro
>> Systems Analysis and Design Specialist
>> MSc in Communication Systems, EPFL.
>>
>> "Think little goals and expect little achievements. Think big goals and
>> win big success."  David Joseph Schwartz
>>
>
>


Re: RES: Problems with Date objects on Axis2

2009-10-23 Thread Mauro Molinari

Guilherme Fré ha scritto:

Hi Amila,

I found out what was my problem. I noticed that when I use date time 
objects and the Visual Studio helper for creating the client code, 
besides de date time objects, bool objects are created for each one of 
them with the name %nome%Specified, where %nome% is the name of the date 
time objects. I discovered that if I set these bools to true, It works, 
but if not, the web service receives all the date time objects as null. 
And this also happens when using Calendar.


The problem might be related to the minOccurs="0" attribute in the 
generated WSDL.

Have a look at:
https://issues.apache.org/jira/browse/AXIS2-3300

Hope this helps in some way.

--
Mauro Molinari
Software Designer & Developer
E-mail: mauro.molin...@cardinis.com


RE: JMS timeout

2009-10-23 Thread jsheh

setting this on the stub, did it for me.
   
options.setProperty(JMSConstants.JMS_WAIT_REPLY,Long.valueOf("some_value_inmillisecs"));

hope it helps.


mgainty wrote:
> 
> 
> take a look at JMSEndpoint javadoc at
> http://ws.apache.org/axis/java/apiDocs/org/apache/axis/transport/jms/JMSEndpoint.html
> 
> you can specfy timeout via 2nd parameter to call method
>  
> byte[]
> call(byte[] message,
>  long timeout)
> 
> 
> 
> Anyone else?
> Martin 
> __ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and
> Sender does not endorse distribution to any party other than intended
> recipient. Sender does not necessarily endorse content contained within
> this transmission. 
> 
> 
> Date: Tue, 12 Aug 2008 08:13:21 -0700
> From: el-al...@intalio.com
> To: axis-user@ws.apache.org
> Subject: JMS timeout
> 
> Hi everybody,
> I have set up my JMS transport, and I would like now to call a service via
> JMS.
> 
> The problem is this service needs more than 20 seconds to answer back, and
> the timeout for this transport is set to 3ms.
> 
> How can I modify the timeout?
> 
> Thanks in advance
> Ihab
> 
> 
> _
> Get more from your digital life.  Find out how.
> http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home2_082008
> 

-- 
View this message in context: 
http://www.nabble.com/JMS-timeout-tp18946364p26027126.html
Sent from the Axis - User mailing list archive at Nabble.com.



One Webservice with many Methods which are in different Namespaces

2009-10-23 Thread Max Unrau
Hello everybody,

is it possible to create a Webservice with many Methods, which are in different 
Namespaces and have their one SOAPAction_
And how can I config this?

Thanks for any Idee.
Max
___
Neu: WEB.DE DSL bis 50.000 kBit/s und 200,- Euro Startguthaben!
http://produkte.web.de/go/02/



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Axis2 Problem

2009-10-23 Thread dpeinador

Thank you,

it was the error.



Deepal Jayasinghe-2 wrote:
> 
> How about MyItem as I can see it is a not a Java bean. To be a valid
> Java bean you need to have following stuff in your class;
>  - default constructor
>  - getter and setter for each filed you want to expose
> 
> Thanks,
> Deepal
>> Hello all, 
>>
>> I am having a problem with Axis2. I have done some tests and I can not
>> advance. All the inner attributes of the objects I receive are null.
>>
>> In the server side I have a simple class:
>>
>> public class MyItem implements Serializable {
>>  private static final long serialVersionUID = 1L;
>>  
>>  String message;
>>  
>>  public ListItemArray() {
>>  message = "Test";
>>  }
>>  
>>  public String getMsg() {
>>  return message;
>>  }
>>  public void setMsg(String message) {
>>  this.message = message;
>>  }
>> }
>>
>> And a method:
>>
>> public MyItem getItem(){
>>MyItem i = new MyItem();
>>return i;
>> }
>>
>> In the client size I have an stub like:
>>
>>WSStub customer = null;
>>WSStub.GetItemResponse response = null;
>>   
>>try {
>>  // creamos el soporte y la peticion
>>  customer = new WSStub (sEndPoint);
>>
>>  // invocamos al web service
>>  try {
>>  response = customer.getItem();
>>  } catch (Exception e) {
>>  e.printStackTrace();
>>  }
>>
>>MyItem i = response.get_return();
>>
>> And inside the MyItem object, the message field is null. I have tried to
>> return a String and it is ok.
>>
>> Can anyone help me?
>>   
> 
> 
> -- 
> Thank you!
> 
> 
> http://blogs.deepal.org
> http://deepal.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Axis2-Problem-tp26025185p26025771.html
Sent from the Axis - User mailing list archive at Nabble.com.



RES: Problems with Date objects on Axis2

2009-10-23 Thread Guilherme Fré
Hi Amila,

 

I found out what was my problem. I noticed that when I use date time objects
and the Visual Studio helper for creating the client code, besides de date
time objects, bool objects are created for each one of them with the name
%nome%Specified, where %nome% is the name of the date time objects. I
discovered that if I set these bools to true, It works, but if not, the web
service receives all the date time objects as null. And this also happens
when using Calendar.

 

I’d prefer if I had not these bools. Do you have any ideas on how to
overcome this problem? 

 

De: Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] 
Enviada em: terça-feira, 20 de outubro de 2009 07:16
Para: axis-user@ws.apache.org
Assunto: Re: Problems with Date objects on Axis2

 

this[1] may help you.

Amila

[1]http://amilachinthaka.blogspot.com/2009/09/handling-date-and-datetime-wit
h-axis2.html

2009/10/19 Guilherme Fré 

Hi guys,

 

I’ve developed a WS using Axis2 and I’m trying to consume it using a C#.Net
client.

 

I have one method that require data parameters and I’m populating them with
DateTime objects from .Net. 

 

Also I have noticed that the parameter I have to set has the type
“DateTime?”. But it accepts the DateTime object as I’ve seen on debug mode.

 

So, when the request is done, the WS receives the date parameters as null.
I’ve tried to use java.util.Date and Java.sql.Timestamp and both have not
worked.

 

Does anyone can help me???

 

Thanks in regards.

--

Guilherme A. N. Fré




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



Re: Axis2 Problem

2009-10-23 Thread Deepal jayasinghe
How about MyItem as I can see it is a not a Java bean. To be a valid
Java bean you need to have following stuff in your class;
 - default constructor
 - getter and setter for each filed you want to expose

Thanks,
Deepal
> Hello all, 
>
> I am having a problem with Axis2. I have done some tests and I can not
> advance. All the inner attributes of the objects I receive are null.
>
> In the server side I have a simple class:
>
> public class MyItem implements Serializable {
>   private static final long serialVersionUID = 1L;
>   
>   String message;
>   
>   public ListItemArray() {
>   message = "Test";
>   }
>   
>   public String getMsg() {
>   return message;
>   }
>   public void setMsg(String message) {
>   this.message = message;
>   }
> }
>
> And a method:
>
> public MyItem getItem(){
>MyItem i = new MyItem();
>return i;
> }
>
> In the client size I have an stub like:
>
>WSStub customer = null;
>WSStub.GetItemResponse response = null;
>
>try {
>   // creamos el soporte y la peticion
>   customer = new WSStub (sEndPoint);
>
>   // invocamos al web service
>   try {
>   response = customer.getItem();
>   } catch (Exception e) {
>   e.printStackTrace();
>   }
>
>MyItem i = response.get_return();
>
> And inside the MyItem object, the message field is null. I have tried to
> return a String and it is ok.
>
> Can anyone help me?
>   


-- 
Thank you!


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



RE: Axis2 Problem

2009-10-23 Thread Juan Moratilla Peón
Is logical, in the method: (see my comments)

 public MyItem getItem(){
   MyItem i = new MyItem(); //You have built an Item with an empty "message"
atributte.
 
   return i;
}

You are not setting any value to the MyItem object. You have forgotten to
set a value. Just add the i.set("value") line:

public MyItem getItem(){
   MyItem i = new MyItem(); //You have built an Item with an empty "message"
atributte.
i.set("value");
 
   return i;
}

And the you will get in your client the "value" String. Ok?


-Mensaje original-
De: dpeinador [mailto:dampe2...@yahoo.es] 
Enviado el: viernes, 23 de octubre de 2009 14:11
Para: axis-user@ws.apache.org
Asunto: Axis2 Problem


Hello all, 

I am having a problem with Axis2. I have done some tests and I can not
advance. All the inner attributes of the objects I receive are null.

In the server side I have a simple class:

public class MyItem implements Serializable {
private static final long serialVersionUID = 1L;

String message;

public ListItemArray() {
message = "Test";
}

public String getMsg() {
return message;
}
public void setMsg(String message) {
this.message = message;
}
}

And a method:

public MyItem getItem(){
   MyItem i = new MyItem();
   return i;
}

In the client size I have an stub like:

   WSStub customer = null;
   WSStub.GetItemResponse response = null;
 
   try {
// creamos el soporte y la peticion
customer = new WSStub (sEndPoint);

// invocamos al web service
try {
response = customer.getItem();
} catch (Exception e) {
e.printStackTrace();
}

   MyItem i = response.get_return();

And inside the MyItem object, the message field is null. I have tried to
return a String and it is ok.

Can anyone help me?
-- 
View this message in context:
http://www.nabble.com/Axis2-Problem-tp26025185p26025185.html
Sent from the Axis - User mailing list archive at Nabble.com.




Re: Axis 2 (1.5) - Unable to find service for POJO

2009-10-23 Thread mule_user

When I enter url: http://localhost:9081/Axis2Weather/services/listServices

I get the following error:

java.io.FileNotFoundException: JSPG0036E: Failed to find resource
/axis2-web/listServices.jsp at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:308)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:281)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:639)
at
org.apache.axis2.transport.http.AbstractAgent.renderView(AbstractAgent.java:121)
at
org.apache.axis2.transport.http.ListingAgent.processListServices(ListingAgent.java:404)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)




mule_user wrote:
> 
> New to Axis2. Using the POJO guide for exposing service found in link:
> 
> http://ws.apache.org/axis2/1_5/pojoguide.html
> 
> I can see the wsdl in the browser, but cannot see the service. The service
> apparaently was not found.  Any suggestion will be appreciated.
> 
> Following are the steps that I have taken.
> 
> Axis2Weather (it is web project containing WebContent)
> |
> src
> |  |
> |   sample.pojo.data
> |  |   |
> |  |Weather.java
> |  |
> |   sample.pojo.service
> |  |
> |   WeatherService.java
> |
> WebContent
>  |
>   WEB-INF
> |
> |
>  lib (has all jars from Axis2, version 1.5)
> | 
>  services
> | |
> |  WeatherService
> |   |
> |META-INF
> |
> |
> | 
> services.xml
> |
>  web.xml
> ///
> services.xml:
> 
> 
> 
> Weather POJO Service
> 
> 
>  mep="http://www.w3.org/2004/08/wsdl/in-only";
> class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>  mep="http://www.w3.org/2004/08/wsdl/in-out";
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> 
> 
> sample.pojo.service.WeatherService
> 
> 
> 
> 
> web.xml:
> 
> 
>  xmlns="http://java.sun.com/xml/ns/j2ee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>   
>   Axis2Weather
>   
>   
>   Apache-Axis Servlet
>   AxisServlet
>   
> org.apache.axis2.transport.http.AxisServlet
>   1
>   
>   
>   
>   Axis Admin Servlet
>   AdminServlet
>   
>   org.apache.axis.transport.http.AdminServlet
>   100
>   
>   
>   
>   AxisServlet
>   /servlet/AxisServlet
>   
>   
>   AxisServlet
>   *.jws
>   
>   
>   AxisServlet
>   /services/*
>   
>   
>   AdminServlet
>   /servlet/AdminServlet
>   
> 
> 
> //
> 
> package sample.pojo.data;
> 
> public class Weather {
>   float temperature;
> String forecast;
> boolean rain;
> float howMuchRain;
> 
> public void setTemperature(float temp){
> temperature = temp;
> }
> 
> public float getTemperature(){
> return temperature;
> }
> 
> public void setForecast(String fore){
> forecast = fore;
> }
> 
> public String getForecast(){
> return forecast;
> }
> 
> public void setRain(boolean r){
> rain = r;
> }
> 
> public boolean getRain(){
> return rain;
> }
> 
> public void setHowMuchRain(float howMuch){
> howMuchRain = howMuch;
> }
> 
> public float getHowMuchRain(){
> return howMuchRain;
> }
> }
> 
> //
> 
> package sample.pojo.service;
> 
> import sample.pojo.data.Weather;
> 
> public class WeatherService{
> 
>Weather weather;
>   
>   public void setWeather(Weather weather){
>   this.weather = weather;
>   }
> 
>   public Weather getWeather(){
>   return this.weather;
>   }
> }
> 
> /
> 
> The cont

Axis2 Problem

2009-10-23 Thread dpeinador

Hello all, 

I am having a problem with Axis2. I have done some tests and I can not
advance. All the inner attributes of the objects I receive are null.

In the server side I have a simple class:

public class MyItem implements Serializable {
private static final long serialVersionUID = 1L;

String message;

public ListItemArray() {
message = "Test";
}

public String getMsg() {
return message;
}
public void setMsg(String message) {
this.message = message;
}
}

And a method:

public MyItem getItem(){
   MyItem i = new MyItem();
   return i;
}

In the client size I have an stub like:

   WSStub customer = null;
   WSStub.GetItemResponse response = null;
 
   try {
// creamos el soporte y la peticion
customer = new WSStub (sEndPoint);

// invocamos al web service
try {
response = customer.getItem();
} catch (Exception e) {
e.printStackTrace();
}

   MyItem i = response.get_return();

And inside the MyItem object, the message field is null. I have tried to
return a String and it is ok.

Can anyone help me?
-- 
View this message in context: 
http://www.nabble.com/Axis2-Problem-tp26025185p26025185.html
Sent from the Axis - User mailing list archive at Nabble.com.



SOAPMonitor problem

2009-10-23 Thread Pär Malmqvist

Hello!

When I use the SOAPMonitor for my Axis2 service the SOAPMonitor stops working 
after some thousands requests.
Is there a way to store the requests and replys displayed by the SOAPMonitor in 
a file so the information will not be lost?

Regards
Pär Malmqvist

 
  
_
Keep your friends updated—even when you’re not signed in.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010

RE: Problems using XPath in Axiom when namespaces are involved

2009-10-23 Thread Robert Baldock
Andreas -

Thanks for the information.

I found this example showing how to build queries for default namespaces in 
Jaxen:

http://jaxen.codehaus.org/faq.html

Mapping that to AXIOMXPath:

SimpleNamespaceContext context = new SimpleNamespaceContext();
context.addNamespace("pre", uri);

String xpathString = "/pre:X/pre:Y/pre:Z";
AXIOMXPath xpathExpression = new AXIOMXPath(xpathString);
xpathExpression.setNamespaceContext(context);

And that brings back the expected OMElement.

Thanks.


Robert

-Original Message-
From: Andreas Veithen [mailto:andreas.veit...@gmail.com] 
Sent: 22 October 2009 19:41
To: axis-user@ws.apache.org
Subject: Re: Problems using XPath in Axiom when namespaces are involved

Robert,

My guess is that the issue is related to the fact that you are trying
to define a default namespace for the XPath expression. Can you check
in the Jaxen documentation if it says something about this?

Note that defining a default namespace for an XPath expression is not
a good idea anyway, because it will prevent you from matching elements
or attributes in the null namespace. The reason is that the null
namespace can only be used as default namespace (i.e. xmlns:p="" is
illegal). Therefore if you declare a different default namespace, you
can't refer to the null namespace in your XPath expression.

That is the reason why for example the XSLT specification defines the
namespace context of an XPath expression as follows: "the set of
namespace declarations are those in scope on the element which has the
attribute in which the expression occurs; [...] the default namespace
(as declared by xmlns) is not part of this set"

Andreas

On Thu, Oct 22, 2009 at 19:09, Robert Baldock  wrote:
> Hi -
>
> I'm having problems getting my head round the use of XPath in Axiom,
> especially when using namespaces.
>
> With an XML snippet like this:
>
> 
> 
>  
>    test
>  
> 
>
> And a code snippet like this:
>
> String xpathString = "/X/Y/Z";
> AXIOMXPath xpathExpression = new AXIOMXPath(xpathString);
> OMElement element = (OMElement)xpathExpression.selectSingleNode(root);
>
> I can retrieve the element from the XML without any problem.
>
> However, with XML like this:
>
> 
> 
>  
>    test
>  
> 
>
> OMNamespace namespace = documentElement.getNamespace();
> String prefix = namespace.getPrefix();
> String uri = namespace.getNamespaceURI();
>
> AXIOMXPath xpathExpression = new AXIOMXPath(xpathString);
> xpathExpression.addNamespace(prefix, uri);
> OMElement element = (OMElement)xpathExpression.selectSingleNode(root);
>
> I get no results.
>
> Can anyone spot why this might be?
>
> Any advice would be much appreciated.
>
>
> Robert
>
>
>