question

2007-08-29 Thread Scott McFadden
How do you unsubscribe from
[EMAIL PROTECTED]  I sent an unsubscribe
request email to [EMAIL PROTECTED]

but still get daily emails from [EMAIL PROTECTED]

 

thanks

 

 

 



HTTP return codes

2007-08-29 Thread Subra A Narayanan
Hello everyone,

Is there any way to return standard HTTP return codes to the clients from a
Axis2/C web service. For e.g. HTTP 404, HTTP 201, etc etc.

Subra


Re: REST with Axis2/C

2007-08-29 Thread Samisa Abeysinghe




Here are my thoughts:

I have been going through the Axis2/c framework code and I think I 
have a fair (although not complete) understanding of how REST works 
in Axis2. If we can have a way to let the developers of the 
webservice write their own implementaion of how to handle REST 
request, that will be great.


Something like an interface that the developers have to implement so 
as to receive RESt requests. Once the request is received, it is up 
to the developers to construct the corresponding SOAP message by 
looking at the URL and the HTTP method and give it back to the 
framework which inturn forwards the SOAP envelop to the web service 
implementation.
This sounds very flexible. There are two points the user can specify 
what they want in case of a service. One is in the services.xml config 
file. The second is the service implementation itself. Non of these 
methods could be used in this case, as we have to first deal with the 
request to identify the service to be invoked. May be, the REST 
request processing could be another service, which will process the 
request and formulate the payload based on the request, and invoke the 
required service within that service.
I looked at how Axis2/Java has implemented REST yesterday, and they seem 
to have done some improvements over the initial model that we have used 
in C.


The ideas come from WSDL 2.0 Adjuncts: http://www.w3.org/TR/wsdl20-adjuncts/

Basically you can provide a resource config in services.xml to map 
resources to operations and payload formats.

You can have the config syntax of a resource like the following
http://localhost/axis2/services/[service_name]/[operation_name]/[val_1]/[val_2]

So I can have something like the following in the services.xml file:
http://localhost/axis2/services/echo/echoString/text

And the REST client is requesting for the resource
http://localhost/axis2/services/echo/echoString/Hello%20World

I can map that resource to service 'echo' and build the payload
   echoString
  text
 Hello World
  /text
   /echoString

I can use the URL based dispatcher to find the payload. I think we can 
implement this model without much trouble on top of Axis2/C architecture.


Thoughts please...

Thanks,
Samisa...

And if your mapping is like


Thanks,
Samisa...


They say a picture is worth a thousand words - I will try to 
summarize this whole thing as a diagram first thing tomorrow morning 
and send it to you guys.


I would like to emphasize that the above is my understanding of how 
REST works and I admit it may be flawed. So feel free to correct me 
lets discuss what is the best way to implement REST in Axis2.



Thanks for the help!

Subra


On 8/28/07, *Samisa Abeysinghe*  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Subra A Narayanan wrote:
 Samisa,

 I have been looking at the code that you pointed me to and 
trying to
 figure out how REST works. Right now, the method name needs to 
be in

 the URL for REST to work. To make Axis2/C more RESTful, we would
need
 a way to map HTTP methods and keywords in the URI to map to
webservice
 method names. I will take amazon s3  service to explain what I 
mean.

 Look at the following 2 requests:

 #1 get object request

 GET /[bucket-name]/[key-name] HTTP/1.0
 Date: Wed, 08 Mar 2006 04:06:18 GMT
 Authorization: AWS [aws-access-key-id]:[header-signature]
 Host: s3.amazonaws.com http://s3.amazonaws.com
http://s3.amazonaws.com


 #2 delete object request

 DELETE /[bucket-name]/[key-name] HTTP/1.0
 Date: Wed, 08 Mar 2006 04:06:19 GMT
 Authorization: AWS [aws-access-key-id]:[header-signature]
 Host: s3.amazonaws.com http://s3.amazonaws.com 
http://s3.amazonaws.com


 The above 2 requests look exactly the same except for their HTTP
 methods: GET vs DELETE. In Axis2/C I think we would need a way
to may
 HTTP method name/key word in URI to be mapped to a webservice
 operation name so that the soap request can be formed accordingly.

 Do you have suggestions as to how this can be done in a generic 
way?

At the moment, in out GET support for REST, you can get something
like
the following working.

GET /axis2/services/echo/echoString?text=Hello%20World%21 HTTP/1.1
User-Agent: Axis2/C
Host: 127.0.0.1:9090 http://127.0.0.1:9090

The mapping that we use at the moment is that the last token in
request
URI path become the operation, in this case 'echoString'. And the
parameters that follow becomes parameter/value pairs. In this 
case we

have text = Hello World. Using parameter/value pairs we
construct the
XML payload for the request.

Now lets consider the sample GET case first. Could you point me 
to few
use cases where the format that we are using would not map to the 
GET

template that you have provided. That would help me understand
what we

Re: HTTP return codes

2007-08-29 Thread Samisa Abeysinghe

Subra A Narayanan wrote:

Hello everyone,

Is there any way to return standard HTTP return codes to the clients 
from a Axis2/C web service. For e.g. HTTP 404, HTTP 201, etc etc.

No, not using service client API. Transport info are hidden form client.

Samisa..


Subra



--
Samisa Abeysinghe : WSO2 WSF/C
http://wso2.org/projects/wsf/c?WSO2nbsp;Webnbsp;Servicesnbsp;Framework/Cnbsp;-nbsp;Opennbsp;sourcenbsp;Cnbsp;librarynbsp;fornbsp;providingnbsp;andnbsp;consumingnbsp;Webnbsp;services;


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



Re: HTTP return codes

2007-08-29 Thread Samisa Abeysinghe

Samisa Abeysinghe wrote:

Subra A Narayanan wrote:

Hello everyone,

Is there any way to return standard HTTP return codes to the clients 
from a Axis2/C web service. For e.g. HTTP 404, HTTP 201, etc etc.

No, not using service client API. Transport info are hidden form client.

BTW, what is the use case?

Thanks,
Samisa...

--
Samisa Abeysinghe : WSO2 WSF/C
http://wso2.org/projects/wsf/c?WSO2nbsp;Webnbsp;Servicesnbsp;Framework/Cnbsp;-nbsp;Opennbsp;sourcenbsp;Cnbsp;librarynbsp;fornbsp;providingnbsp;andnbsp;consumingnbsp;Webnbsp;services;


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



Re: Rampart and Axis2 1.3

2007-08-29 Thread Ruchith Fernando
Hi,

org.apache.axis2.wsdl.codegen.extension.ModulePolicyExtension has been
moved to the axis2-codegen.jar and this is not available in the
axis2.war. You will have to add the axis2-codegen-1.3.jar to the
WEB-INF/lib/ dir of the axis2.war to solve this issue.

All rampart samples with work without any issue with the axis2
standard binary dist since axis2-codegen-1.3 jar is available in it.

Thanks,
Ruchith

On 8/23/07, Davanum Srinivas [EMAIL PROTECTED] wrote:
 We are still voting on the release, please try this with Axis2 1.3
 http://people.apache.org/~ruchithf/rampart/1_3/

 -- dims

 On 8/22/07, Skinner, Gregory W. [EMAIL PROTECTED] wrote:
 
 
  I have been trying to get Axis 1.2 or 1.3 working with a version of Rampart.
  When I try to use Axis 1.3 with Rampart 1.2, the module does not deploy and
  I get
 
  [ERROR] The rampart-1.2.mar module, which is not valid, caused
  org/apache/axis2/modules/ModulePolicyExtension
  java.lang.NoClassDefFoundError:
  org/apache/axis2/modules/ModulePolicyExtension
  at java.lang.ClassLoader.defineClass1(Native
  Method)
 
  When I try to use Axis2 1.2 with Rampart 1.2 (deployed in Tomcat), I end up
  getting a NullPointerException after I get :
 
  Unknown top level PED found:
  org.apache.neethi.builders.xml.XmlPrimtiveAssertion
 
  Can anyone suggest which versions of Axis / Rampart are compatible and where
  I might find them?
 
  Thanks,
  Greg
 


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

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




-- 
www.ruchith.org
www.wso2.org

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



Re: tcp transport problem: multithread blocking sending doesn't work

2007-08-29 Thread Deepal Jayasinghe
Hi ,
We have not done enough testing on TCP specially in multi thread
environment. So the issue you  have faced should be an limitation in
Axis2 (in TCP transport)  , so please create a JIRA we will definitely
looking to it.

Thanks
Deepal

杨健 wrote:
 hi, axis2ers

 I create a webservices to send datas, and http,jms transport works
 fine with multithread sending, but not for tcp.
 TCP uses ws-addressing in both client and server sides, and it works
 fine in single thread. In the case of multithread,
 e.g.,
 1. a thread T1 created to send data D1, use a ServiceClient object in
 blocking way(sendReceive())
 2. meanwhile, another thread T2(same as T1) created to send data D2
 3. T1 sent the data and has not received the reply;(need more time)
 4. T2 sent the data and received the reply;(T2 works OK)
 5. T1 throws a Exception: Socket output is already shutdown

 It seems like T2 shutdown the socket T1 used.

 I use the seperator listener by options.setUseSeparateListener(true)
 and similarlly socket shutdown exception throwed.
 My question is:
 when using two seperate ServiceClient, there should be two socket
 connection. It works fine for http and jms, but why not work for
 tcp? Is there something I missed when engaged ws-addressing or some
 bugs there?

 Thanks for your help.


-- 
Thanks,
Deepal

The highest tower is built one brick at a time



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



Re: OMElement Vs java.lang.Object for (xsd:anyType) - Axis 1.3 Vs Axis 2 code generation

2007-08-29 Thread Amila Suriarachchi
On 8/28/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote:

  Hi Amila,



 I tried this with the nightly build jars from *axis2-1.3-SNAPSHOT-bin.zip*(
 adb.jar  adb-codegen.jar) of Aug. 27 2007 09:33 and in this xsd:anyType
 is converted into OMElement, not java.lang.Object, but it worked with the
 nightly build jars from *axis2-SNAPSHOT-bin.zip* (adb.jar 
 adb-codegen.jar) of Aug. 27 2007 07:44



 Which version of the jars should I use?

*axis2-1.3-SNAPSHOT-bin.zip *is refered to axis2 1.3 branch.
axis2-SNAPSHOT-bin.zip is for the trunk. so you have to use the
axis2-SNAPSHOT-bin.zip


