Re: multiple configurations (multiple axis2.xml with different names)?

2009-03-10 Thread Raymond Zhou
OK, I just tried, it seems that I can only use the name axis2.xml. I can 
specify different folds and axis2/c will look for axis2.xml in that fold. I can 
also specify a file path ended with axis2.xml. All works fine. But axis2/c will 
fail to create a wb service client if I specify a full file path with a name 
different from axis2.xml.
 
I think this needs to be fixed. In my environment, my web service client needs 
to connect to several web service providers with different configurations, it 
would be convenient if I can create several config files with different names.
 
Thanks!
Frank

--- On Mon, 3/2/09, Samisa Abeysinghe sam...@wso2.com wrote:


From: Samisa Abeysinghe sam...@wso2.com
Subject: Re: multiple configurations (multiple axis2.xml with different names)?
To: Apache AXIS C User List axis-c-user@ws.apache.org
Date: Monday, March 2, 2009, 1:35 AM


Raymond Zhou wrote:
 OK, Thanks Dinesh.
  So it seems that I can create multiple configuration files all named 
axis2.xml but put in different folds, and in each axis2.xml, specify the 
library and module locations pointing to the single axis2/c installation.
  It would be nice if I can create multiple configuration files with different 
names, so I can put them in a same fold, and then set the axis2_home 
programmatically.
 

That should be possible, but we might have to pach the current implementation 
of config builder.

