WSSecurity using Rampart and EmbeddedKey

2008-01-18 Thread Jose Luis Alba
Hi All,

It's possible to encrypt a message using an embedded key (for symmetric 
encryption) and send that key using the transport key encryption? 

I have tried to do it with Rampart configuration using 
encryptionKeyIdentifierEmbeddedKeyName/encryptionKeyIdentifier but the key 
is not sent.

Send and embedded key goes against specification?

Thanks all,

Jose Luis


   
-

Web Revelación Yahoo! 2007:
 Premio Favorita del Público - ¡Vota tu preferida!

Axis2 and Rampart policy alternatives

2007-09-12 Thread Jose Luis Alba
Hi all,

I've read the WS-Policy specification and up to where I have dealt a Policy 
specifies a set of (logically exclusive) alternatives. Then any alternative is 
good enough to validate a web service authentication using a policy.

According to that:

1. Does Rampart support different alternatives in the policy file?
2. In case of (1) is affirmative, what algorithm uses to decide the alternative 
to use?

I've done a number of tests with policy files and rampart and it seems that 
every alternative has to use the rampart configuration tags so as to be 
successful

3. Am I in the correct thing?

Thanks all,

Jose

   
-

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


[Axis2] Problem using SOAP12 vs SOAP11?

2007-07-27 Thread Jose Luis Alba
Hi, 

Recently I've been working on a test web service in Axis2 (1.3-RC1). That 
service launchs checked exceptions but the behavior is different if I use 
SOAP11 or SOAP12 from the client.

When I use SOAP12 all responses from my exceptions are and AxisFault with error 
400: Bad request. (That's done in MessageContextBuilder - createFaultEnvelope 
- getSenderFaultCode)

When I use SOAP11 from the client I receive and AxisFault but this time with an 
status error 500 and with the message of my exception. That's is what I 
excepted!

Why this behavior?
There's a bug in the SOAP12?
I'm missing something?

Thanks,

Jose

   
-

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


Re: [Axis2] Problem using SOAP12 vs SOAP11?

2007-07-27 Thread Jose Luis Alba
Hi Keith,

The problem isn't the status code. The problem is that using SOAP11 I receive 
Exceptions that web service launches. But using SOAP12 always I receive an 
AxisFault with message 400: Bad Request, not the Exception I launched.

Is for that I was talking about a bug.

Any ideas? Thanks in advance,

Jose



keith chapman [EMAIL PROTECTED] escribió: Here are the details. 
http://www.w3.org/TR/soap12-part2/#http-respbindprocess

Thanks,
Keith.

On 7/27/07,  keith chapman [EMAIL PROTECTED] wrote: Ho Jose,

This is not a bug. The SOAP 1.2 specification mentions that we should send HTTP 
code 400 in a fault if the fault code is soap:Sender. This is the reason for 
getting 400 when using SOAP 1.2 and 500 when using SOAP  1.1.

Thanks,
Keith.

On 7/27/07, Jose Luis Alba  [EMAIL PROTECTED] wrote: Hi, 

Recently I've been working on a test web service in Axis2 (1.3-RC1). That 
service launchs checked exceptions but the behavior is different if I use 
SOAP11 or SOAP12 from the client.

When I use SOAP12 all responses from my exceptions are and AxisFault with error 
400: Bad request. (That's done in MessageContextBuilder - createFaultEnvelope 
- getSenderFaultCode) 

When I use SOAP11 from the client I receive and AxisFault but this time with an 
status error 500 and with the message of my exception. That's is what I 
excepted!

Why this behavior?
There's a bug in the SOAP12? 
I'm missing something?

Thanks,

Jose
  

-

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






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



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

   
-

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


Axis2 send xsi types

2007-07-26 Thread Jose Luis Alba
Hi all,

How I can send schema xsi types from Axis2 so as to do polymorphism on the 
client?

Thanks in advance,

Jose

   
-

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


Re: Axis2 send xsi types

2007-07-26 Thread Jose Luis Alba
HI Amila,

I'm using ADB clients and I've seen in the generated stub that he searches for 
the xsi schema.

The problem is the response that sends the Axis server. How I do for send the 
xsi types?

Thanks,

Jose

Amila Suriarachchi [EMAIL PROTECTED] escribió: if you use ADB data binding at 
the client it should support this feature.

when sending the request it sets the xsi:type correctly and parse it 
accordingly.

Amila.

On 7/26/07,  Jose Luis Alba [EMAIL PROTECTED] wrote: Hi Deepal,