Thanks

 Raghu


  --

 *From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED]
 *Sent:* Tuesday, August 21, 2007 10:54 PM
 *To:* axis-user@ws.apache.org
 *Subject:* Re: OMElement Vs java.lang.Object for (xsd:anyType) - Axis 1.3Vs 
 Axis 2 code generation




 basically you are asking when is the Axis2 1.4.
 we have just release Axis2 1.3 so it would be from another 3 or 4 months
 time.

 Amila.

  On 8/22/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote:

 Hi Amila,



 It worked with the nightly build jars (adb.jar  adb-codegen.jar).  When
 will this change be moved to the main release (I mean which Axis2 version)?



 Thanks

 Raghu


  --

 *From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED]
 *Sent:* Monday, August 20, 2007 9:36 PM


 *To:* axis-user@ws.apache.org
 *Subject:* Re: OMElement Vs java.lang.Object for (xsd:anyType) - Axis 1.3Vs 
 Axis 2 code generation





 On 8/17/07, *Raghu Upadhyayula*  [EMAIL PROTECTED] wrote:

 Hi Amila,



 I'm currently using Axis2 1.3 version, is this bug fixed in that or do I
 need to get nightly build for the fix.


 it is only available in trunk. you can try this, get a nighly build and
 replace  adb-codgen.jar and adb.jar with the nightly build jars. Then it
 should work.



 And what is the fix?  If I define a parameter type as xsd:anyType in my
 WSDL, does WSDL2Java convert it as java.lang.Object in the generated
 sources


 yes, if you use nighly build jars.



 or does it convert to org.apache.axiom.om.OMElement?



 Thanks

 Raghu


  --

 *From:* Amila Suriarachchi [mailto: [EMAIL PROTECTED]
 *Sent:* Thursday, August 16, 2007 9:36 PM
 *To:* axis-user@ws.apache.org
 *Subject:* Re: OMElement Vs java.lang.Object for (xsd:anyType) - Axis 1.3Vs 
 Axis 2 code generation



 this is a bug in Axis2. It has fixed in the trunk. please have a look at
 with a nightly build.

 On 8/11/07, *Raghu Upadhyayula*  [EMAIL PROTECTED] wrote:

 Hi,

 In my webservices, I have a method which has a parameter defined as
 type=xsd:anyType in the WSDL.



 In Axis 1.3, when I did WSDL2Java for my WSDL that parameter got converted
 to java.lang.Object.



 But in Axis2 1.2, when I did WSDL2Java for the same WSDL, that parameter
 got converted to org.apache.axiom.om.OMElement.



 My question is, if I need to pass a Java Object to my webservice method,
 how do I convert it to OMElement and pass it to the method from the client
 code  how do I convert OMElement back to java.lang.Object in my server
 code?





 Thanks

 Raghu




 --
 Amila Suriarachchi,
 WSO2 Inc.




 --
 Amila Suriarachchi,
 WSO2 Inc.




 --
 Amila Suriarachchi,
 WSO2 Inc.




-- 
Amila Suriarachchi,
WSO2 Inc.


WS client // basic http authentication (Axis 1.3)

2007-08-29 Thread Andy Pahne


Hello,

I am currently having my first experiences with web services and axis, 
so this may be newbie questions.


I generated a client from WSDL that consumes one of our partner's web 
services. (I used EclipseWTP to do so, but that part was easy and 
succeeded, I think). EclipseWTP currently uses Axis 1, so the exact 
version is 1.3.0.


I was playing around with a unit test:

public void testRawConnection_no_authentication() throws Exception {

// get Service
PartnerWebServiceLocator locator = new PartnerWebServiceLocator();
PartnerWebServiceSoap service = locator.getPartnerWebServiceSoap();


try {

// Aufruf under test
@SuppressWarnings(unused)
ClsVacancy result =
service.getVacancy(rentalObjectID, checkIn, checkOut, 
ENVIRONMENT);


fail(expected RemoteException was NOT thrown);

} catch (RemoteException expected) {

assertNotNull(expected);
assertTrue(expected.getMessage().contains(Anonymous login 
not allowed));


}


}





That test suceeds, because the Web Service is protected by basic http 
authentication. But at least I am confident that I succesfully connected 
to the service, because the recieved error message comes from the remote 
system and not from Axis itself.



Here are my questions:


1. Is it correct to obtain the service proxy like this:

// get Service
PartnerWebServiceLocator locator = new PartnerWebServiceLocator();
PartnerWebServiceSoap service = locator.getPartnerWebServiceSoap();


  I think it is correct, but can you confirm?




2. And how do I use basic http authentication when I have a password and 
a username?
   I googled around and found a code snippet that used the Call class 
(Interface ?), but I am not sure if that is the correct direction. And 
the snippet also was not complete. I did not find anything apropriate in 
 the FAQ.



Thanks,
Andy Pahne





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



Re: Developing Axis2 web services starting from code

2007-08-29 Thread Amila Suriarachchi
hi dennis,

nice article. It seems many alternatives being developed (which I belive is
good) for the code-first approach as well. I think that the java document
feature you have introduced is a cool feature as well.

please bear with me asking these two questions.
1. Does this compatible with java 1.4?
2. I saw this your article

 class name=Order requireds=@customerId customerName billTo items
 optionals=orderId orderDate shipDate
   collection-field field=items item-type=com.sosnoski.infoq.ex1.Item/
 /class
So it is manadatory to declare the item-type for an List?

Amila.



On 8/29/07, Paul Fremantle [EMAIL PROTECTED] wrote:

 Well to be fair you brought more than balance!! A whackload of good code
 goes a lgg way!

 Paul

 On 8/28/07, Dennis Sosnoski  [EMAIL PROTECTED] wrote:
 
  Glad you enjoyed it, Paul!
 
  There's been so much bashing of the idea of web service development
  starting from code that I thought it was time to bring a bit of balance
  to the discussion.
 
- Dennis
 
 
  Paul Fremantle wrote:
   Great article! Thanks Dennis.
  
   Paul
  
   On 8/28/07, *Dennis Sosnoski*  [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] wrote:
  
   My article on Code First Web Services Reconsidered has been
   published
   by InfoQ: http://www.infoq.com/articles/sosnoski-code-first I've
  also
   made some updates to Jibx2Wsdl to fix a few problems found, and
   with one
   more set of enhancements coming up will be making it part of the
   upcoming JiBX 1.1.6 release. In the meantime you can get it at
   http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl
  
   I'll also mention that I'm going to be visiting Sydney and
   Melbourne in
   late September, with another trip to the U.S. in October. If
   anyone is
   interested in training classes or consulting support around SOA,
   Axis2,
   or XML in Java email me directly to find out more about my
  services.
  
 - 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
  
  
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] 
   For additional commands, e-mail: [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] 
  
  
  
  
   --
   Paul Fremantle
   Co-Founder and VP of Technical Sales, WSO2
   OASIS WS-RX TC Co-chair
  
   blog: http://pzf.fremantle.org
   [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  
   Oxygenating the Web Service Platform, www.wso2.com 
  http://www.wso2.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Paul Fremantle
 Co-Founder and VP of Technical Sales, WSO2
 OASIS WS-RX TC Co-chair

 blog: http://pzf.fremantle.org
 [EMAIL PROTECTED]

 Oxygenating the Web Service Platform, www.wso2.com




-- 
Amila Suriarachchi,
WSO2 Inc.


Re: Axis2: Configure Axis dynamicly (SpringAware)

2007-08-29 Thread riis

Hi,

I have looked at this for a while now but I still have some problems
figuring it out. Hope someone is able to help me here! ;-)

I can see that makeNewServiceObject(ctx) in AbstractMessageReceiver tests
on AxisService parameters to determine whether to receive its service
object by a ServiceObjectSupplier or to create it with reflection. I
thought it then would be possible to use AxisService.createService() to
obtain a basic AxisService where I removed the parameter Constants.
SERVICE_CLASS and added Constants.SERVICE_OBJECT_SUPPLIER
SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME. But it doesn't
seam to be the right way to do this. Do I need to instantiate the
AxisService by my self and in such case, what must be set on this object as
minimum?

//My guess
ConfigurationContext config =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,null);
AxisService service = AxisService.createService(com.firm.MyService,
config.getAxisConfiguration());

service.removeParameter(service.getParameter(Constants.SERVICE_CLASS));
service.addParameter(Constants.SERVICE_OBJECT_SUPPLIER,
org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier);
service.addParameter(SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME,
 myBeanName);

config.getAxisConfiguration().addService(service);

Regards
Multi-Support A/S

Torben Riis

Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com


   
 robert lazarski 
 [EMAIL PROTECTED] 
 mail.com  To 
   axis-user@ws.apache.org 
 20-08-2007 14:38   cc 
   
   Subject 
 Please respond to Re: Axis2: Configure Axis dynamicly 
 [EMAIL PROTECTED] (SpringAware)   
  he.org   
   
   
   
   
   




Using SpringAppContextAwareObjectSupplier, you have the option of
using the the same ApplicationContextHolder class that axis2 uses.
Also, take a look at the AbstractMessageReceiver, ie, looking at the
source in this part of axis2 should point you in the right direction.

HTH,
Robert

On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi,

 I would like hear if it some how is possible to configure Axis2 dynamic
as
 the following in my service descriptor.

 serviceGroup
   service name=MyService
   parameter name=ServiceObjectSupplier

org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier

 /parameter
   parameter name=SpringBeanNamemyService/parameter
   operation name=getJob
 messageReceiver class=
 org.apache.axis2.rpc.receivers.RPCMessageReceiver /
   /operation
   operation name=setStatus
 messageReceiver class=
 org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver /
   /operation
   /service
 /serviceGroup

 I now it is possible configure Axis2 dynamic with ordinary services using
 AxisService.createService(...), but how do I do it with Spring enabled
 services?

 //Configure Axis2 dynamic without spring support.
 MapString, MessageReceiver mep = new HashMapString,
MessageReceiver();
 mep.put(http://www.w3.org/2004/08/wsdl/in-only;,
RPCInOnlyMessageReceiver.
 class.newInstance());
 mep.put(http://www.w3.org/2004/08/wsdl/in-out;, RPCMessageReceiver.class
 .newInstance());
 ConfigurationContext config = ConfigurationContextFactory.
 createConfigurationContextFromFileSystem(null,null);
 AxisService service = AxisService.createService(MyService.class,
 config.getAxisConfiguration(), mep, null, null, BufferFactory.class
 .getClassLoader());
 config.getAxisConfiguration().addService(service);


 Regards
 Multi-Support A/S

 Torben Riis
 
 Phone +45 96 600 600, Fax +45 96 600 601
 E-mail: [EMAIL PROTECTED]
 http://www.multi-support.com


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


Re: Simple question about MTOM, Rampart and optimize parts

2007-08-29 Thread Dimuthu
Hi,