Thanks,
Samisa...

  Thanks!
 Frank
  
 
 --- On *Fri, 2/27/09, Dinesh Premalal /xydin...@gmail.com/* wrote:
 
     From: Dinesh Premalal xydin...@gmail.com
     Subject: Re: multiple configurations (multiple axis2.xml with
     different names)?
     To: axis-c-user@ws.apache.org
     Cc: raywang...@yahoo.com, axis-c-...@ws.apache.org
     Date: Friday, February 27, 2009, 7:53 PM
 
     Raymond Zhou raywang...@yahoo.com writes:
      I was wondering if I can have multiple configuration file with different
     name
      in the same axis2_home fold. What I need is this: in the same axis2_home
     fold,
      I would like to have axis2_1.xml, axis2_2.xml, axis2_3.xml and so on and
     so
      forth, then when I want to connect to different web servers, I can use
     these
      different configuration files.
 
     http://wso2.org/library/3330
 
     thanks,
     Dinesh
               
 
 
 
 
 Internal Virus Database is out of date.
 Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 
 270.10.7/1892 - Release Date: 1/13/2009 8:04 PM
 
   


-- Samisa Abeysinghe Director, Engineering; WSO2 Inc.

http://www.wso2.com/ - The Open Source SOA Company




  

Cannot start axis2_http_server.exe from command line

2009-03-10 Thread Raymond Zhou
Hi All, 
 
I have been using axis2/c for a while in my web service client component. I has 
been successful. I built the axis2/c libraries (version 1.5) by myself, and I 
am working in windows XP platform. When building the libraries, I enabled 
openSSL, and use guththila XML parser. 
 
Now encounter a very strange problem when I try to start axis2_http_server.exe. 
Seems like I am getting a windows system error, here is the error message from 
the pop up windows when I start axis2_http_server.exe from command line:
 
===
 axis2_http_server.exe has encountered a problem and needs to close. We are 
sorry for the inconvenience.
  If you were in the middle of something, the information you were working on 
might be lost.
 Please tell Microsoft about this problem.
 .
===
 
Strange thing is, if I use the downloaded binary version of axis2/c, I was able 
to start the axis2_http_server.exe without problem.
 
Any clue what might be going on?
Thanks!
Ray


  

Re: multiple configurations (multiple axis2.xml with different names)?

2009-03-10 Thread Supun Kamburugamuva
Please create a Jira.

Supun

On Tue, Mar 10, 2009 at 10:10 PM, Raymond Zhou raywang...@yahoo.com wrote:

 OK, I just tried, it seems that I can only use the name axis2.xml. I can
 specify different folds and axis2/c will look for axis2.xml in that fold. I
 can also specify a file path ended with axis2.xml. All works fine. But
 axis2/c will fail to create a wb service client if I specify a full file
 path with a name different from axis2.xml.

 I think this needs to be fixed. In my environment, my web service client
 needs to connect to several web service providers with different
 configurations, it would be convenient if I can create several config files
 with different names.

 Thanks!
 Frank

 --- On *Mon, 3/2/09, Samisa Abeysinghe sam...@wso2.com* wrote:


 From: Samisa Abeysinghe sam...@wso2.com
 Subject: Re: multiple configurations (multiple axis2.xml with different
 names)?
 To: Apache AXIS C User List axis-c-user@ws.apache.org
 Date: Monday, March 2, 2009, 1:35 AM

 Raymond Zhou wrote:
  OK, Thanks Dinesh.
   So it seems that I can create multiple configuration files all named
 axis2.xml but put in different folds, and in each axis2.xml, specify the
 library and module locations pointing to the single axis2/c installation.
   It would be nice if I can create multiple configuration files with
 different names, so I can put them in a same fold, and then set the
 axis2_home programmatically.
 

 That should be possible, but we might have to pach the current
 implementation of config builder.

 Thanks,
 Samisa...

   Thanks!
  Frank
 
 
  --- On *Fri, 2/27/09, Dinesh Premalal 
  /xydin...@gmail.comhttp://us.mc464.mail.yahoo.com/mc/compose?to=xydin...@gmail.com/*
 wrote:
 
  From: Dinesh Premalal 
  xydin...@gmail.comhttp://us.mc464.mail.yahoo.com/mc/compose?to=xydin...@gmail.com
 
  Subject: Re: multiple configurations (multiple axis2..xml with
  different names)?
  To: 
  axis-c-user@ws.apache.orghttp://us.mc464.mail.yahoo.com/mc/compose?to=axis-c-u...@ws.apache.org
  Cc: 
  raywang...@yahoo.comhttp://us.mc464.mail.yahoo.com/mc/compose?to=raywang...@yahoo.com,
 axis-c-...@ws.apache.orghttp://us.mc464.mail.yahoo.com/mc/compose?to=axis-c-...@ws.apache.org
  Date: Friday, February 27, 2009, 7:53 PM
 
  Raymond Zhou 
  raywang...@yahoo.comhttp://us.mc464.mail.yahoo.com/mc/compose?to=raywang...@yahoo.com
 writes:
   I was wondering if I can have multiple configuration file with
 different
  name
   in the same axis2_home fold. What I need is this: in the same
 axis2_home
  fold,
   I would like to have axis2_1.xml, axis2_2.xml, axis2_3.xml and so
 on and
  so
   forth, then when I want to connect to different web servers, I can
 use
  these
   different configuration files.
 
  http://wso2.org/library/3330
 
  thanks,
  Dinesh
 
 
  
 
 
  Internal Virus Database is out of date.
  Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database:
 270.10.7/1892 - Release Date: 1/13/2009 8:04 PM
 
 


 -- Samisa Abeysinghe Director, Engineering; WSO2 Inc.

 http://www.wso2.com/ - The Open Source SOA Company





-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com


axis

2009-03-10 Thread ajith mamachan
axis-c-user@ws.apache.org
axis


  Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/

axis

2009-03-10 Thread ajith mamachan
axis


  Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/

wsa header issue

2009-03-10 Thread Appasamy Thirugnana



Hi,

When we send out SOAP messages if WS-Addressing is engaged, then it should 
always send WS-Addressing headers inside the SOAP messages.
To disable this I got the following property to be set to true.



options.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);

But the problem is when this is set to false and when I try to 
send SOAP messages, in few of the SOAP messages WS-Addressing is appeared and 
in few it is not appeared.
I am trying to make it appear in all SOAP messages. So my question is
1. What might be the reasons for those WS-Addressing not to appear in few SOAP 
messages and to appear in few?
2. To make it appear in all of the SOAP messages is there any property to be 
set other than the above mentioned property 
(DISABLE_ADDRESSING_FOR_OUT_MESSAGES = FALSE) ?

Thanks,
Appu


RE: Daylight savings problem in Australia

2009-03-10 Thread Felix Castanar
Anyone help out there?

If I have this:

LocalStartTime2009-02-26T19:10:00/LocalStartTime

Why does Axis2 returns one hour more during daylight savings (20:10 instead of 
19:10)?

Shouldn't return always the same date?

Cheers!
Felix

-Original Message-
From: Felix Castanar [mailto:felix.casta...@hyro.com] 
Sent: Friday, 27 February 2009 12:52 PM
To: axis-user@ws.apache.org
Subject: Daylight savings problem in Australia

Hi,

I'm in Sydney (Australia) where actually there is daylight savings (DST).
The problem I have is the following:

I'm accessing a web service server (in Australia) which sends the following:
LocalStartTime2009-02-26T19:10:00/LocalStartTime

But the response object (generated using Axis2 1.4.1) creates a Calendar object 
that is equivalent to:

2009-02-26 20:10:00

(so it added one hour to what it was sent)

Since this conversion was working in Axis2 1.0 I investigated the issue.

This is the calendar object returned by Axis2 1.0 (please note the value for 
the 
last field: DST_OFFSET=360)

java.util.GregorianCalendar[time=123563580,areFieldsSet=true,areAllFieldsSet=true,
lenient=true,zone=sun.util.calendar.ZoneInfo[id=Australia/Sydney,offset=3600,dstSavings=360,
useDaylight=true,transitions=142,lastRule=java.util.SimpleTimeZone[id=Australia/Sydney,offset=3600,
dstSavings=360,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,
startTime=720,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=720,
endTimeMode=1]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2009,MONTH=1,
WEEK_OF_YEAR=9,WEEK_OF_MONTH=4,DAY_OF_MONTH=26,DAY_OF_YEAR=57,DAY_OF_WEEK=5,
DAY_OF_WEEK_IN_MONTH=4,AM_PM=1,HOUR=7,HOUR_OF_DAY=19,MINUTE=10,SECOND=0,MILLISECOND=0,
ZONE_OFFSET=3600,DST_OFFSET=360]

Whereas the same Calendar object returned by Axis2 1.4.1 returns:

java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,
lenient=true,zone=sun.util.calendar.ZoneInfo[id=Australia/Sydney,offset=3600,dstSavings=360,
useDaylight=true,transitions=142,lastRule=java.util.SimpleTimeZone[id=Australia/Sydney,offset=3600,
dstSavings=360,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,
startTime=720,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=720,
endTimeMode=1]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=1,
WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=26,DAY_OF_YEAR=?,DAY_OF_WEEK=?,
DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=19,MINUTE=10,SECOND=0,MILLISECOND=0,
ZONE_OFFSET=3600,DST_OFFSET=0]

Note the last field for this version: DST_OFFSET=0

I dig down the source code till I found the method responsible for the 
conversion from 2009-02-26T19:10:00 to the Calendar object.

This method is public static Calendar convertToDateTime(String source)  in 
the class org.apache.axis2.databinding.utils.ConvertUtils

This method explicitly sets DST_OFFSSET=0 regardless the TimeZone being in DST 
or not, so for the entry 2009-02-26T19:10:00 I will get one extra added in 
DST but the correct time when DST finishes (I already tested it changing my 
computer's clock).

I'm aware that JIRA issue 3916 
(https://issues.apache.org/jira/browse/AXIS2-3916) introduced the code where 
DST_OFFSET is set always to 0.

So... 
a) This is still a problem and the issue 3916 should be reopened
b) The web service should be sending the dates in a way we get the right time 
regardless of the DST. Any suggestion how? (AFAIK 2009-02-26T19:10:00 is the 
correct way)

It would be great if someone could put some light here.

Thanks
Felix








Re: wsdl2java

2009-03-10 Thread chathuranga
Hi Nandana,
thanks for the reply.
i have added the bouncycastle jar into the path. now i am getting below
exception,


require client's private key...

org.apache.axis2.AxisFault: WSHandler: Signature: error during message *
processingorg.apache.ws.security.WSSecurityException*: An unsupported token
was provided (An X509 certificate with version 3 must be used for SKI. The
presented cert has version: 1)

at org.apache.rampart.handler.WSDoAllSender.processMessage(*
WSDoAllSender.java:67*)

at org.apache.rampart.handler.WSDoAllHandler.invoke(*WSDoAllHandler.java:72*
)

at org.apache.axis2.engine.Phase.invoke(*Phase.java:317*)

at org.apache.axis2.engine.AxisEngine.invoke(*AxisEngine.java:264*)

at org.apache.axis2.engine.AxisEngine.send(*AxisEngine.java:429*)

at org.apache.axis2.description.OutInAxisOperationClient.send(*
OutInAxisOperation.java:401*)

at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(*
OutInAxisOperation.java:228*)

at org.apache.axis2.client.OperationClient.execute(*OperationClient.java:163
*)

at
com.huawei.www.bme.cbsinterface.cbs.businessmgr.CBSInterfaceBusinessMgrServiceStub.QueryBasicInfo(
*CBSInterfaceBusinessMgrServiceStub.java:11503*)

at Test.main(*Test.java:75*)

Caused by: *org.apache.ws.security.WSSecurityException*: WSHandler:
Signature: error during message *
processingorg.apache.ws.security.WSSecurityException*: An unsupported token
was provided (An X509 certificate with version 3 must be used for SKI. The
presented cert has version: 1)

at org.apache.ws.security.action.SignatureAction.execute(*
SignatureAction.java:57*)

at org.apache.ws.security.handler.WSHandler.doSenderAction(*
WSHandler.java:197*)

at org.apache.rampart.handler.WSDoAllSender.processBasic(*
WSDoAllSender.java:201*)

at org.apache.rampart.handler.WSDoAllSender.processMessage(*
WSDoAllSender.java:64*)

... 9 more


do you have any idea about this?

thanks,
chathuranga


On Sun, Mar 8, 2009 at 12:40 AM, Nandana Mihindukulasooriya 
nandana@gmail.com wrote:

 Hi Chathuranga,
Did you make sure bouncycatlse jars are in the class path ? If you
 using solaris please refer to this [1] JIRA.

 thanks,
 nandana

 [1] - https://issues.apache.org/jira/browse/WSS-99


 On Fri, Mar 6, 2009 at 1:20 PM, chathuranga gay...@gmail.com wrote:



 Hi,

 We have a server which runs on axis2 1.1 and rampart1.1.

  I was trying to generate a client using the WSDL’s in the server. First
 I used axis2 1.4 and rampart1.1.

 And were able to successfully generate the java files using wsdl2java

 I used WSDL2Java -uri http://10.56.176.30:8680/services/sMgrService?wsdl-uw 
 -t -ssi –u



 And the client code also compiled successfully.  But when I am running the
 code below exception is giving.

 [WARN] Dispatcher org.apache.axis2.engine.RequestURIBasedDispatcher is now
 deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.SOAPActionBasedDispatcher is now
 deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.AddressingBasedDispatcher is now
 deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher
 is now deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.InstanceDispatcher is now
 deprecated.
 [WARN] Please remove the entry for
 org.apache.axis2.engine.InstanceDispatcherfrom axis2.xml
 [WARN] Dispatcher org.apache.axis2.engine.RequestURIBasedDispatcher is now
 deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.SOAPActionBasedDispatcher is now
 deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.AddressingBasedDispatcher is now
 deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher
 is now deprecated.
 [WARN] Please edit axis2.xml and replace with the same class in
 org.apache.axis2.dispatchers package
 [WARN] Dispatcher org.apache.axis2.engine.InstanceDispatcher is now
 deprecated.
 [WARN] Please remove the entry for
 org.apache.axis2.engine.InstanceDispatcherfrom axis2.xml
 [INFO] No services directory was found under
 /data1/app/apache-test/htdocs/test/java/chaths/src/axis2-repo.
 [INFO] Deploying module: rampart-1.1 -
 file:/data1/app/apache-test/htdocs/test/java/chaths/src/axis2-repo/modules/rampart-1.1.mar
 [INFO] Deploying module: metadataExchange -
 

Re: Daylight savings problem in Australia

2009-03-10 Thread Dennis Sosnoski

Hi Felix,

There's really no correct result on this, since your dateTime value 
doesn't specify a time zone offset. If you want a dateTime value to be 
handled consistently, always use a time zone offset (which may be 'Z', 
meaning 0 offset from UTC) in the XML representation - so fix the web 
service server to do this. I haven't checked lately, but Axis2 should 
handle values with time zone offsets properly (meaning they get 
converted to that UTC value). If you can't change the server, the next 
best approach is to just treat the value as an xs:string in the schema 
and handle the conversion in your own code, where you can make whatever 
assumptions you want about the time zone.


I've got an article on InfoQ which discusses some of the issues around 
schema's poorly thought-out data types for time and other basic data 
type issues for web services: 
http://www.infoq.com/articles/schema-for-ws-part1 The second one in this 
series should be out soon, discussing schema extensibility.


Cheers,

 - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Felix Castanar wrote:

Anyone help out there?

If I have this:

LocalStartTime2009-02-26T19:10:00/LocalStartTime

Why does Axis2 returns one hour more during daylight savings (20:10 instead of 
19:10)?

Shouldn't return always the same date?

Cheers!
Felix

-Original Message-
From: Felix Castanar [mailto:felix.casta...@hyro.com] 
Sent: Friday, 27 February 2009 12:52 PM

To: axis-user@ws.apache.org
Subject: Daylight savings problem in Australia

Hi,

I'm in Sydney (Australia) where actually there is daylight savings (DST).
The problem I have is the following:

I'm accessing a web service server (in Australia) which sends the following:
LocalStartTime2009-02-26T19:10:00/LocalStartTime

But the response object (generated using Axis2 1.4.1) creates a Calendar object 
that is equivalent to:

2009-02-26 20:10:00

(so it added one hour to what it was sent)

Since this conversion was working in Axis2 1.0 I investigated the issue.

This is the calendar object returned by Axis2 1.0 (please note the value for the 
last field: DST_OFFSET=360)


java.util.GregorianCalendar[time=123563580,areFieldsSet=true,areAllFieldsSet=true,
lenient=true,zone=sun.util.calendar.ZoneInfo[id=Australia/Sydney,offset=3600,dstSavings=360,
useDaylight=true,transitions=142,lastRule=java.util.SimpleTimeZone[id=Australia/Sydney,offset=3600,
dstSavings=360,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,
startTime=720,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=720,
endTimeMode=1]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2009,MONTH=1,
WEEK_OF_YEAR=9,WEEK_OF_MONTH=4,DAY_OF_MONTH=26,DAY_OF_YEAR=57,DAY_OF_WEEK=5,
DAY_OF_WEEK_IN_MONTH=4,AM_PM=1,HOUR=7,HOUR_OF_DAY=19,MINUTE=10,SECOND=0,MILLISECOND=0,
ZONE_OFFSET=3600,DST_OFFSET=360]

Whereas the same Calendar object returned by Axis2 1.4.1 returns:

java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,
lenient=true,zone=sun.util.calendar.ZoneInfo[id=Australia/Sydney,offset=3600,dstSavings=360,
useDaylight=true,transitions=142,lastRule=java.util.SimpleTimeZone[id=Australia/Sydney,offset=3600,
dstSavings=360,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=1,startDayOfWeek=1,
startTime=720,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=720,
endTimeMode=1]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2009,MONTH=1,
WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=26,DAY_OF_YEAR=?,DAY_OF_WEEK=?,
DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=19,MINUTE=10,SECOND=0,MILLISECOND=0,
ZONE_OFFSET=3600,DST_OFFSET=0]

Note the last field for this version: DST_OFFSET=0

I dig down the source code till I found the method responsible for the conversion from 
2009-02-26T19:10:00 to the Calendar object.

This method is public static Calendar convertToDateTime(String source)  in 
the class org.apache.axis2.databinding.utils.ConvertUtils

This method explicitly sets DST_OFFSSET=0 regardless the TimeZone being in DST or not, so 
for the entry 2009-02-26T19:10:00 I will get one extra added in DST but the 
correct time when DST finishes (I already tested it changing my computer's clock).

I'm aware that JIRA issue 3916 
(https://issues.apache.org/jira/browse/AXIS2-3916) introduced the code where 
DST_OFFSET is set always to 0.

So... 
a) This is still a problem and the issue 3916 should be reopened

b) The web service should be sending the dates in a way we get the right time regardless 
of the DST. Any suggestion how? (AFAIK 2009-02-26T19:10:00 is the correct way)

It would be great if someone could put some light here.

Thanks
Felix







  


WSSecurity Implementaton

2009-03-10 Thread Sudhir Mongia
Hi,
I have been asked to learn and implement WSSecurity in Web services exposed
by us. We are using Axis2 version 1.4.

Can anyone tell where to start?

Thanks,
Sudhir


RE: WSSecurity Implementaton

2009-03-10 Thread Dhanush Gopinath
I think you need to start it with the Rampart Module

 

http://ws.apache.org/axis2/modules/rampart/1_3/security-module.html

 

Dhanush

 

From: Sudhir Mongia [mailto:sudhir.mon...@gmail.com] 
Sent: Tuesday, March 10, 2009 1:56 PM
To: axis-user@ws.apache.org
Subject: WSSecurity Implementaton

 

Hi,

 

I have been asked to learn and implement WSSecurity in Web services exposed by 
us. We are using Axis2 version 1.4.

 

Can anyone tell where to start?

 

Thanks,

Sudhir




Possible to pass SOAP messages directly rather than HTTP or JMS ??

2009-03-10 Thread apinke

Hi , 

I have created a web service from WSDL using Axis 1.2  and HTTP binding. 
I have a situation where I will have the SOAP messages available to me in
flat files that I have to read and process. 

I would like to know if its possible to provide this SOAP message directly
to the generated stub (or any other class.) ? The SOAP messages are already
available with me and I would like to re-use the same generated classes to
processes these SOAP messages. The impl would be a POJO. 

That is , I would like to skip the HTTP binding and provide the SOAP message
directly. Is there a hook for  not using the HTTP transport and provide the
SOAP message 
directly ? ( maybe a JavaBinding just like HTTPbinding and JMSBinding ? ) 
Maybe this will also be helpful in testing to provide pre defined SOAP
requests directly for consumption rather than via http or jms ? 

thanks 
Pat

-- 
View this message in context: 
http://www.nabble.com/Possible-to-pass-SOAP-messages-directly-rather-than-HTTP-or-JMStp22430117p22430117.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Possible to pass SOAP messages directly rather than HTTP or JMS ??

2009-03-10 Thread Asankha C. Perera

Hi Pat
I have created a web service from WSDL using Axis 1.2  and HTTP binding. 
I have a situation where I will have the SOAP messages available to me in
flat files that I have to read and process. 


I would like to know if its possible to provide this SOAP message directly
to the generated stub (or any other class.) ? The SOAP messages are already
available with me and I would like to re-use the same generated classes to
processes these SOAP messages. The impl would be a POJO. 


That is , I would like to skip the HTTP binding and provide the SOAP message
directly. Is there a hook for  not using the HTTP transport and provide the
SOAP message 
directly ? ( maybe a JavaBinding just like HTTPbinding and JMSBinding ? ) 
Maybe this will also be helpful in testing to provide pre defined SOAP
requests directly for consumption rather than via http or jms ? 
  
Not sure if this is the exact thing you are looking for.. but the Apache 
Synapse ESB is capable of picking up files from lots of different file 
systems (e.g. ftp, sftp, zip, local etc) and pumping them to various 
other endpoints (like SOAP/HTTP, JMS, FIX, Mail etc)


See http://synapse.apache.org

cheers
asankha

--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com






Failing to extract RequestedSecurityToken usning STSClient

2009-03-10 Thread Håkon Sagehaug
Hi all,

I 'm using the STSClient of rahas to call my sts service, but when I get the
response back from the server I get this error message

 org.apache.rahas.TrustException: RequestedSecurityToken missing in the
response

I my response I've got the RequestedSecurityToken element, my response looks
like this

 RequestSecurityTokenResponse xmlns=
http://docs.oasis-open.org/ws-sx/ws-trust/200512;
RequestedSecurityToken
   RoleInProject xmlns=http://my.namespace/;
  RoleADMIN/Role
  Projecttest/Project
   /RoleInProject
/RequestedSecurityToken
 /RequestSecurityTokenResponse

I've set the version of the Sts client to RahasConstants.VERSION_05_12 like
this

stsClient.setVersion(RahasConstants.VERSION_05_12)

So the version should be reflecting the namespace. Does anyone have any
hints on this issue?

cheers, Håkon


-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Re: Failing to extract RequestedSecurityToken usning STSClient

2009-03-10 Thread Massimiliano Masi

Hi,

Quoting Håkon Sagehaug hakon.sageh...@bccs.uib.no:

I 'm using the STSClient of rahas to call my sts service, but when I get the
response back from the server I get this error message


Because you are missing the RequestSecurityTokenResponseCollection.

If it is a final step on issuing the token, the message MUST be:

RequestedSecurityTokenResponseCollection
   RequestedSecurityTokenResponse
   RequestedSecurityToken

According to the OASIS spec, section 3.2:

The wst:RequestSecurityTokenResponse element (RSTR) is used to  
return a security token or response to a security token request. The  
wst:RequestSecurityTokenResponseCollection element (RSTRC) MUST be  
used to return a security token or response to a security token  
request on the final response.





This message was sent using IMP, the Internet Messaging Program.




Re: Possible to pass SOAP messages directly rather than HTTP or JMS ??

2009-03-10 Thread apinke

Thanks asankha .

Synapse/ESB seems an overkill for my requirement I think and a bit
heavyweight.  What I think it would do is read the file and send the SOAP
message on the bus to another endpoint which would be a webservice over
http. 

I could do something similar : read the SOAP message from the file and make
a call internally ( using HTTPCommons ) to the service . this is a
roundabout and unnecessary way and would also affect the performance I
think.
If there was a way I could directly hook into the stub and pass the message
that would be the most ideal and fast way.

thanks
Pat




Asankha C. Perera wrote:
 
 Hi Pat
 I have created a web service from WSDL using Axis 1.2  and HTTP binding. 
 I have a situation where I will have the SOAP messages available to me in
 flat files that I have to read and process. 

 I would like to know if its possible to provide this SOAP message
 directly
 to the generated stub (or any other class.) ? The SOAP messages are
 already
 available with me and I would like to re-use the same generated classes
 to
 processes these SOAP messages. The impl would be a POJO. 

 That is , I would like to skip the HTTP binding and provide the SOAP
 message
 directly. Is there a hook for  not using the HTTP transport and provide
 the
 SOAP message 
 directly ? ( maybe a JavaBinding just like HTTPbinding and JMSBinding ? ) 
 Maybe this will also be helpful in testing to provide pre defined SOAP
 requests directly for consumption rather than via http or jms ? 
   
 Not sure if this is the exact thing you are looking for.. but the Apache 
 Synapse ESB is capable of picking up files from lots of different file 
 systems (e.g. ftp, sftp, zip, local etc) and pumping them to various 
 other endpoints (like SOAP/HTTP, JMS, FIX, Mail etc)
 
 See http://synapse.apache.org
 
 cheers
 asankha
 
 -- 
 Asankha C. Perera
 AdroitLogic, http://adroitlogic.org
 
 http://esbmagic.blogspot.com
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Possible-to-pass-SOAP-messages-directly-rather-than-HTTP-or-JMStp22430117p22431066.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Failing to extract RequestedSecurityToken usning STSClient

2009-03-10 Thread Håkon Sagehaug
Hi

Can you specify that an interaction should be final or not? I looked at the
messages exchanged in rampart sample 05, and there the
RequestedSecurityTokenResponse was not wrapped inside a
RequestedSecurityTokenResponseCollection


cheers, Håkon


2009/3/10 Massimiliano Masi m...@math.unifi.it

 Hi,

 Quoting Håkon Sagehaug hakon.sageh...@bccs.uib.no:

 I 'm using the STSClient of rahas to call my sts service, but when I get
 the
 response back from the server I get this error message


 Because you are missing the RequestSecurityTokenResponseCollection.

 If it is a final step on issuing the token, the message MUST be:

 RequestedSecurityTokenResponseCollection
   RequestedSecurityTokenResponse
   RequestedSecurityToken

 According to the OASIS spec, section 3.2:

 The wst:RequestSecurityTokenResponse element (RSTR) is used to return a
 security token or response to a security token request. The
 wst:RequestSecurityTokenResponseCollection element (RSTRC) MUST be used to
 return a security token or response to a security token request on the final
 response.



 
 This message was sent using IMP, the Internet Messaging Program.





-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Re: Failing to extract RequestedSecurityToken usning STSClient

2009-03-10 Thread Massimiliano Masi

Hi,

Quoting Håkon Sagehaug hakon.sageh...@bccs.uib.no:

Can you specify that an interaction should be final or not? I looked at the
messages exchanged in rampart sample 05, and there the
RequestedSecurityTokenResponse was not wrapped inside a
RequestedSecurityTokenResponseCollection


Look at the Rampart's source, STSClient,
processIssueResponse:

if (version == RahasConstants.VERSION_05_12) {
//The WS-SX result will be an RSTRC
rstr = result.getFirstElement();
}

This means that the STS has to return the RSTRC. If you use a single
round trip, then the template is always RST/RSTRC.

I already posted it in the rampart-dev ml:

http://www.nabble.com/Misunderstanding-in-rampart-processIssueResponse-td21706796.html

and also look at the OASIS' ml:

http://lists.oasis-open.org/archives/ws-sx-comment/200901/msg2.html

Ciao,

  Massimiliano


This message was sent using IMP, the Internet Messaging Program.




Adding security header to STSClient in rahas

2009-03-10 Thread Håkon Sagehaug
Hi all,

I wanted to add username/password token in my request to my sts service. I'm
using the STSClient from rahas and tried with this

Options options = new Options();
options.setUserName(user);
options.setPassword(pass);
options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
loadPolicy(policy/sts_policy.xml));
stsClient.setOptions(options);

But the messages don't have a security header.

Alos how should I configure the callback handler, since it need to both
validate the username password and fetch the certificate for validating the
signed message. Should it be something like this

if(pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN){
   /* Do password validation*/
}