I'm using POJO web services. All the in-out messages are managed by Axis 
engine, then I don't wrote the response messages.

Is there any configuration parameter or I've to do something different so as to 
Axis sends the xsi types? 

Thanks

Jose

Deepal Jayasinghe [EMAIL PROTECTED] escribió:  Hi Jose,
You can send them as below;


   10
   
  
xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true /
  
xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true /
   

 
  Hi all,

 How I can send schema xsi types from Axis2 so as to do polymorphism on
 the client?

 Thanks in advance,

 Jose

  

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

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


  

-

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





-- 
Amila Suriarachchi,
WSO2 Inc. 

   
-

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


Re: Axis2 send xsi types

2007-07-26 Thread Jose Luis Alba
Hi Deepal,

I'm using POJO web services. All the in-out messages are managed by Axis 
engine, then I don't wrote the response messages.

Is there any configuration parameter or I've to do something different so as to 
Axis sends the xsi types?

Thanks

Jose

Deepal Jayasinghe [EMAIL PROTECTED] escribió: Hi Jose,
You can send them as below;


   10
   
  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true /
  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:nil=true /
   

 
 Hi all,

 How I can send schema xsi types from Axis2 so as to do polymorphism on
 the client?

 Thanks in advance,

 Jose

 

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

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



   
-

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


wsdl2java invalid wsdl generating exceptions

2007-07-25 Thread Jose Luis Alba
Hi all,

- Axis2 1.2+

What's the better way of throw exceptions in the server side of an Axis2 web 
service?

- Using checked exceptions and declaring them in the wsdl?
- Using runtime exceptions?
- Other?

I've tried to launch checked exceptions on the server side. But the wsdl that 
generates wsdl2java is invalid and not capable of generate the client stubs.

Any ideas will be welkome!

Thanks in advance,

Jose Luis

   
-

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


Re: wsdl2java invalid wsdl generating exceptions

2007-07-25 Thread Jose Luis Alba
Hi Amila,

Thanks for you reply. At this time I've tried with an Axis2 1.3-RC1 and the 
wsdl is now correct and generates the Exceptions I was expecting. The chosen 
way is to generate web services from POJOs.

Jose Luis




Amila Suriarachchi [EMAIL PROTECTED] escribió: if you start with the wsdl 
(i.e. contract first) declaring the fault messages in the wsdl is the correct 
way. If you start with the POJO using checked exceptions in the method 
signature is the correct way.

what is the method you are going to use? using wsdl or POJO? 

can you attach your POJO or wsdl so that we can help you further

Amila.

On 7/25/07, Jose Luis Alba  [EMAIL PROTECTED] wrote:Hi all,

- Axis2 1.2+

What's the better way of throw exceptions in the server side of an Axis2 web 
service? 

- Using checked exceptions and declaring them in the wsdl?
- Using runtime exceptions?
- Other?

I've tried to launch checked exceptions on the server side. But the wsdl that 
generates wsdl2java is invalid and not capable of generate the client stubs. 

Any ideas will be welkome!

Thanks in advance,

Jose Luis
  

-

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





-- 
Amila Suriarachchi,
WSO2 Inc. 

   
-

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


Exception hierachy generation in Axis2

2007-07-25 Thread Jose Luis Alba
Hi,

It's possible to create a server side hierarchy of exceptions and throw the 
base exception while in the client catch any of the exceptions?

In Axis1 I was doing that generating 'extra classes' (while in java2wsdl phase) 
for all the other exceptions that were not launched directly at the interface.

I see that Axis2 works different and the wsdl contains the types for the 
exceptions (using java2wsdl and -xc option) but the client code generated is 
not as I expected.

Someone knows how I can do that?

Thanks!

Jose Luis

   
-

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


Re: Unexpected subelement error using useOriginalWsdl in Axis2: Solution

2007-07-20 Thread Jose Luis Alba
HI all,

I've found a solution. When one uses useOriginalWsdl the package to namespace 
mappings are read from the services.xml file (see ServiceBuilder.java method 
processTypeMappings). The problem is when classes are out of the target 
namespace. All we have to do is to write the mappings in the services.xml file.

In my case there are:

packageMapping
mapping packageName=dev.axis2.ws.data 
qName=http://data.ws.axis2.dev/xsd/
/packageMapping

Salutations,

Jose


Jorge Fernandez [EMAIL PROTECTED] escribió: Hola Jose,

I usually have those problems when using rampart but only with classes that 
extend from others.