Please look at my comments in line.

On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
 Hi all,
 
 I would like to know how does Rampart work with MTOM. I see that when
  using Rampart, MTOM elements are included as strings in the SOAP
  message instead of sending them outside the message as MIME parts,
  even if I don't do any operation with them (not signature, nor
  encryption), but these MIME parts appear empty in the HTTP message.
  Why is that?

mmm .. looks like this is a bug in Axiom. We are looking at it.
Please report a bug.

 Does optimize parts something about that? I don't understand much about this 
 parameter.

Using this parameter, people can manually specify which element needs to
be optimized. For example if you want to optimize CipherValue in
EncryptedData then you can specify using this parameter. It is effective
if you have specified wsoma:OptimizedMimeSerialization/ assertion in
your policy. Syntax for the element is as follows[1]. So actually this
is a workaround for the above problem.

Hope this will help.

Cheers,
Dimuthu

[1]
ramp:optimizeParts
ramp:expressions
ramp:expression//ns1:data1/ramp:expression
ramp:expression//ns2:data2/ramp:expression
/ramp:expressions
ramp:namespaces
nampespace uri=http://test1.com; prefix=ns1/
nampespace uri=http://test2.com; prefix=ns2/
/ramp:namespaces
/ramp:optimizeParts


 If anybody could give me a hint about this, that would be great.
 
 Thanks,
 
 Jorge Fernández
 
 
 

 -
 
 Sé un Mejor Amante del Cine
 ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org


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



Re: WS client // basic http authentication (Axis 1.3)

2007-08-29 Thread Andy Pahne


I discovered the Users guide and the code examples. They all use Call. 
But I find that a bit arkward, because then I'd have to deal with XSD 
types, return types and such things.


If I compare with
ClsVacancy result =
  service.getVacancy(rentalObjectID, checkIn, checkOut, ENVIRONMENT);
that seems very complicated.

In the end, Axis generated all those objects like ClsVacancy for me and 
I hoped not to have to deal with XML/XSD/SOAP details.


Andy







Andy Pahne schrieb:


Hello,

I am currently having my first experiences with web services and axis, 
so this may be newbie questions.


I generated a client from WSDL that consumes one of our partner's web 
services. (I used EclipseWTP to do so, but that part was easy and 
succeeded, I think). EclipseWTP currently uses Axis 1, so the exact 
version is 1.3.0.


I was playing around with a unit test:

public void testRawConnection_no_authentication() throws Exception {

// get Service
PartnerWebServiceLocator locator = new PartnerWebServiceLocator();
PartnerWebServiceSoap service = locator.getPartnerWebServiceSoap();


try {

// Aufruf under test
@SuppressWarnings(unused)
ClsVacancy result =
service.getVacancy(rentalObjectID, checkIn, checkOut, 
ENVIRONMENT);


fail(expected RemoteException was NOT thrown);

} catch (RemoteException expected) {

assertNotNull(expected);
assertTrue(expected.getMessage().contains(Anonymous login 
not allowed));


}


}





That test suceeds, because the Web Service is protected by basic http 
authentication. But at least I am confident that I succesfully connected 
to the service, because the recieved error message comes from the remote 
system and not from Axis itself.



Here are my questions:


1. Is it correct to obtain the service proxy like this:

// get Service
PartnerWebServiceLocator locator = new PartnerWebServiceLocator();
PartnerWebServiceSoap service = locator.getPartnerWebServiceSoap();


  I think it is correct, but can you confirm?




2. And how do I use basic http authentication when I have a password and 
a username?
   I googled around and found a code snippet that used the Call class 
(Interface ?), but I am not sure if that is the correct direction. And 
the snippet also was not complete. I did not find anything apropriate in 
 the FAQ.



Thanks,
Andy Pahne





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




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



Re: wsdl2c

2007-08-29 Thread Dimuthu Gamage
Hi Marc,
First you have to download Axis2/Java and then run org.apache.axis2.wsdl.WSDL2C
Hope you can find some guidance from the Axis2/C Manual.
http://ws.apache.org/axis2/c/docs/axis2c_manual.html#wsdl2c

Dimuthu


On 8/29/07, Amila Suriarachchi [EMAIL PROTECTED] wrote:
 please ask this question from
 http://ws.apache.org/axis2/c/


 On 8/27/07, Feldman, Marc  [EMAIL PROTECTED] wrote:
  Hi,
  What program is used to convert a wsdl to C classes?
  Thank you,
  Marc
 
 
 
 -
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Amila Suriarachchi,
 WSO2 Inc.

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



Structure of server (axis1.4) for deployment

2007-08-29 Thread Amit Banerjee
Hi,

I am trying to run server part using axis1.4 and I am facing problems:
can anyone tell me-

1. The package structure of the application ..which file to place in which
directory.
means what should be the package structure for deployment.
2. what to do with deploy.wsdd.
3. How to run adminclient command, when I run it , it says no such job.
4. Some changes or actions specific to axis 1.4


Thanks in advance for the help..

Regards,


Re: Developing Axis2 web services starting from code

2007-08-29 Thread Anne Thomas Manes
Nice article Dennis, but you haven't addressed the fundamental issue
associated with the code-first approach. I'd like to see a code-first
approach that allows me to use corporate-approved schema datatypes so
that my applications aren't responsible for proliferating a ton of
incompatible types. Types are the fundamental sharable components in
service-oriented systems that enable interoperability of diverse
systems. These types need to be managed and governed. They should be
properly modeled by data professionals that understand the semantics
of the data that will be exchanged by applications.

You really don't want a thousand different types representing core
entities like customer, order, and invoice. You want your
applications to be exchanging well-defined types that are understood
by many applications.

If your goal is to simply create a point-to-point connection between
two applications, then the code-first approach works just fine. And I
appreciate the value of using a model that supports both SOAP and POX
interfaces.

But a better approach would be one that starts from corporate approved
XML Schema data types and allows me to support both SOAP and POX
interfaces.

Anne



On 8/29/07, Amila Suriarachchi [EMAIL PROTECTED] wrote:
 hi dennis,

 nice article. It seems many alternatives being developed (which I belive is
 good) for the code-first approach as well. I think that the java document
 feature you have introduced is a cool feature as well.

 please bear with me asking these two questions.
 1. Does this compatible with java 1.4?
 2. I saw this your article
  class name=Order requireds=@customerId customerName billTo items

  optionals=orderId orderDate shipDate
  collection-field field=items item-type=com.sosnoski.infoq.ex1.Item/
  /class
 So it is manadatory to declare the item-type for an List?


 Amila.




 On 8/29/07, Paul Fremantle [EMAIL PROTECTED] wrote:
  Well to be fair you brought more than balance!! A whackload of good code
 goes a lgg way!
 
  Paul
 
 
 
  On 8/28/07, Dennis Sosnoski  [EMAIL PROTECTED] wrote:
   Glad you enjoyed it, Paul!
  
   There's been so much bashing of the idea of web service development
   starting from code that I thought it was time to bring a bit of balance
   to the discussion.
  
 - Dennis
  
  
   Paul Fremantle wrote:
Great article! Thanks Dennis.
   
Paul
   
On 8/28/07, *Dennis Sosnoski*  [EMAIL PROTECTED]
mailto: [EMAIL PROTECTED] wrote:
   
My article on Code First Web Services Reconsidered has been
published
by InfoQ:
 http://www.infoq.com/articles/sosnoski-code-first I've also
made some updates to Jibx2Wsdl to fix a few problems found, and
with one
more set of enhancements coming up will be making it part of the
upcoming JiBX 1.1.6 release. In the meantime you can get it at
   
 http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl
   
I'll also mention that I'm going to be visiting Sydney and
Melbourne in
late September, with another trip to the U.S. in October. If
anyone is
interested in training classes or consulting support around SOA,
Axis2,
or XML in Java email me directly to find out more about my
 services.
   
  - 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
   
   
   
 -
To unsubscribe, e-mail:
 [EMAIL PROTECTED]
mailto: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED]
mailto: [EMAIL PROTECTED] 
   
   
   
   
--
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair
   
blog: http://pzf.fremantle.org
[EMAIL PROTECTED] mailto: [EMAIL PROTECTED]
   
Oxygenating the Web Service Platform, www.wso2.com
 http://www.wso2.com
  
  
 -
   To unsubscribe, e-mail:
 [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
  --
  Paul Fremantle
  Co-Founder and VP of Technical Sales, WSO2
  OASIS WS-RX TC Co-chair
 
  blog: http://pzf.fremantle.org
  [EMAIL PROTECTED]
 
 
  Oxygenating the Web Service Platform, www.wso2.com



 --
 Amila Suriarachchi,
 WSO2 Inc.

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



Re: Complex data types in Axis2 WSDL

2007-08-29 Thread Anne Thomas Manes
Use a WSDL-first development model. Don't let Axis2 generate your WSDL for you.

Anne

On 8/28/07, Amandeep Singh [EMAIL PROTECTED] wrote:




 Hi,



 We are moving from Axis1 to Axis2. We have a web service which defines a
 method like



 QContentData processRequest(QRequest request);



 QRequest is the base class, which is inherited by many other request
 classes. In Axis1, we had written a wsdd file which has bean definitions for
 these request classes, and those beans were visible in wsdl.



 When we move to Axis2, wsdl is generated automatically, and all is visible
 is QRequest and QContentData. How can I make sure that all my request
 classes (inheriting from QRequest) are available in wsdl?



 Thanks in advance

 Aman

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



Re: Simple question about MTOM, Rampart and optimize parts

2007-08-29 Thread Jorge Fernandez
Hi Dimuthu,

WSCOMMONS-238 opened. 

Please could you clarify a pair of things?

Expected behaviour of Rampart is to add  or MTOM elements as MIME parts isn't 
it?

what exactly does Optimize parts? How does it optimize elements? does it reduze 
its size? Is it applicable for any element, not only MTOM?

Thanks,

Jorge Fernández

Dimuthu [EMAIL PROTECTED] escribió: Hi,

Please look at my comments in line.

On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
 Hi all,
 
 I would like to know how does Rampart work with MTOM. I see that when
  using Rampart, MTOM elements are included as strings in the SOAP
  message instead of sending them outside the message as MIME parts,
  even if I don't do any operation with them (not signature, nor
  encryption), but these MIME parts appear empty in the HTTP message.
  Why is that?

mmm .. looks like this is a bug in Axiom. We are looking at it.
Please report a bug.

 Does optimize parts something about that? I don't understand much about this 
 parameter.

Using this parameter, people can manually specify which element needs to
be optimized. For example if you want to optimize CipherValue in
EncryptedData then you can specify using this parameter. It is effective
if you have specified  assertion in
your policy. Syntax for the element is as follows[1]. So actually this
is a workaround for the above problem.