if(pwcb.getUsage() == WSPasswordCallback.SIGNATURE){
/* Do set password for keystore*/
}

cheers, Håkon
-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Java2WSDL and abstract classes

2009-03-10 Thread Alexander Rosemann

Hi,

I know, this has been asked before, though I couldn't find an answer to 
my problem.


I'm busy fiddling around with the Java2WSDL ant task shipped with Axis2. 
 The tool works fine until I tried to generate the WSDL from an 
abstract class.


Having an abstract class called Animal and a subclass Dog, it creates 
the schema for the Animal but misses out on the Dog type.


I presume I just can't see what parameter has to be set to get this 
thing going.


Any pointers that lead to a resolution of my issue are much appreciated.

Cheers,
Alex


Re: Failing to extract RequestedSecurityToken usning STSClient

2009-03-10 Thread Håkon Sagehaug
Hi

Thanks very much for the help so far, it worked after I reorganized the
setup some. But now a new error can, maybe you could help, it seems like the
token returned can't be referenced,  got this message
 Cannot obtain token identifier

So I guess I've to add a identifier to my token somehow, but little unsure
on how to do this. Can it only be an attribute in the token called id, like
this

  RequestedSecurityToken
  RoleInProject xmlns=http://my.namespace/; id=1234567
 RoleADMIN/Role
 Projecttestu_project/Project
  /RoleInProject
   /RequestedSecurityToken