Regards,

Jorge Fernández


Jose Luis Alba [EMAIL PROTECTED] escribió: Hi Mike,

The InputData and OutputData are simple JavaBean classes as:

package dev.axis2.ws.data;

public class InputData {
private String data;

public String getData() {
return data;
}

public void setData(String data) {
this.data = data;
}
}

Recently I've tried with the last snapshot and with the Axis2 1.3 RC1 that 
Deepal proposed to me.

Now the SOAP response has changed  to:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse xmlns:ns=http://service.ws.axis2.dev;
  ns:return type=dev.axis2.ws.data.OutputData
ns:datadatos  de entrada/ns:data
  /ns:return
/ns:testDataResponse
  /soapenv:Body
/soapenv:Envelope

The solution is near but not sufficient. The return element that encloses the 
data element now has a type attribute but the client continues to launch an 
unexpected subelement exception due to incorrect namespace for data.

- I generated the clients in ADB mode.

Any more ideas? I will continue investigating..

Thanks all

Jose

Mike Patton [EMAIL PROTECTED]  escribió: Jose,
   
  Does your OutputData class extend a java collection object or similar data 
type? If so, then this is why you are getting such an error. You should return 
a single element; even if you have an array or so to  return, wrap that in a 
property of another class and return that other type instead.
  Hope that helps.
   
  Mike
   
   
   
   
   
   
  

Jose Luis Alba [EMAIL PROTECTED] wrote:
  Hi,

-  I'm using Axis2 1.2

I've create a POJO  test web service that resides in package 
dev.axis2.ws.service and uses in/out bean data from package dev.axis2.ws.data. 

The  interface is:

package dev.axis2.ws.service;

import dev.axis2.ws.data.InputData;
import dev.axis2.ws.data.OutputData;

public interface TestService {
public OutputData testData(InputData input);
}

1) When I use automatic wsdl generation from Axis (in the services.xml file) 
all goes well. Here is the SOAP response of the execution:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse  xmlns:ns=http://service.ws.axis2.dev/xsd;
  ns:return
data  xmlns=http://data.ws.axis2.dev/xsd;datos de entrada/data
  /ns:return
  /ns:testDataResponse
   /soapenv:Body
/soapenv:Envelope

2) Things goes wrong when I use the parameter useOriginalWsdl in the 
services.xml file. Here the services.xml file:

service name=TestService
  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  locked=false 
name=ServiceClassdev.axis2.ws.service.TestServiceImpl/parameter
  parameter locked=false name=useOriginalwsdltrue/parameter
  parameter locked=false  name=modifyUserWSDLPortAddresstrue/parameter
/service

The SOAP response I receive in the client side is:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse xmlns:ns=http://service.ws.axis2.dev/xsd;
  ns:return
ns:datadatos de entrada/ns:data
   /ns:return
/ns:testDataResponse
  /soapenv:Body
/soapenv:Envelope

In this case the namespace for the data element (it should map to 
http://data.ws.axis2.dev/xsd)  is missing and the client throws and Unexpected 
subelement exception.

I have tried:

- Axis2 1.2
- Axis2 1.1.1
- Axis2 last snapshot
- Using the wsdl  generated automatically
- Using the wsld generated by axis2 tools (ant task and by command line)

In all cases the behavior is the same: Unexpeted subelement and the missing 
namespace in the response message.

Could you help me please? Thanks in advance!

Jose Luis



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




-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.  
  

-

Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras

Re: Unexpected subelement error using useOriginalWsdl in Axis2

2007-07-19 Thread Jose Luis Alba
Hi Mike,

The InputData and OutputData are simple JavaBean classes as:

package dev.axis2.ws.data;

public class InputData {
private String data;

public String getData() {
return data;
}

public void setData(String data) {
this.data = data;
}
}

Recently I've tried with the last snapshot and with the Axis2 1.3 RC1 that 
Deepal proposed to me.

Now the SOAP response has changed to:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse xmlns:ns=http://service.ws.axis2.dev;
  ns:return type=dev.axis2.ws.data.OutputData
ns:datadatos de entrada/ns:data
  /ns:return
/ns:testDataResponse
  /soapenv:Body
/soapenv:Envelope

The solution is near but not sufficient. The return element that encloses the 
data element now has a type attribute but the client continues to launch an 
unexpected subelement exception due to incorrect namespace for data.

- I generated the clients in ADB mode.

Any more ideas? I will continue investigating..

Thanks all

Jose

Mike Patton [EMAIL PROTECTED] escribió: Jose,
   
  Does your OutputData class extend a java collection object or similar data 
type? If so, then this is why you are getting such an error. You should return 
a single element; even if you have an array or so to return, wrap that in a 
property of another class and return that other type instead.
  Hope that helps.
   
  Mike
   
   
   
   
   
   
  

Jose Luis Alba [EMAIL PROTECTED] wrote:
  Hi,

- I'm using Axis2 1.2

I've create a POJO  test web service that resides in package 
dev.axis2.ws.service and uses in/out bean data from package dev.axis2.ws.data. 

The interface is:

package dev.axis2.ws.service;

import dev.axis2.ws.data.InputData;
import dev.axis2.ws.data.OutputData;

public interface TestService {
public OutputData testData(InputData input);
}

1) When I use automatic wsdl generation from Axis (in the services.xml file) 
all goes well. Here is the SOAP response of the execution:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse xmlns:ns=http://service.ws.axis2.dev/xsd;
  ns:return