Hope this will help.

Cheers,
Dimuthu

[1]


//ns1:data1
//ns2:data2








 If anybody could give me a hint about this, that would be great.
 
 Thanks,
 
 Jorge Fernández
 
 
 

 -
 
 Sé un Mejor Amante del Cine
 ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org



   
-

Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.


Re: XLMNS:NS NAMESPACE PROBLEM

2007-08-29 Thread Anne Thomas Manes
You can define your own namespace. Axis will use the namespace you
specify in the WSDD as the targetNamespace for the schema that will
define the XML type in the WSDL.

Anne

On 8/28/07, at4david [EMAIL PROTECTED] wrote:

 Hi, I am trying to deploy a web service which sends to the client a data
 complex type created for me, called Informacion, this is a class which
 will be sent to the client, I would like to know what is I have to write in
 deploy.wsdd to reference this class, I need to know what I have to write in
 xmlns:ns and where have I to put this class??

 Here I show my deploy.wsdd in service side:

 deployment xmlns=http://xml.apache.org/axis/wsdd/;
 xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

  service name=Periodico provider=java:RPC
   parameter name=scope value=application/
   parameter name=className value=ServicioInformacion/
   parameter name=allowedMethods value=*/
   beanMapping qname=ns:Informacion xmlns:ns=WHAT IS I HAVE TO PUT HERE
 IF I HAVE THE CLASS INFORMACION IN Web-Inf/classes directory
 languageSpecificType=java:Informacion/
  /service

 /deployment


 Thanks in advance
 --
 View this message in context: 
 http://www.nabble.com/XLMNS%3ANS-NAMESPACE-PROBLEM-tf4341119.html#a12366040
 Sent from the Axis - User mailing list archive at Nabble.com.


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



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



Re: WS client // basic http authentication (Axis 1.3)

2007-08-29 Thread Andrew Martin
I think you can supply the authentication username and password like this:
java.net.Authenticator.setDefault(
 new java.net.Authenticator()
 {
  protected java.net.PasswordAuthentication getPasswordAuthentication()
  {
   return new java.net.PasswordAuthentication(
username, password.toCharArray()); // Use your name/password
  }
 }
);

I think that should work regardless of how you invoke the service (Call,
proxy, etc.).

Andrew

Andy Pahne wrote:
 
 I discovered the Users guide and the code examples. They all use Call.
 But I find that a bit arkward, because then I'd have to deal with XSD
 types, return types and such things.
 
 If I compare with
ClsVacancy result =
  service.getVacancy(rentalObjectID, checkIn, checkOut, ENVIRONMENT);
 that seems very complicated.
 
 In the end, Axis generated all those objects like ClsVacancy for me and
 I hoped not to have to deal with XML/XSD/SOAP details.
 
 Andy
 
 
 
 
 
 
 
 Andy Pahne schrieb:

 Hello,

 I am currently having my first experiences with web services and axis,
 so this may be newbie questions.

 I generated a client from WSDL that consumes one of our partner's web
 services. (I used EclipseWTP to do so, but that part was easy and
 succeeded, I think). EclipseWTP currently uses Axis 1, so the exact
 version is 1.3.0.

 I was playing around with a unit test:

 public void testRawConnection_no_authentication() throws Exception {

 // get Service
 PartnerWebServiceLocator locator = new
 PartnerWebServiceLocator();
 PartnerWebServiceSoap service =
 locator.getPartnerWebServiceSoap();


 try {

 // Aufruf under test
 @SuppressWarnings(unused)
 ClsVacancy result =
 service.getVacancy(rentalObjectID, checkIn, checkOut,
 ENVIRONMENT);

 fail(expected RemoteException was NOT thrown);

 } catch (RemoteException expected) {

 assertNotNull(expected);
 assertTrue(expected.getMessage().contains(Anonymous login
 not allowed));

 }


 }





 That test suceeds, because the Web Service is protected by basic http
 authentication. But at least I am confident that I succesfully
 connected to the service, because the recieved error message comes
 from the remote system and not from Axis itself.


 Here are my questions:


 1. Is it correct to obtain the service proxy like this:

 // get Service
 PartnerWebServiceLocator locator = new
 PartnerWebServiceLocator();
 PartnerWebServiceSoap service =
 locator.getPartnerWebServiceSoap();


   I think it is correct, but can you confirm?




 2. And how do I use basic http authentication when I have a password
 and a username?
I googled around and found a code snippet that used the Call class
 (Interface ?), but I am not sure if that is the correct direction. And
 the snippet also was not complete. I did not find anything apropriate
 in  the FAQ.


 Thanks,
 Andy Pahne





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

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

-- 
Andrew Martin
Computer Programmer
Regenstrief Institute, Inc.
410 West 10th Street, Suite 2000
Indianapolis, IN 46202-3012
Phone: (317) 423-5542
Fax: (317) 423-5695
[EMAIL PROTECTED]


Confidentiality Notice: The contents of this message and any files
transmitted with it may contain confidential and/or privileged
information and are intended solely for the use of the named
addressee(s). Additionally, the information contained herein may have
been disclosed to you from medical records with confidentiality
protected by federal and state laws. Federal regulations and State laws
prohibit you from making further disclosure of such information without
the specific written consent of the person to whom the information
pertains or as otherwise permitted by such regulations. A general
authorization for the release of medical or other information is not
sufficient for this purpose.

If you have received this message in error, please notify the sender by
return e-mail and delete the original message. Any retention,
disclosure, copying, distribution or use of this information by anyone
other than the intended recipient is strictly prohibited.

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



Re: Axis client sending multiRef

2007-08-29 Thread p . casenove
Thanks a lot for the help, everything is working now.
Juste have to fix the class loading issues I'm facing.




Anne Thomas Manes [EMAIL PROTECTED] 
29/08/2007 14:10
Veuillez répondre à
axis-user@ws.apache.org


A
axis-user@ws.apache.org
cc

Objet
Re: Axis client sending multiRef






Yes -- remove the encodingStyle attributes.

On 8/27/07, [EMAIL PROTECTED]  [EMAIL PROTECTED] wrote:

Do I just have to remove the encodingStyle attribute to switch from 
encoded to literal? 
Or are there other modifications to perform? 



Anne Thomas Manes [EMAIL PROTECTED] 
25/08/2007 21:44 


Veuillez répondre à
axis-user@ws.apache.org


A
axis-user@ws.apache.org 
cc

Objet
Re: Axis client sending multiRef








This WSDL is rpc/encoded. You must convert it to rpc/literal.
(better yet, your should convert it to document/literal.)

Anne

On 8/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 

hello, 
I've been regenerating the Axis 1.2 code from the wsdl (which is 
rpc/literal style) and forced the sendMultiRef parameter to false. 
The client still sends SOAP request causing my WS to crash: 
soapenv:Body 
   getServiceGeneral soapenv:encodingStyle= 
http://schemas.xmlsoap.org/soap/encoding/; 
   arg0 xsi:type=ns1:SERVICE_GENERAL_REQUETE_DETAIL 
xmlns:ns1=http://www.almerys.com/schemas/requete  
   LOGICIEL EDITEUR=Axilog NOM=Axiam 
VERSION=1.2/ 
   SERVICE CODE=02 VERSION=00.02.06/ 
   FLUX xsi:type=xsd:base64BinaryPD[...]=/FLUX 
   LISTES DATE_VALIDITE_BLACK_LISTE=2010-01-01 
DATE_VALIDITE_WHITE_LISTE=2010-01-01/ 
   /arg0 
   /getServiceGeneral 
/soapenv:Body 

The arg0 tag is the one that makes the WS crash, when I call 
theRequest.getSERVICE_GENERAL_REQUETE_DETAIL() as it does not find the 
correct tag. 

Here is the wsdl of the service: 

?xml version= 1.0 encoding=UTF-8 ? 
wsdl:definitions xmlns:reponse= http://www.almerys.com/schemas/reponse; 
   xmlns:requete= http://www.almerys.com/schemas/requete; 
   xmlns:soapenc= http://schemas.xmlsoap.org/soap/encoding/; 
   xmlns:tns= http://www.almerys.com/services/AlmerysWebService; 
   xmlns:wsdl= http://schemas.xmlsoap.org/wsdl/; 
   xmlns:wsdlsoap= http://schemas.xmlsoap.org/wsdl/soap/; 
   xmlns:xs= http://www.w3.org/2001/XMLSchema; 
   xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; 
   targetNamespace= http://www.almerys.com/services/AlmerysWebService
 

   wsdl:import location=SG_00.01.05_REQ.xsd 
   namespace= http://www.almerys.com/schemas/requete; / 
   wsdl:import location=SG_00.01.05_REP.xsd 
   namespace= http://www.almerys.com/schemas/reponse; / 

   wsdl:message name=getServiceGeneralRequest  
   wsdl:part name=SERVICE_GENERAL_REQUETE 
   type=requete:SERVICE_GENERAL_REQUETE_DETAIL / 
   /wsdl:message  

   wsdl:message name=getServiceGeneralResponse  
   wsdl:part name=SERVICE_GENERAL_REPONSE 
   type=reponse:SERVICE_GENERAL_REPONSE_DETAIL / 
   /wsdl:message  

   wsdl:portType name=Interfacage  
   wsdl:operation name=getServiceGeneral 
   parameterOrder=SERVICE_GENERAL_REQUETE  
   wsdl:input message=tns:getServiceGeneralRequest 
   name=getServiceGeneralRequest / 
   wsdl:output message=
tns:getServiceGeneralResponse 
   name=getServiceGeneralResponse / 
   /wsdl:operation 
   /wsdl:portType  

   wsdl:binding name=WebServiceSoapBinding type=tns:Interfacage  

   wsdlsoap:binding style=rpc 
   transport= http://schemas.xmlsoap.org/soap/http; 
/ 
   wsdl:operation name=getServiceGeneral  
   wsdlsoap:operation soapAction=getServiceGeneral 
/ 
   wsdl:input name=getServiceGeneralRequest  
   wsdlsoap:body 
   encodingStyle= 
http://schemas.xmlsoap.org/soap/encoding/; 
   namespace= 
http://www.almerys.com/services/AlmerysWebService; 
   use=literal / 
   /wsdl:input 
   wsdl:output name=getServiceGeneralResponse  
   wsdlsoap:body 
   encodingStyle= 
http://schemas.xmlsoap.org/soap/encoding/; 
   namespace= 