Or does the id attribute have to have a special format, type etc

I read in the spec about RequestedAttachedReference and it said:

Since returned tokens are considered opaque to the requestor, this optional
element is specified to indicate how to reference the returned token when
that token doesn't support references using URI fragments

So I guess I want to know how to  make my token in a way that it could be
referenced.

cheers, Håkon

2009/3/10 Massimiliano Masi m...@math.unifi.it

 Hi,

 Quoting Håkon Sagehaug hakon.sageh...@bccs.uib.no:

 Can you specify that an interaction should be final or not? I looked at
 the
 messages exchanged in rampart sample 05, and there the
 RequestedSecurityTokenResponse was not wrapped inside a
 RequestedSecurityTokenResponseCollection


 Look at the Rampart's source, STSClient,
 processIssueResponse:

if (version == RahasConstants.VERSION_05_12) {
//The WS-SX result will be an RSTRC
rstr = result.getFirstElement();
}

 This means that the STS has to return the RSTRC. If you use a single
 round trip, then the template is always RST/RSTRC.

 I already posted it in the rampart-dev ml:

 
 http://www.nabble.com/Misunderstanding-in-rampart-processIssueResponse-td21706796.html
 

 and also look at the OASIS' ml:

 http://lists.oasis-open.org/archives/ws-sx-comment/200901/msg2.html

 Ciao,

  Massimiliano


 
 This message was sent using IMP, the Internet Messaging Program.