data  xmlns=http://data.ws.axis2.dev/xsd;datos de entrada/data
  /ns:return
  /ns:testDataResponse
  /soapenv:Body
/soapenv:Envelope

2) Things goes wrong when I use the parameter useOriginalWsdl in the 
services.xml file. Here the services.xml file:

service name=TestService
  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  locked=false 
name=ServiceClassdev.axis2.ws.service.TestServiceImpl/parameter
  parameter locked=false name=useOriginalwsdltrue/parameter
  parameter locked=false name=modifyUserWSDLPortAddresstrue/parameter
/service

The SOAP response I receive in the client side is:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse xmlns:ns=http://service.ws.axis2.dev/xsd;
  ns:return
ns:datadatos de entrada/ns:data
  /ns:return
/ns:testDataResponse
  /soapenv:Body
/soapenv:Envelope

In this case the namespace for the data element (it should map to 
http://data.ws.axis2.dev/xsd)  is missing and the client throws and Unexpected 
subelement exception.

I have tried:

- Axis2 1.2
- Axis2 1.1.1
- Axis2 last snapshot
- Using the wsdl generated automatically
- Using the wsld generated by axis2 tools (ant task and by command line)

In all cases the behavior is the same: Unexpeted subelement and the missing 
namespace in the response message.

Could you help me please? Thanks in advance!

Jose Luis



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




-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.  

   
-

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


Unexpected subelement error using useOriginalWsdl in Axis2

2007-07-18 Thread Jose Luis Alba
Hi,

- I'm using Axis2 1.2

I've create a POJO test web service that resides in package 
dev.axis2.ws.service and uses in/out bean data from package dev.axis2.ws.data. 

The interface is:

package dev.axis2.ws.service;

import dev.axis2.ws.data.InputData;
import dev.axis2.ws.data.OutputData;

public interface TestService {
public OutputData testData(InputData input);
}

1) When I use automatic wsdl generation from Axis (in the services.xml file) 
all goes well. Here is the SOAP response of the execution:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse xmlns:ns=http://service.ws.axis2.dev/xsd;
  ns:return
data xmlns=http://data.ws.axis2.dev/xsd;datos de entrada/data
  /ns:return
  /ns:testDataResponse
  /soapenv:Body
/soapenv:Envelope

2) Things goes wrong when I use the parameter useOriginalWsdl in the 
services.xml file. Here the services.xml file:

service name=TestService
  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 locked=false 
name=ServiceClassdev.axis2.ws.service.TestServiceImpl/parameter
  parameter locked=false name=useOriginalwsdltrue/parameter
  parameter locked=false name=modifyUserWSDLPortAddresstrue/parameter
/service

The SOAP response I receive in the client side is:

soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
  soapenv:Body
ns:testDataResponse xmlns:ns=http://service.ws.axis2.dev/xsd;
  ns:return
ns:datadatos de entrada/ns:data
  /ns:return
/ns:testDataResponse
  /soapenv:Body
/soapenv:Envelope

In this case the namespace for the data element (it should map to 
http://data.ws.axis2.dev/xsd)  is missing and the client throws and Unexpected 
subelement exception.

I have tried:

- Axis2 1.2
- Axis2 1.1.1
- Axis2 last snapshot
- Using the wsdl generated automatically
- Using the wsld generated by axis2 tools (ant task and by command line)

In all cases the behavior is the same: Unexpeted subelement and the missing 
namespace in the response message.

Could you help me please? Thanks in advance!

Jose Luis



   
-

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