http://www.almerys.com/services/AlmerysWebService; 
   use=literal / 
   /wsdl:output 
   /wsdl:operation 
   /wsdl:binding  
   wsdl:service name=InterfacageService  
   wsdl:port binding=tns:WebServiceSoapBinding 
   name=AlmerysWebService  
   

Re: Developing Axis2 web services starting from code

2007-08-29 Thread Dennis Sosnoski
Hi Amila,

1. Yes, Jibx2Wsdl is fully compatible with 1.4. I haven't tested
Jibx2Wsdl with 1.3 (since I don't know anyone who's still using 1.3 for
their actual development efforts, as opposed to deployment), but the
JiBX framework itself is compatible with 1.3.
2. If you use Java 5 generics Jibx2Wsdl will pick up the item type for a
collection automatically, and likewise if you're using arrays. For
untyped collections you *shouldn't* actually need to specify the type,
as long as it's a class that you've included in your binding generation
- but I don't think I've tested this part, and it might not work at
present without the type specification.

  - 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



Amila Suriarachchi wrote:
 hi dennis,

 nice article. It seems many alternatives being developed (which I
 belive is good) for the code-first approach as well. I think that the
 java document feature you have introduced is a cool feature as well.

 please bear with me asking these two questions.
 1. Does this compatible with java 1.4?
 2. I saw this your article
 | class name=Order requireds=@customerId customerName billTo items

  optionals=orderId orderDate shipDate
collection-field field=items 
 item-type=com.sosnoski.infoq.ex1.Item/
  /class
 So it is manadatory to declare the item-type for an List? 


 Amila.

 |


 On 8/29/07, *Paul Fremantle* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Well to be fair you brought more than balance!! A whackload of
 good code goes a lgg way!

 Paul


 On 8/28/07, *Dennis Sosnoski*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Glad you enjoyed it, Paul!

 There's been so much bashing of the idea of web service
 development
 starting from code that I thought it was time to bring a bit
 of balance
 to the discussion.

   - Dennis


 Paul Fremantle wrote:
  Great article! Thanks Dennis.
 
  Paul
 
  On 8/28/07, *Dennis Sosnoski*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  My article on Code First Web Services Reconsidered has
 been
  published
  by InfoQ:
 http://www.infoq.com/articles/sosnoski-code-first
 http://www.infoq.com/articles/sosnoski-code-first I've also
  made some updates to Jibx2Wsdl to fix a few problems
 found, and
  with one
  more set of enhancements coming up will be making it part
 of the
  upcoming JiBX 1.1.6 release. In the meantime you can get
 it at
  http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl
 
  I'll also mention that I'm going to be visiting Sydney and
  Melbourne in
  late September, with another trip to the U.S. in October. If
  anyone is
  interested in training classes or consulting support
 around SOA,
  Axis2,
  or XML in Java email me directly to find out more about
 my services.
 
- Dennis
 
  --
  Dennis M. Sosnoski
  SOA and Web Services in Java
  Training and Consulting
  http://www.sosnoski.com http://www.sosnoski.com -
 http://www.sosnoski.co.nz
  Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
 
 
 
 -

  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
 
 
 
  --
  Paul Fremantle
  Co-Founder and VP of Technical Sales, WSO2
  OASIS WS-RX TC Co-chair
 
  blog: http://pzf.fremantle.org http://pzf.fremantle.org
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL 
 PROTECTED]
 mailto:[EMAIL PROTECTED]
 
  Oxygenating the Web Service Platform, www.wso2.com
 http://www.wso2.com http://www.wso2.com

 -

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




 -- 
 Paul Fremantle
 Co-Founder and VP of Technical Sales, WSO2

Re: Developing Axis2 web services starting from code

2007-08-29 Thread Dennis Sosnoski
Hi Anne,

You're assuming that corporations already have a set of approved schema
datatypes. Most smaller to mid-sized organizations don't, and given the
difficulties of schema development I mention in the article I don't
think many are likely to develop these types directly. On the other
hand, many organizations in this size range already have standardized
business object models in the form of code libraries. Converting these
standardized object models to schema terms, if done properly, will give
them just the set of datatypes you postulate.

As a side benefit, if they take this approach they'll be able to reuse
their existing object model for new services, while knowing that it'll
still map correctly to the equivalent schema datatypes.

As to both SOAP and POX, I don't really understand your point. If you
have the schema you can use it for both purposes - all we're discussing
is how you get to that schema in the first place.

  - 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



Anne Thomas Manes wrote:
 Nice article Dennis, but you haven't addressed the fundamental issue
 associated with the code-first approach. I'd like to see a code-first
 approach that allows me to use corporate-approved schema datatypes so
 that my applications aren't responsible for proliferating a ton of
 incompatible types. Types are the fundamental sharable components in
 service-oriented systems that enable interoperability of diverse
 systems. These types need to be managed and governed. They should be
 properly modeled by data professionals that understand the semantics
 of the data that will be exchanged by applications.

 You really don't want a thousand different types representing core
 entities like customer, order, and invoice. You want your
 applications to be exchanging well-defined types that are understood
 by many applications.

 If your goal is to simply create a point-to-point connection between
 two applications, then the code-first approach works just fine. And I
 appreciate the value of using a model that supports both SOAP and POX
 interfaces.

 But a better approach would be one that starts from corporate approved
 XML Schema data types and allows me to support both SOAP and POX
 interfaces.

 Anne



 On 8/29/07, Amila Suriarachchi [EMAIL PROTECTED] wrote:
   
 hi dennis,

 nice article. It seems many alternatives being developed (which I belive is
 good) for the code-first approach as well. I think that the java document
 feature you have introduced is a cool feature as well.

 please bear with me asking these two questions.
 1. Does this compatible with java 1.4?
 2. I saw this your article
  class name=Order requireds=@customerId customerName billTo items

  optionals=orderId orderDate shipDate
  collection-field field=items item-type=com.sosnoski.infoq.ex1.Item/
  /class
 So it is manadatory to declare the item-type for an List?


 Amila.




 On 8/29/07, Paul Fremantle [EMAIL PROTECTED] wrote:
 
 Well to be fair you brought more than balance!! A whackload of good code
   
 goes a lgg way!
 
 Paul



 On 8/28/07, Dennis Sosnoski  [EMAIL PROTECTED] wrote:
   
 Glad you enjoyed it, Paul!

 There's been so much bashing of the idea of web service development
 starting from code that I thought it was time to bring a bit of balance
 to the discussion.

   - Dennis


 Paul Fremantle wrote:
 
 Great article! Thanks Dennis.

 Paul

 On 8/28/07, *Dennis Sosnoski*  [EMAIL PROTECTED]
 mailto: [EMAIL PROTECTED] wrote:

 My article on Code First Web Services Reconsidered has been
 published
 by InfoQ:
   
 http://www.infoq.com/articles/sosnoski-code-first I've also
 
 made some updates to Jibx2Wsdl to fix a few problems found, and
 with one
 more set of enhancements coming up will be making it part of the
 upcoming JiBX 1.1.6 release. In the meantime you can get it at

   
 http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/jibx2wsdl
 
 I'll also mention that I'm going to be visiting Sydney and
 Melbourne in
 late September, with another trip to the U.S. in October. If
 anyone is
 interested in training classes or consulting support around SOA,
 Axis2,
 or XML in Java email me directly to find out more about my
   
 services.
 
   - 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



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




 --
 Paul 

Re: WS client // basic http authentication (Axis 1.3)

2007-08-29 Thread Andy Pahne


No, that does not work. The error message is still the same: Anonymous 
login not allowed


Here is how I tried:


public void testRawConnection_OK() throws Exception {

java.net.Authenticator.setDefault(
new java.net.Authenticator(){

@Override
protected java.net.PasswordAuthentication 
getPasswordAuthentication(){

return new java.net.PasswordAuthentication(
   USER_ID, PASSWORD.toCharArray());
}

}
   );

// get Service
PartnerWebServiceLocator locator = new PartnerWebServiceLocator();
PartnerWebServiceSoap service = locator.getPartnerWebServiceSoap();

// Aufruf under test
ClsVacancy result =
service.getVacancy(rentalObjectID, checkIn, checkOut, 
ENVIRONMENT);


// assert u. verify
assertNotNull(result);

}


Andrew Martin schrieb:

I think you can supply the authentication username and password like this:
java.net.Authenticator.setDefault(
 new java.net.Authenticator()
 {
  protected java.net.PasswordAuthentication getPasswordAuthentication()
  {
   return new java.net.PasswordAuthentication(
username, password.toCharArray()); // Use your name/password
  }
 }
);

I think that should work regardless of how you invoke the service (Call,
proxy, etc.).

Andrew

Andy Pahne wrote:

I discovered the Users guide and the code examples. They all use Call.
But I find that a bit arkward, because then I'd have to deal with XSD
types, return types and such things.

If I compare with

ClsVacancy result =
 service.getVacancy(rentalObjectID, checkIn, checkOut, ENVIRONMENT);

that seems very complicated.

In the end, Axis generated all those objects like ClsVacancy for me and
I hoped not to have to deal with XML/XSD/SOAP details.

Andy







Andy Pahne schrieb:

Hello,

I am currently having my first experiences with web services and axis,
so this may be newbie questions.

I generated a client from WSDL that consumes one of our partner's web
services. (I used EclipseWTP to do so, but that part was easy and
succeeded, I think). EclipseWTP currently uses Axis 1, so the exact
version is 1.3.0.

I was playing around with a unit test:

public void testRawConnection_no_authentication() throws Exception {

// get Service
PartnerWebServiceLocator locator = new
PartnerWebServiceLocator();
PartnerWebServiceSoap service =
locator.getPartnerWebServiceSoap();


try {

// Aufruf under test
@SuppressWarnings(unused)
ClsVacancy result =
service.getVacancy(rentalObjectID, checkIn, checkOut,
ENVIRONMENT);

fail(expected RemoteException was NOT thrown);

} catch (RemoteException expected) {

assertNotNull(expected);
assertTrue(expected.getMessage().contains(Anonymous login
not allowed));

}


}





That test suceeds, because the Web Service is protected by basic http
authentication. But at least I am confident that I succesfully
connected to the service, because the recieved error message comes
from the remote system and not from Axis itself.


Here are my questions:


1. Is it correct to obtain the service proxy like this:

// get Service
PartnerWebServiceLocator locator = new
PartnerWebServiceLocator();
PartnerWebServiceSoap service =
locator.getPartnerWebServiceSoap();


  I think it is correct, but can you confirm?




2. And how do I use basic http authentication when I have a password
and a username?
   I googled around and found a code snippet that used the Call class
(Interface ?), but I am not sure if that is the correct direction. And
the snippet also was not complete. I did not find anything apropriate
in  the FAQ.