-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Java2WSDL and abstract classes

2009-03-10 Thread Alexander Rosemann

Hi,

I know, this has been asked before, though I couldn't find an answer to it.

I'm busy fiddling around with the Java2WSDL ant task shipped with Axis2. 
 The tool works fine until I try to generate the WSDL from an abstract 
class.


Having an abstract class called Animal and a subclass Dog, it creates 
the schema for the Animal but misses out on the Dog type.


I presume I just can't see what parameter has to be set to get this going.

Any pointers that lead to a resolution of my issue are much appreciated.

Thanks,
Alex



Re: Java2WSDL and abstract classes

2009-03-10 Thread Sagara Gunathunga
Hi Alex,
AFAIK there is  no special  parameter  required for this , according
to method signatures of your service class, Java2WSDL generate correct
schema for in/out messages . in your case it should generates types as
follow.

 xs:complexType name=Animal
xs:sequence


/xs:sequence
 /xs:complexType

 xs:complexType name=Dog
xs:complexContent
xs:extension base=ax21:Animal
xs:sequence

-

-
/xs:sequence
/xs:extension
/xs:complexContent
 /xs:complexType



Anyway can you post method signatures of your service class...?


Thanks ,

On Tue, Mar 10, 2009 at 8:35 PM, Alexander Rosemann
alexander.rosem...@gmail.com wrote:
 Hi,

 I know, this has been asked before, though I couldn't find an answer to it.

 I'm busy fiddling around with the Java2WSDL ant task shipped with Axis2.
  The tool works fine until I try to generate the WSDL from an abstract
 class.

 Having an abstract class called Animal and a subclass Dog, it creates the
 schema for the Animal but misses out on the Dog type.

 I presume I just can't see what ගංගා චක්‍රයේ පරාමිතිය has to be set to get 
 this going.

 Any pointers that lead to a resolution of my issue are much appreciated.

 Thanks,
 Alex





-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


Re: Failing to extract RequestedSecurityToken usning STSClient

2009-03-10 Thread Massimiliano Masi

Hi,

Quoting Håkon Sagehaug hakon.sageh...@bccs.uib.no:

 Cannot obtain token identifier


The best place is to look at the processIssueResponse code.

I think you have to add an wsu:Id to your token and a  
RequestedAttachedReference or RequestedUnattachedReference in the  
RSTR, depending on your policy.




This message was sent using IMP, the Internet Messaging Program.




Re: Java2WSDL and abstract classes

2009-03-10 Thread Alexander Rosemann

Hi Sagara,

Sagara Gunathunga wrote:

Hi Alex,
AFAIK there is  no special  parameter  required for this , according
to method signatures of your service class, Java2WSDL generate correct
schema for in/out messages . in your case it should generates types as
follow.

 xs:complexType name=Animal
xs:sequence


/xs:sequence
 /xs:complexType

 xs:complexType name=Dog
xs:complexContent
xs:extension base=ax21:Animal
xs:sequence

-

-
/xs:sequence
/xs:extension
/xs:complexContent
 /xs:complexType



Anyway can you post method signatures of your service class...?


Thanks ,



That's what I get from running Java2WSDL:

xs:schema xmlns:ax22=http://.../xsd; targetNamespace=http://...; 
attributeFormDefault=qualified elementFormDefault=qualified