Thanks,
Andy Pahne





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



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





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



Re: Axis2: Configure Axis dynamicly (SpringAware)

2007-08-29 Thread robert lazarski
Take a look at the spring unit tests in the source and specifically
the way the axis2 test harness works. That should help you understand
a bit on what you need to do.

HTH,
Robert

On 8/29/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi,

 I have looked at this for a while now but I still have some problems
 figuring it out. Hope someone is able to help me here! ;-)

 I can see that makeNewServiceObject(ctx) in AbstractMessageReceiver tests
 on AxisService parameters to determine whether to receive its service
 object by a ServiceObjectSupplier or to create it with reflection. I
 thought it then would be possible to use AxisService.createService() to
 obtain a basic AxisService where I removed the parameter Constants.
 SERVICE_CLASS and added Constants.SERVICE_OBJECT_SUPPLIER
 SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME. But it doesn't
 seam to be the right way to do this. Do I need to instantiate the
 AxisService by my self and in such case, what must be set on this object as
 minimum?

 //My guess
 ConfigurationContext config =
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,null);
 AxisService service = AxisService.createService(com.firm.MyService,
 config.getAxisConfiguration());

 service.removeParameter(service.getParameter(Constants.SERVICE_CLASS));
 service.addParameter(Constants.SERVICE_OBJECT_SUPPLIER,
 org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier);
 service.addParameter(SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME,
  myBeanName);

 config.getAxisConfiguration().addService(service);

 Regards
 Multi-Support A/S

 Torben Riis
 
 Phone +45 96 600 600, Fax +45 96 600 601
 E-mail: [EMAIL PROTECTED]
 http://www.multi-support.com



  robert lazarski
  [EMAIL PROTECTED]
  mail.com  To
axis-user@ws.apache.org
  20-08-2007 14:38   cc

Subject
  Please respond to Re: Axis2: Configure Axis dynamicly
  [EMAIL PROTECTED] (SpringAware)
   he.org









 Using SpringAppContextAwareObjectSupplier, you have the option of
 using the the same ApplicationContextHolder class that axis2 uses.
 Also, take a look at the AbstractMessageReceiver, ie, looking at the
 source in this part of axis2 should point you in the right direction.

 HTH,
 Robert

 On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I would like hear if it some how is possible to configure Axis2 dynamic
 as
  the following in my service descriptor.
 
  serviceGroup
service name=MyService
parameter name=ServiceObjectSupplier
 
 org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier

  /parameter
parameter name=SpringBeanNamemyService/parameter
operation name=getJob
  messageReceiver class=
  org.apache.axis2.rpc.receivers.RPCMessageReceiver /
/operation
operation name=setStatus
  messageReceiver class=
  org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver /
/operation
/service
  /serviceGroup
 
  I now it is possible configure Axis2 dynamic with ordinary services using
  AxisService.createService(...), but how do I do it with Spring enabled
  services?
 
  //Configure Axis2 dynamic without spring support.
  MapString, MessageReceiver mep = new HashMapString,
 MessageReceiver();
  mep.put(http://www.w3.org/2004/08/wsdl/in-only;,
 RPCInOnlyMessageReceiver.
  class.newInstance());
  mep.put(http://www.w3.org/2004/08/wsdl/in-out;, RPCMessageReceiver.class
  .newInstance());
  ConfigurationContext config = ConfigurationContextFactory.
  createConfigurationContextFromFileSystem(null,null);
  AxisService service = AxisService.createService(MyService.class,
  config.getAxisConfiguration(), mep, null, null, BufferFactory.class
  .getClassLoader());
  config.getAxisConfiguration().addService(service);
 
 
  Regards
  Multi-Support A/S
 
  Torben Riis
  
  Phone +45 96 600 600, Fax +45 96 600 601
  E-mail: [EMAIL PROTECTED]
  http://www.multi-support.com
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




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




Axis2 and Jetty

2007-08-29 Thread Yadav, Yogendra \(IT\)
Hi,
Looking for some help on integrating Axis2 with Jetty. Appreciate any
links, writeup etc
 
thanx
-yogen


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


Rampart and SAML question

2007-08-29 Thread Massimiliano Masi

Hi all,

I have a SAML2 Authentication Assertion as OMElement, created by opensaml2.

How can I include it in the SOAP Header using the rampart api?

Is there a way to do it?


Thank you in advance,


Massimiliano


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



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



RE: Complex data types in Axis2 WSDL

2007-08-29 Thread Amandeep Singh
Thanks.

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 29, 2007 6:00 AM
To: axis-user@ws.apache.org
Subject: Re: Complex data types in Axis2 WSDL

Use a WSDL-first development model. Don't let Axis2 generate your WSDL
for you.

Anne

On 8/28/07, Amandeep Singh [EMAIL PROTECTED] wrote:




 Hi,



 We are moving from Axis1 to Axis2. We have a web service which defines
a
 method like



 QContentData processRequest(QRequest request);



 QRequest is the base class, which is inherited by many other request
 classes. In Axis1, we had written a wsdd file which has bean
definitions for
 these request classes, and those beans were visible in wsdl.



 When we move to Axis2, wsdl is generated automatically, and all is
visible
 is QRequest and QContentData. How can I make sure that all my request
 classes (inheriting from QRequest) are available in wsdl?



 Thanks in advance

 Aman

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


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



Invalin null character error

2007-08-29 Thread Dennis Schaaf

Hey,

I am using ruby's soap4r library to connect to my axis2 application. I 
tried sending across some of my own classes, hoping that they'd be 
serialized properly and then rebuilt on the ruby end.


But that does not happen. When I return such a class I get this error, 
which doesn't seem to have anything to do with what I might be doing wrong.


Does anyone have any idea what might be causing this? What more 
information might be usefull, wsdl files?


thanks for your help

dennis




the trace from the axis2 server


org.apache.axis2.AxisFault: Invalid null character in text to output

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)

at 
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:72)


at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:294)


at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:211)


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

at 
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)


at 
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)


at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)

at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)


at 
org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:256)


at 
org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:259)


at 
org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:166)


at 
org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:85)


at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)


at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)


at java.lang.Thread.run(Thread.java:619)

Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null character in 
text to output


at 
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:520)


at 
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:196)


at 
org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:212)


at 
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:371)


at 
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:365)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)


at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:237)


at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:225)


at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)


at 
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:421)


at 
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:68)


... 14 more

Caused by: java.io.IOException: Invalid null character in text to output

at com.ctc.wstx.sw.XmlWriter.throwInvalidChar(XmlWriter.java:538)

at 
com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:453)


at 
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:518)


... 33 more



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



Re: AXIS2 web services hosting

2007-08-29 Thread Valmir Meneses
Hello Professor Sanjiva Weerawarana,
Thank very much.
By the way, What is the correct citation for AXIS2?
I am writing a paper on Multiagent Systems and Web Services and wish to cite
AXIS2 and Apache TomCat as the open source infrastructure.
Thanks again,


2007/8/29, Sanjiva Weerawarana [EMAIL PROTECTED]:

 If you just want to test it for a short time, WSO2 runs a set of trial
 instances of WSO2's Web Services Application Server (which is Axis2 +
 other stuff including an easy to use admin console) at
http://wso2.org/tools

 You can upload your aar file there and give it a whirl with a public URL.

 Sanjiva.

 Valmir Meneses wrote:
  Hello,
  Greetings.
  I am currently researching AXIS2 web services with Java. Is there any
 known
  web hosting site that runs AXIS2 where I can post and test an AXIS2 web
  service?
  I have done the tests in my own server (web service and client) but I
 wish
  to test it in a web acessible URL.
 
  Thanks,
 

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

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




Problems with abstract data types in Axis2

2007-08-29 Thread Amandeep Singh
Hi,

 

We have a class hierarchy exposed through web services, working fine
with Axis1. We are facing an issue while porting it to Axis2. The class
hierarchy looks like:

 

QRequest -- Abstract class

Project -- Child class deriving from QRequest with some fields

 

In the web service, I have defined a method

 

String getStringRequest(ClassParent obj)

 

Now, from the client side, when I call this method and pass an instance
of ClassChild, it fails. The stack trace mentions
InstantiationExceptionConstructorAccessorImpl. My guess is that axis
is trying to instantiate the abstract class here.

 

I am copying SOAP request and response below. Any help would be greatly
appreciated.

 

Thanks,

Aman

 

 

SOAP Request

---

 

?xml version=1.0 encoding=utf-8?soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:BodygetStringReques
t xmlns=http://webservice.manager.quark.com;request
xmlns:q1=http://ro.clientsdk.manager.quark.com/xsd;
xsi:type=q1:Projectq1:request xsi:nil=true /q1:jobJacket
xsi:nil=true /q1:jobTicket xsi:nil=true /q1:projectName
xsi:nil=true /q1:saveAs xsi:nil=true /q1:xMLVersion
xsi:nil=true
//request/getStringRequest/soap:Body/soap:Envelope

 

SOAP Response

-

 

?xml version='1.0' encoding='utf-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Body
soapenv:Faultfaultcodesoapenv:Server/faultcodefaultstringunknown
/faultstringdetail
//soapenv:Fault/soapenv:Body/soapenv:Envelope



Where does Axis2 look for WSDL on ...?wsdl URI?

2007-08-29 Thread Florent Georges
  Hi

  I am looking for the way the WSDL is find (and where it
is looking for) when someone request it by a URI ending
with ?wsdl.

  Does someone can explain me or redirect me to an appropriate
source?  I did look into the manual but really I didn't find
it.

  Thanks in advance.  Regards,

--drkm






















  
_ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

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



RE: Where does Axis2 look for WSDL on ...?wsdl URI?

2007-08-29 Thread Amandeep Singh
Check this out

http://www.developer.com/open/article.php/3589126

-- Aman