xs:import namespace=http://.../
xs:element name=getAnimalResponse
xs:complexType
xs:sequence
xs:element name=return minOccurs=0 
type=ax22:Animal nillable=true/

/xs:sequence
/xs:complexType
/xs:element
/xs:schema
xs:schema targetNamespace=http://.../xsd; 
attributeFormDefault=qualified elementFormDefault=qualified

xs:complexType name=Animal
xs:sequence/
/xs:complexType
/xs:schema

The animal type is there. That's my service class:

public class AnimalService {

  public Animal getAnimal() {
return new Dog();
  }

}

Thanks four help Sagara!

-Alex



Re: Java2WSDL and abstract classes

2009-03-10 Thread Sagara Gunathunga
Hi Alex,
hammm... u are trying to have Animal   class as the return type
,then according to your  internal logic return a instance of it's
subclass like Dog or Cat . AFAIK we can retrieve subclass of a any
given class but I'm not sure is it possible to retrieve sub classes
when you specify super class , So i don't think such feature available
with Java2WSDL tool .

The simplest solution is to  change your method signature to return a
Dog instance , it will generate correct schema as i mention in my
previous post .

for a example ,   public Dog getDog ()  or public Dog getAnimal()
will result in to a correct schema generation .

Alternatively you may use JAX-WS  services with Axis2 because JAXB
define @XmlSeeAlso annotation [1]  to archive  your requirement.
please refer link [2] also .

Hope you can find any pointer from this .

[1] 
-http://java.sun.com/javase/6/docs/api/javax/xml/bind/annotation/XmlSeeAlso.html
[2]- http://weblogs.java.net/blog/kohlert/archive/2006/10/jaxws_and_type.html