-Original Message-
From: Florent Georges [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 29, 2007 12:18 PM
To: axis-user@ws.apache.org
Subject: Where does Axis2 look for WSDL on ...?wsdl URI?


  Hi

  I am looking for the way the WSDL is find (and where it
is looking for) when someone request it by a URI ending
with ?wsdl.

  Does someone can explain me or redirect me to an appropriate
source?  I did look into the manual but really I didn't find
it.

  Thanks in advance.  Regards,

--drkm






















 

_ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
Mail 

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


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



RE: Problems with abstract data types in Axis2

2007-08-29 Thread Amandeep Singh
Corrected problem statement...

 



From: Amandeep Singh [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 29, 2007 12:06 PM
To: axis-user@ws.apache.org
Subject: Problems with abstract data types in Axis2

 

Hi,

 

We have a class hierarchy exposed through web services, working fine
with Axis1. We are facing an issue while porting it to Axis2. The class
hierarchy looks like:

 

QRequest -- Abstract class

Project -- Child class deriving from QRequest with some fields

 

In the web service, I have defined a method

 

String getStringRequest(QRequest obj)

 

Now, from the client side, when I call this method and pass an instance
of Project, it fails. The stack trace mentions
InstantiationExceptionConstructorAccessorImpl. My guess is that axis
is trying to instantiate the abstract class here.

 

I am copying SOAP request and response below. Any help would be greatly
appreciated.

 

Thanks,

Aman

 

 

SOAP Request

---

 

?xml version=1.0 encoding=utf-8?soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:BodygetStringReques
t xmlns=http://webservice.manager.quark.com;request
xmlns:q1=http://ro.clientsdk.manager.quark.com/xsd;
xsi:type=q1:Projectq1:request xsi:nil=true /q1:jobJacket
xsi:nil=true /q1:jobTicket xsi:nil=true /q1:projectName
xsi:nil=true /q1:saveAs xsi:nil=true /q1:xMLVersion
xsi:nil=true
//request/getStringRequest/soap:Body/soap:Envelope

 

SOAP Response

-

 

?xml version='1.0' encoding='utf-8'?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Body
soapenv:Faultfaultcodesoapenv:Server/faultcodefaultstringunknown
/faultstringdetail
//soapenv:Fault/soapenv:Body/soapenv:Envelope



Axis2 JAX-WS integration

2007-08-29 Thread Vladimir Simjanoski
Hi all,

does Axis2 in its current version (2-1.3) supports JAX-WS development (WS
annotations, deployment model) or it's still work in progress? I couldn't
find any tutorial or how to except for some work in progress tags.

Thanks,
Vlade


Rampart 1.3 and Axis2 1.3

2007-08-29 Thread Jon Hanshew

Grettings,

I have gotten all the Rampart 1.3 Policy samples (except for tomcat) to run
with Axis2 1.3.  All the Basic samples run but do nothing interesting that I
can see.  

I am trying to get an Service and Client to run based on Policy sample01.  I
think I have everything configured correctly, but I cannot get my own stuff
to run with the rampart and addressing modules engaged.

I suspect that the problem may stem from the difference between Axis2 style
clients and Axis clients.  Here is a code sample.

ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(C:/SecurityRepos,
null);
   
EmsServiceStub  stub =  new EmsServiceStub (ctx,
http://localhost:8080/axis2/services/EmsService;);
ServiceClient   client =stub._getServiceClient();
Options options =   client.getOptions();
   
options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, 
loadPolicy(C:/SecurityPolicy/policy.xml));
client.engageModule(addressing);
client.engageModule(rampart);

response = stub.GetEmsData(request);

Note that this code does not use the service calling pattern shown in the
Rampart samples.  The client and server work fine when the engage staments
are commented out.  However it crashes with the following trace when I leave
the engage statements in.

org.apache.axis2.AxisFault: The server did not recognise the action which it
received: 
at
org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke(AddressingInFaultHandler.java:114)
at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:336)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
emsservice.client.EmsServiceStub.GetEmsData(EmsServiceStub.java:141)
at emsservice.client.TestClient.main(TestClient.java:103)

Additionally, the Soapmonitor shows no activity at all.

Does anybody have a clue about what is going on?

Thanks,

Jon

-- 
View this message in context: 
http://www.nabble.com/Rampart-1.3-and-Axis2-1.3-tf4350415.html#a12395803
Sent from the Axis - User mailing list archive at Nabble.com.


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



[Axis2] Axis2 and Enum type

2007-08-29 Thread Leon Hwang

Hello there,

I created a simple function that returns an object type of enum.
It is very simple function:

public static Gender getGender() {
return Gender.MALE;
}

but when I opened the page from a browser
http://localhost:8080/OpenApi/services/TestApi10/getGender

it generates an error like
soapenv:Reason
soapenv:Text xml:lang=en-US
java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping qname 
not fond for the package: org.apache.catalina.loader
/soapenv:Text
/soapenv:Reason

If I return any other objects, it works fine.
Am I not supposed to Enum type?
I think this is an error in Axis2.
By the way, I would not like to use Type-safe enum.
It has its own problem.

I have attached a source code and services.xml (TestApi.xml) and wsdl 
(TestApi10.xml - created by Axis2 on the fly).


By the way, if I create a client using WSDL2Java
wsdl2java.bat -or -g -Eofv -uw -u -uri 
http://localhost:8080/OpenApi/services/UserApi10?wsdl

I get a warning like this:
[WARN] Type {http://www.w3.org/2001/XMLSchema}Enum missing!

How do I get rid of this?

Also WSDL2Java doesn't create a enum type for Gender. Rather it is a regular 
class.
Which I have to use it like

Gender g = new Gender();
g.getFEMALE();

This didn't make a sense to me.


As a comparison, .NET create an enum type correctly.
In WSDL that .NET create, it is a just simpleType with restrictions.
I don't know if that caused the problem or not.

I would appreciate if you could give any help on this.

Thank you,

- Leon
serviceGroup
	service name=TestApi10 scope=application
		descriptionTest Services Api - v1.0/description
		
		messageReceivers
			messageReceiver
mep=http://www.w3.org/2004/08/wsdl/in-only;
class=org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver /
			messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out;
class=org.apache.axis2.rpc.receivers.RPCMessageReceiver /
		/messageReceivers
		parameter name=ServiceClass locked=false
			com.strands.openapi.services.user.TestApi10
		/parameter
	/service
/serviceGrouppackage com.strands.openapi.services.user;

import com.strands.openapi.types.user.Gender;

public class TestApi10 {
	public static Gender getGender() {
		return Gender.MALE;
	}
}
?xml version=1.0 encoding=UTF-8?
wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:ns1=http://user.types.openapi.strands.com/xsd; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:ns0=http://user.services.openapi.strands.com; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; targetNamespace=http://user.services.openapi.strands.com;
wsdl:documentationTestApi10/wsdl:documentation
wsdl:types
xs:schema xmlns:ns=http://user.services.openapi.strands.com; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://user.services.openapi.strands.com;
xs:element name=getGenderResponse
xs:complexType
xs:sequence
xs:element minOccurs=0 name=return nillable=true type=ns1:Gender/
/xs:sequence
/xs:complexType
/xs:element
/xs:schema
xs:schema xmlns:ax27=http://user.types.openapi.strands.com/xsd; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://user.types.openapi.strands.com/xsd;
xs:complexType name=Gender
xs:complexContent
xs:extension base=xs:Enum
xs:sequence
xs:element minOccurs=0 name=FEMALE nillable=true type=ax27:Gender/
xs:element minOccurs=0 name=MALE nillable=true type=ax27:Gender/
/xs:sequence
/xs:extension
/xs:complexContent
/xs:complexType
/xs:schema
/wsdl:types
wsdl:message name=getGenderRequest/
wsdl:message name=getGenderResponse
wsdl:part name=parameters element=ns0:getGenderResponse/
/wsdl:message
wsdl:portType name=TestApi10PortType
wsdl:operation name=getGender
wsdl:input message=ns0:getGenderRequest wsaw:Action=urn:getGender/
wsdl:output message=ns0:getGenderResponse wsaw:Action=urn:getGenderResponse/
/wsdl:operation
/wsdl:portType
wsdl:binding name=TestApi10SOAP11Binding type=ns0:TestApi10PortType
soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/
wsdl:operation name=getGender
soap:operation soapAction=urn:getGender style=document/
wsdl:input
soap:body use=literal/
/wsdl:input
wsdl:output
soap:body use=literal/
/wsdl:output
/wsdl:operation
/wsdl:binding

[Axis2] Axis2 and New field

2007-08-29 Thread Leon Hwang

Greetings,

I am writing a server that returns an object, say User object, containing only 
username.
I create a client using its wsdl (with option -d adb -uw -Eosv).
The client is able to retrieve username field correctly.

Later I added one more field to User object, say password, and redeployed it to 
the server.
Now the client complains about the field with unexpected subelement password. 
(ADBException)

This will happen a lot in business world as their spec changes.

Is there some way (either in client or server) we can make it ignore extra 
elements?

Thanks in advance.








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



RE: Invalin null character error

2007-08-29 Thread Jorge Fernandez
Hi Dennis,

I got this error when I tried to return a Java char type from my service. I was 
recovering it from a database and when it hadn't got any value there, the char 
I got was a non printable ASCII character and when I tried to serialize it to 
the soap message I think I got the same exception. So maybe there are problems 
with non printable characters but it's only my guess. Hope this helps.


Regards,

Jorge Fernández



Dennis Schaaf [EMAIL PROTECTED] escribió: Hey,

I am using ruby's soap4r library to connect to my axis2 application. I 
tried sending across some of my own classes, hoping that they'd be 
serialized properly and then rebuilt on the ruby end.

But that does not happen. When I return such a class I get this error, 
which doesn't seem to have anything to do with what I might be doing wrong.

Does anyone have any idea what might be causing this? What more 
information might be usefull, wsdl files?

thanks for your help

dennis




the trace from the axis2 server

 org.apache.axis2.AxisFault: Invalid null character in text to output

 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)

 at 
 org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:72)

 at 
 org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:294)

 at 
 org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:211)

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

 at 
 org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)

 at 
 org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)

 at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)

 at 
 org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)

 at 
 org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:256)

 at 
 org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:259)

 at 
 org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:166)

 at 
 org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:85)

 at 
 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)

 at 
 edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)

 at java.lang.Thread.run(Thread.java:619)

 Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null character in 
 text to output

 at 
 com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:520)

 at 
 org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:196)

 at 
 org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:212)

 at 
 org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:371)

 at 
 org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:365)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)

 at 
 org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:237)

 at 
 org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:225)

 at 
 org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)

 at 
 org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:421)

 at 
 org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:68)

 ... 14 more

 Caused by: java.io.IOException: Invalid null character in text to output

 at 

[Axis2] WS-Trust namespace issue on weblogic

2007-08-29 Thread Tony Dean
Hi,

I have a WS-Trust namespaces issue using Axis2 1.1 / Rampart 1.1
deployed on Weblogic 9.2.

First, the same exact deployment on Jboss 4.2 works just fine.  That
puzzles the heck out of me.  I don't know why there would be any
container-specific code involved.

Here's the issue.

I am using some Rahas utility code to generate a
RequestSecurityTokenResponse.  In particular, I am using
org.apache.rahas.TrustUtil. class.  This basically uses Axiom to
generate appropriate elements to return in the respone.

On Jboss, the response looks like:

?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   soapenv:Header/soapenv:Header
   soapenv:Body
  wst:RequestSecurityTokenResponse