Thanks ,

On Tue, Mar 10, 2009 at 11:02 PM, Alexander Rosemann
alexander.rosem...@gmail.com wrote:
 Hi Sagara,

 Sagara Gunathunga wrote:

 Hi Alex,
 AFAIK there is  no special  parameter  required for this , according
 to method signatures of your service class, Java2WSDL generate correct
 schema for in/out messages . in your case it should generates types as
 follow.

  xs:complexType name=Animal
                xs:sequence

  

  
                /xs:sequence
  /xs:complexType

  xs:complexType name=Dog
                xs:complexContent
                    xs:extension base=ax21:Animal
                        xs:sequence

 -

 -
                        /xs:sequence
                    /xs:extension
            /xs:complexContent
  /xs:complexType



 Anyway can you post method signatures of your service class...?


 Thanks ,


 That's what I get from running Java2WSDL:

 xs:schema xmlns:ax22=http://.../xsd; targetNamespace=http://...;
 attributeFormDefault=qualified elementFormDefault=qualified
            xs:import namespace=http://.../
            xs:element name=getAnimalResponse
                xs:complexType
                    xs:sequence
                        xs:element name=return minOccurs=0
 type=ax22:Animal nillable=true/
                    /xs:sequence
                /xs:complexType
            /xs:element
        /xs:schema
        xs:schema targetNamespace=http://.../xsd;
 attributeFormDefault=qualified elementFormDefault=qualified
            xs:complexType name=Animal
                xs:sequence/
            /xs:complexType
        /xs:schema

 The animal type is there. That's my service class:

 public class AnimalService {

  public Animal getAnimal() {
    return new Dog();
  }

 }

 Thanks four help Sagara!

 -Alex





-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


[Axis2 1.4] WS-Policy in WSDL 1.1 vs WSDL2.0 using wsdl2java utility

2009-03-10 Thread Leon Searl
Hi,

The developers at WS02 OxygenTank provided a very good example of  
implementing
Web Services Security with Rampart (http://wso2.org/library/3190).

In this example, they incorporated the WS-Policy information into the  
service WSDL definition,
and then used the tool, wsdl2java to generate the service stub.
This generated stub incorporated the ws-policy, and so no changes or  
extensions were required
in the client (except to set username/password options).

However, when I tried to do the same with a service that I had  
written, the generated
service stub did not include the ws-policy information.
The key difference between the original example and my code was that  
the example
described the service using WSDL 1.1, and I had a WSDL 2.0 definition  
for my service.

Why doesn't wsdl2java incorporate the ws-policy information in the  
stub when given WSDL 2.0 input?
Have I overlooked some command line option?
Or is it dependent upon where in the WSDL the policy information is  
included
(I have placed the policy element inside the wsdl2:binding element)?

The alternative of attaching the policy to the service stub in the  
client code using,
options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,  policy-
string);
as in the Rampart samples, is much less desirable for our environment.
thanks for your help !

leon

-- 
Leon S. Searl, Software/Hardware Research Engineer
Information and Telecommunication Technology Center, University of Kansas
Nichols Hall, 2335 Irving Hill Road, Lawrence, KS 66045-7612
Ph: 785-864-7820 Fax: 785-864-0387
http://www.ittc.ku.edu



Re: Axis2 Code Generator Problem

2009-03-10 Thread Michael
I followed these instructions and I still get the error I reported in my 
original email below when I try to generate a WSDL file from my Java code.

Any other suggestions?

Thanks.
  - Original Message - 
  From: Richard Hu 
  To: axis-user@ws.apache.org 
  Sent: Monday, February 23, 2009 10:52 PM
  Subject: RE: Axis2 Code Generator Problem


  This is a known bug.  Here is the solution with explanation:  
http://blogiterox.wordpress.com/2008/10/24/exploring-apache-axis2-and-eclipse-plug-in-development/

   

  Solution: Copy the jar for stax and for backport to the plug-in directory 
(Eclipse\plug-ins\Axis2 code generator\lib) and then add the backport jar 
to the plugin.xml file.

   


--

  From: Michael [mailto:mtarullo...@optonline.net] 
  Sent: Monday, February 23, 2009 9:10 PM
  To: axis-user@ws.apache.org
  Subject: Axis2 Code Generator Problem

   

  I'm developing a bottom up web service and now that I have got it working 
using the code I developed and the client stub generated when I created the web 
service from Eclipse I now want to create a WSDL file.

   

  When I launch the Axis2 Code Generator (v1.3.0) Wizard, enter the fully 
qualified class name and the location of the class file and then select the 
button to test loading the class I keep getting a 
java.lang.ClassNotFoundException.

   

  Is this a bug or am I doing something wrong?



--



  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.0.237 / Virus Database: 270.11.3/1970 - Release Date: 02/24/09 
13:35:00


WSDL attachment example

2009-03-10 Thread Nan Null
I am developing a WSDL for a web service.  However, I don't know what
is the standard way of having an attachment or two in web service
calls (with other data).  The problem is that I saw some example, but
in the WSDL, there is no mention of the attachment.  I also use the
Axis2 example of attachment, and then view the WSDL, again, there is
no mention of the attachment.  In the client and server code, the
attachment is there (manually added into the code).
After the WSDL is created, it will be sent to another unit for
development.  Therefore, if I need 1 or more attachment in an
operation, I need a way to specify it exactly (as input, output or
both).

Please point me to the right location or give me a snippet of code.
It cannot be this hard.  Please use standard code only.  Thanks.