xmlns:wst=http://schemas.xmlsoap.org/ws/2005/02/trust;
 wst:RequestedSecurityToken
  ...
 /wst:RequestedSecurityToken
 wst:Lifetime
wsu:Created
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd2007-08-30T00:49:09.791Z/wsu:Created
wsu:Expires
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd2007-08-30T01:04:09.791Z/wsu:Expires
 /wst:Lifetime
 wst:RequestedProofToken
 
wst:BinarySecretTlL19TASHV4nmpcE5QFcPUAmr2x4bi1c+yjNOj0iQYE=/wst:Bina
rySecret
 /wst:RequestedProofToken
  /wst:RequestSecurityTokenResponse
   /soapenv:Body
/soapenv:Envelope


On weblogic, the same code creates the following invalid response:

?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   soapenv:Header/soapenv:Header
   soapenv:Body
  wst:RequestSecurityTokenResponse
xmlns:wst=http://schemas.xmlsoap.org/ws/2005/02/trust;
 wst:RequestedSecurityToken
  ...
 /wst:RequestedSecurityToken
 wst:Lifetime
wsu:Created
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd2007-08-30T00:49:09.791Z/wsu:Created
wsu:Expires2007-08-30T01:04:09.791Z/wsu:Expires
 /wst:Lifetime
 wst:RequestedProofToken
 
wst:BinarySecretTlL19TASHV4nmpcE5QFcPUAmr2x4bi1c+yjNOj0iQYE=/wst:Bina
rySecret
 /wst:RequestedProofToken
  /wst:RequestSecurityTokenResponse
   /soapenv:Body
/soapenv:Envelope

Notice in the invalid response the Expires element does not contain the
wsu namespace declaration which makes it invalid.  How can the same
code produce different results when the code has no container specific
actions to consider.  It seems to be a bug in Axiom, but why should it
be different on weblogic than on jboss?


I'd appreciate a solution and/or any advice on this matter.

Thanks.

Tony Dean
SAS Institute Inc.
919.531.6704
[EMAIL PROTECTED]

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


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



Re: Where does Axis2 look for WSDL on ...?wsdl URI?

2007-08-29 Thread keith chapman
Checkout the doGet method in the AxisServlet. It intercepts these special
request and route it appropriately. Its the axisService that ultimately
prints out its WSDL using  the  printWSDL, printWSDL2 and printUserWSDL
methods.

Thanks,
Keith.

On 8/29/07, Florent Georges [EMAIL PROTECTED] wrote:

   Hi

   I am looking for the way the WSDL is find (and where it
 is looking for) when someone request it by a URI ending
 with ?wsdl.

   Does someone can explain me or redirect me to an appropriate
 source?  I did look into the manual but really I didn't find
 it.

   Thanks in advance.  Regards,

 --drkm























   
 _
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
 Mail

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




-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/


[Axis2] Enum

2007-08-29 Thread Leon Hwang

Can someone explain how I can return enum type object from Axis2 server?

I am using Axis2 1.3 / Tomcat 6.

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



RE: Axis Web service and .NET compact framework client

2007-08-29 Thread raghavan
Hi Jeff,
 
Thanks for the reply..
 
Rgds,
Raghavan.V.
 
-Original Message-
From: Walker, Jeff [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 28, 2007 6:40 PM
To: axis-user@ws.apache.org
Subject: RE: Axis Web service and .NET compact framework client
 
Raghavan,
web services in Axis2 are based on xml data transfer. Value objects are
nothing but beans in the Java world, and I'm sure .NET has an equivalent
class structure to accommodate this. The idea is to produce the wsdl
file and give that to .NET so that it can produce the required classes
for the client. (It used to use a program called wsdl.exe, but not sure
what it does these days). So, that reduces the interoperability issue to
making sure your wsdl file is perfect. Then you will have few issues
between Java and .NET.
-jeff
 
  _  

From: raghavan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 28, 2007 12:43 AM
To: axis-user@ws.apache.org
Subject: Axis Web service and .NET compact framework client
Importance: High
Hi,
 
I'm a newbie trying to create a web service using Apache Axis 2 version
1.3
I have created a web service which returns an OMElement.
Now what is the equivalent data type in .NET compact framework for
OMElement, so that I can parse the xml object?
 
Also, is it possible for me to return value objects from my web
service rather than a XML object? If so how is it done?
One thing to note is my client will be a .NET client.
Any help is appreciated.
 
Thanks in advance,
Raghavan.V.
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager. This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail. 
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager. This 
message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.


Re: Rampart and SAML question

2007-08-29 Thread Dimuthu
Hi,

You can do it as follows [1]
I got the code from this sample available here[2]

Cheers,
Dimuthu

[1]
Token tok = new Token(Token(tokenId, youTokenElem, 
 dateCreated, dateExpires));
TokenStorage store = TrustUtil.getTokenStore(ctx);
store.add(token);

//Store token
TokenStorage store = TrustUtil.getTokenStore(ctx);
store.add(responseToken);

//Service invocation
ServiceClient client = new ServiceClient(ctx, null);
client.engageModule(rampart);
client.engageModule(addressing);


client.getServiceContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY, 
servicePolicy);
Options options = client.getOptions();
options.setAction(urn:echoOMElement);
options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
options.setTo(new EndpointReference(service));
options.setProperty(RampartMessageData.KEY_CUSTOM_ISSUED_TOKEN, 
responseToken.getId());
OMElement respEelm = client.sendReceive(getPayload());
System.out.println(RESPONSE FROM SERVICE: \n + respEelm);

[2]http://wso2.org/repos/wso2/trunk/wsas/java/modules/samples/sts-sample/src/org/wso2/wsas/sample/sts/client/Client.java



On Wed, 2007-08-29 at 17:46 +0200, Massimiliano Masi wrote:
 Hi all,
 
 I have a SAML2 Authentication Assertion as OMElement, created by opensaml2.
 
 How can I include it in the SOAP Header using the rampart api?
 
 Is there a way to do it?
 
 
 Thank you in advance,
 
 
 Massimiliano
 
 
 This message was sent using IMP, the Internet Messaging Program.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
-- 
http://wso2.org


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



Re: Rampart 1.3 and Axis2 1.3

2007-08-29 Thread Dimuthu
Hi,

Please see my comments inline.


On Wed, 2007-08-29 at 14:06 -0700, Jon Hanshew wrote:
 Grettings,
 
 I have gotten all the Rampart 1.3 Policy samples (except for tomcat) to run
 with Axis2 1.3.  All the Basic samples run but do nothing interesting that I
 can see.  
 
 I am trying to get an Service and Client to run based on Policy sample01.  I
 think I have everything configured correctly, but I cannot get my own stuff
 to run with the rampart and addressing modules engaged.
 
 I suspect that the problem may stem from the difference between Axis2 style
 clients and Axis clients.  Here is a code sample.

Rampart is the security module for Axis2. If you want to provide
security for a client generated using Axis, then you have to use wss4j.

If you want to provide security for a client generated using Axis2, then
you have to use Rampart.


Regards,
Dimuthu

 ConfigurationContext ctx =
 ConfigurationContextFactory.createConfigurationContextFromFileSystem(C:/SecurityRepos,
 null);

 EmsServiceStub  stub =  new EmsServiceStub (ctx,
 http://localhost:8080/axis2/services/EmsService;);
 ServiceClient   client =stub._getServiceClient();
 Options options =   client.getOptions();

 options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, 
 loadPolicy(C:/SecurityPolicy/policy.xml));
 client.engageModule(addressing);
 client.engageModule(rampart);
 
 response = stub.GetEmsData(request);
 
 Note that this code does not use the service calling pattern shown in the
 Rampart samples.  The client and server work fine when the engage staments
 are commented out.  However it crashes with the following trace when I leave
 the engage statements in.
 
 org.apache.axis2.AxisFault: The server did not recognise the action which it
 received: 
 at
 org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke(AddressingInFaultHandler.java:114)
 at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
 at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
 at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
 at
 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:336)
 at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
 at
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
 at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
 at
 emsservice.client.EmsServiceStub.GetEmsData(EmsServiceStub.java:141)
 at emsservice.client.TestClient.main(TestClient.java:103)
 
 Additionally, the Soapmonitor shows no activity at all.
 
 Does anybody have a clue about what is going on?
 
 Thanks,
 
 Jon
 
-- 
http://wso2.org


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



Re: Simple question about MTOM, Rampart and optimize parts

2007-08-29 Thread Dimuthu
Hi,

On Wed, 2007-08-29 at 14:03 +0200, Jorge Fernandez wrote:
 Hi Dimuthu,
 
 WSCOMMONS-238 opened. 
 
 Please could you clarify a pair of things?
 
 Expected behaviour of Rampart is to add  or MTOM elements as MIME parts isn't 
 it?
Yes
 what exactly does Optimize parts? How does it optimize elements? does it 
 reduze its size? Is it applicable for any element, not only MTOM?
It tries to optimize the transmission of base64 encoded data according
to the MTOM spec. Therefore the size will be reduced.
When it comes to optimizeParts element in RampartConfig, Rampart will
try to MTOMize all the elements specified by XPath expressions.

Hope this helps.

Regards,
Dimuthu

 Thanks,
 
 Jorge Fernández
 
 Dimuthu [EMAIL PROTECTED] escribió: Hi,
 
 Please look at my comments in line.
 
 On Mon, 2007-08-27 at 17:49 +0200, Jorge Fernandez wrote:
  Hi all,
  
  I would like to know how does Rampart work with MTOM. I see that when
   using Rampart, MTOM elements are included as strings in the SOAP
   message instead of sending them outside the message as MIME parts,
   even if I don't do any operation with them (not signature, nor
   encryption), but these MIME parts appear empty in the HTTP message.
   Why is that?
 
 mmm .. looks like this is a bug in Axiom. We are looking at it.
 Please report a bug.
 
  Does optimize parts something about that? I don't understand much about 
  this parameter.
 
 Using this parameter, people can manually specify which element needs to
 be optimized. For example if you want to optimize CipherValue in
 EncryptedData then you can specify using this parameter. It is effective
 if you have specified  assertion in
 your policy. Syntax for the element is as follows[1]. So actually this
 is a workaround for the above problem.
 
 Hope this will help.
 
 Cheers,
 Dimuthu
 
 [1]
 
 
 //ns1:data1
 //ns2:data2
 
 
 
 
 
 
 
 
  If anybody could give me a hint about this, that would be great.
  
  Thanks,
  
  Jorge Fernández
  
  
  
 
  -
  
  Sé un Mejor Amante del Cine
  ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.
-- 
http://wso2.org


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