SOAP Headers in wsdl

2009-02-12 Thread rabelenda

Hi, I'm trying to make an authentication module that takes the username and
password from a soap header in the input messages. For this I have defined
de following schema in the wsdl: 

http://myapp.com";> 
 
 
 
 
 
 
 
 
 

the following message: 

 
 
 

where my is the prefix that I asigned to "http://myapp.com"; in wsdl
definitions. 

and I had added the following line to each of the  entries of
each of the operations defined in the binding "MyServiceSoap11Binding": 

 

and the following to each  entry of the operations defined in
the binding "MyServiceSoap12Binding": 

 

Then I generate all the code from the wsdl and all works fine except the
wsdl files when I want to see them from the available services axis2 page,
where the following code gets repited 2 times after each operation input
message definition: 

 
 
 

and also the following code appears duplicated after each  in the input bindings definition of MyServiceSoap11Binding
and MyServiceSoap12Binding 

 

Someone knows why this happens? What I'm doing wrong, if so? and how can I
manage to get the wsdl well displayed? or a better way to do what I'm trying
to do? thanks in advance. 
-- 
View this message in context: 
http://www.nabble.com/SOAP-Headers-in-wsdl-tp21982885p21982885.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Deploying axis2 in tomcat 6

2009-02-06 Thread rabelenda



rabelenda wrote:
> 
> 
> 
> iksrazal wrote:
>> 
>> On Fri, Feb 6, 2009 at 11:20 AM, rabelenda  wrote:
>>>
>>> [ERROR] java.lang.RuntimeException: java.io.FileNotFoundException:
>>> loading
>>> repository from classpath
>>> java.lang.RuntimeException: java.io.FileNotFoundException
>> 
>>> [INFO] Module validation failed: The system is attempting to engage a
>>> module
>>> that is not available: addressing
>>> [INFO] org.apache.axis2.deployment.DeploymentException: The system is
>>> attempting to engage a module that is not available: addressing
>>>
>> 
>> You seem to be missing the WEB-INF/modules dir and the mandatory
>> addressing.mar file.
>> 
>> - R
>> 
>> 
> 
> Nop, the module addressing-1.41.mar is there, and also inside the
> axis2.war file.
> 
> 

The problem rises when I set the server to don't unpack the .wars files.

-- 
View this message in context: 
http://www.nabble.com/Deploying-axis2-in-tomcat-6-tp21873295p21873584.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Deploying axis2 in tomcat 6

2009-02-06 Thread rabelenda



iksrazal wrote:
> 
> On Fri, Feb 6, 2009 at 11:20 AM, rabelenda  wrote:
>>
>> [ERROR] java.lang.RuntimeException: java.io.FileNotFoundException:
>> loading
>> repository from classpath
>> java.lang.RuntimeException: java.io.FileNotFoundException
> 
>> [INFO] Module validation failed: The system is attempting to engage a
>> module
>> that is not available: addressing
>> [INFO] org.apache.axis2.deployment.DeploymentException: The system is
>> attempting to engage a module that is not available: addressing
>>
> 
> You seem to be missing the WEB-INF/modules dir and the mandatory
> addressing.mar file.
> 
> - R
> 
> 

Nop, the module addressing-1.41.mar is there, and also inside the axis2.war
file.

-- 
View this message in context: 
http://www.nabble.com/Deploying-axis2-in-tomcat-6-tp21873295p21873571.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Deploying axis2 in tomcat 6

2009-02-06 Thread rabelenda



iksrazal wrote:
> 
> On Fri, Feb 6, 2009 at 11:20 AM, rabelenda  wrote:
>>
>> [ERROR] java.lang.RuntimeException: java.io.FileNotFoundException:
>> loading
>> repository from classpath
>> java.lang.RuntimeException: java.io.FileNotFoundException
> 
>> [INFO] Module validation failed: The system is attempting to engage a
>> module
>> that is not available: addressing
>> [INFO] org.apache.axis2.deployment.DeploymentException: The system is
>> attempting to engage a module that is not available: addressing
>>
> 
> You seem to be missing the WEB-INF/modules dir and the mandatory
> addressing.mar file.
> 
> - R
> 
> 

Nop, the module addressing-1.41.mar is there, and also inside the axis2.war
file.

-- 
View this message in context: 
http://www.nabble.com/Deploying-axis2-in-tomcat-6-tp21873295p21873482.html
Sent from the Axis - User mailing list archive at Nabble.com.



Deploying axis2 in tomcat 6

2009-02-06 Thread rabelenda

Hi I'm getting the following exception when trying to deploy a war file that
contains an application with axis2 web services, it contains all the
libraries needed and the axis2.war file inside. I have tested in my pc with
a downloaded tomcat 6 and it works smoothly, but when I try to deploy it in
an other tomcat 6 server, it gives  the following exception, any ideas of
what can be happening?

[WARN] Exception extracting jars into temporary directory :
java.io.FileNotFoundException : switching to alternate class loading
mechanism
[ERROR] java.lang.RuntimeException: java.io.FileNotFoundException: loading
repository from classpath
java.lang.RuntimeException: java.io.FileNotFoundException
at org.apache.axis2.deployment.util.Utils.findLibJars(Utils.java:870)
at 
org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:946)
at
org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(DeploymentEngine.java:234)
at
org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:238)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:516)
at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:436)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:829)
at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:718)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1215)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException
at
org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:298)
at java.net.URL.openStream(URL.java:1009)
at org.apache.axis2.deployment.util.Utils.findLibJars(Utils.java:852)
... 24 more
[INFO] Module validation failed: The system is attempting to engage a module
that is not available: addressing
[INFO] org.apache.axis2.deployment.DeploymentException: The system is
attempting to engage a module that is not available: addressing


-- 
View this message in context: 
http://www.nabble.com/Deploying-axis2-in-tomcat-6-tp21873295p21873295.html
Sent from the Axis - User mailing list archive at Nabble.com.



SOAP Header from Browser

2009-02-03 Thread rabelenda

Is there any way to make a request from a browser to a webservice and specify
in the GET or POST parameters values for attributes of soap headers? i.e.:
in the following format:
http://localhost:8080/app/services/MyService/myOp?headAttribute1=val1&headAttribute2=val2&myOpParam1=val3.
-- 
View this message in context: 
http://www.nabble.com/SOAP-Header-from-Browser-tp21813685p21813685.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Module Operation Parameters

2009-01-19 Thread rabelenda



Nunny wrote:
> 
> Hi,
>   what exactly do you want extract in the handler / how does client pass
> the
> parameters ?
> 
> thanks,
> nandana
> 
> On Tue, Jan 13, 2009 at 10:39 PM, rabelenda  wrote:
> 
>>
>> I want to get from a handler (in the inflow messages) of a module the
>> names
>> and values of the parameters passed by the client to the operation
>> request
>> of the web service. Does any body knows how to obtain them?
>> --
>> View this message in context:
>> http://www.nabble.com/Module-Operation-Parameters-tp21440073p21440073.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
> 
> 

I want to get the parameters of the message. Now I have managed to do so but
not in the way I would like to. I got from the messageContext the envelope,
frrom it the body, and from it the iterator of OMElements children of the
operation invoked, with this I iterate over the elements searching for the
parameters. I would like to do it in a better way but I don't know if it is
possible.

-- 
View this message in context: 
http://www.nabble.com/Module-Operation-Parameters-tp21440073p21549905.html
Sent from the Axis - User mailing list archive at Nabble.com.



ConfigurationContext

2009-01-15 Thread rabelenda

Hi, I have deployed axis, with spring and jsf. I want to create a custom page
for listing the available services using jsf. For this I need to retreive 
the list of services, a saw that this is posible if I could find a way to
create an ConfigurationContext, but for this I need an instance of
ServletConfig. Does anyone knows how to get the servletConfig instance from
a facesContext, or some other way to retreive de list of available services
in an aplication? I hope someone could hel me.
-- 
View this message in context: 
http://www.nabble.com/ConfigurationContext-tp21484808p21484808.html
Sent from the Axis - User mailing list archive at Nabble.com.



Module Operation Parameters

2009-01-13 Thread rabelenda

I want to get from a handler (in the inflow messages) of a module the names
and values of the parameters passed by the client to the operation request
of the web service. Does any body knows how to obtain them?
-- 
View this message in context: 
http://www.nabble.com/Module-Operation-Parameters-tp21440073p21440073.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: InFlow module response

2009-01-07 Thread rabelenda



Nunny wrote:
> 
> On 1/7/09, rabelenda  wrote:
>>
>> Hi, I', trying to make an axis2 module to check, when a message comes to
>> a
>> service, if the user has access rights to the operation. For this I need
>> in
>> the handler to make a response to the client when the user hasn't got
>> permission.
> 
> If you attach your handler to phase after the dispatching phase, you
> will be able to get the service name and the operation name. How do
> find who the user is ? Transport headers ? or custom header with
> username ? If you the user information also you can do the necessary
> check.
> 
I use rampart and spring, putting the user obtained from the rampart handler
and putting it into a spring bean.

Nunny wrote:
> 
> How can I manage to create a response to the client in the
>> InFlow handler of the service? Any ideas will be appreciated.
> 
> Can't you just return a fault by throwing an AxisFault ?
> 
The problem that I'm having with this approach (throwing an AxisFault) is
that when I throw an AxisFault (ie: throw new AxisFaut("The user hasn't got
permission");) then the rampart client throws an exception
"org.apache.rampart.RampartException: SOAP header missing", I think that it
is because the AxisFault thrown by me isn't catched by the rampart module,
so I was thinking in reply with some type of message. Any ideas?
-- 
View this message in context: 
http://www.nabble.com/InFlow-module-response-tp21332168p21335193.html
Sent from the Axis - User mailing list archive at Nabble.com.



InFlow module response

2009-01-07 Thread rabelenda

Hi, I', trying to make an axis2 module to check, when a message comes to a
service, if the user has access rights to the operation. For this I need in
the handler to make a response to the client when the user hasn't got
permission. How can I manage to create a response to the client in the
InFlow handler of the service? Any ideas will be appreciated.
-- 
View this message in context: 
http://www.nabble.com/InFlow-module-response-tp21332168p21332168.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: SERVICE_ONJECT_SUPPLIER not specified

2009-01-05 Thread rabelenda

Ready, I didn't kow that that was an expected behaivour. Now I run the client
and all works, thanks to all. Solution: change serviceObjectSupplier to
ServiceObjectSupplier. The null message was beacause I had forgotten that I
had deleted the service folder in the webapplication :-). Thanks to all ;-).

-- 
View this message in context: 
http://www.nabble.com/SERVICE_ONJECT_SUPPLIER-not-specified-tp21255767p21296527.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: SERVICE_ONJECT_SUPPLIER not specified

2009-01-05 Thread rabelenda


iksrazal wrote:
> 
> On Fri, Jan 2, 2009 at 5:26 PM, rabelenda  wrote:
>>>> [CODE]org.apache.axis2.AxisFault: The SERVICE_OBJECT_SUPPLIER parameter
>>>> is
>>>> not specified.
>>>
>>> You most likely have a bean name / service class mismatch. I'd look
>>> for typos. Here's the problem code from
>>> modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
>>
>> I have search for any mistake and I didn't find anything. I tested
>> chenging
>> the SpringBeanName parameter in the services.xml file to an invalid one
>> and
>> the application gives me the same error. But if a put it in the correct
>> way,
>> it still gives me the error. I think that the problem isn't a mapping
>> between bean and service because if a put an invalid class name on the
>> bean
>> the server (tomcat) gives me an error when deploying saying that the
>> class
>> doesn't exists. I don't kow if is this what you were thinking that could
>> be
>> wrong, thanks for the fast reply :-).
>>
> 
> Perhaps its actually not finding the ServiceObjectSupplier . Make sure
> the name is correct there. Put axis2 / spring in debug and make sure
> that spring is loading correctly. You'll see warnings in the logs if
> axis2 can't find a bean name, ie, spring isn't getting loaded, before
> the exception.
> 
> HTH,
> Robert
> 
> 

I have changed serviceObjectSupplier with ServiceObjectSupplier in the
services.xml file and I get a different error. When loading tomcat I get 
[INFO] org.apache.axis2.deployment.DeploymentException: The following error
occu
> rred during schema generation: null. I have tested setting all logging
> properties of tomcat to ALL and I don't get any more explanation, any
> ideas? In the services.xml file, I must put serviceObjectSupplier or
> ServiceObjectSupplier ?

-- 
View this message in context: 
http://www.nabble.com/SERVICE_ONJECT_SUPPLIER-not-specified-tp21255767p21292204.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: SERVICE_ONJECT_SUPPLIER not specified

2009-01-05 Thread rabelenda



Amila Suriarachchi wrote:
> 
> have a look at here[1]. you need to specify a object supplier at the
> services.xml
> 
> thanks,
> Amila.
> 
> 
> [1] http://ws.apache.org/axis2/1_4_1/spring.html
> 
> On Sat, Jan 3, 2009 at 2:11 AM, robert lazarski
> wrote:
> 
>> On Fri, Jan 2, 2009 at 5:26 PM, rabelenda  wrote:
>> >>> [CODE]org.apache.axis2.AxisFault: The SERVICE_OBJECT_SUPPLIER
>> parameter
>> >>> is
>> >>> not specified.
>> >>
>> >> You most likely have a bean name / service class mismatch. I'd look
>> >> for typos. Here's the problem code from
>> >>
>> modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
>> >
>> > I have search for any mistake and I didn't find anything. I tested
>> chenging
>> > the SpringBeanName parameter in the services.xml file to an invalid one
>> and
>> > the application gives me the same error. But if a put it in the correct
>> way,
>> > it still gives me the error. I think that the problem isn't a mapping
>> > between bean and service because if a put an invalid class name on the
>> bean
>> > the server (tomcat) gives me an error when deploying saying that the
>> class
>> > doesn't exists. I don't kow if is this what you were thinking that
>> could
>> be
>> > wrong, thanks for the fast reply :-).
>> >
>>
>> Perhaps its actually not finding the ServiceObjectSupplier . Make sure
>> the name is correct there. Put axis2 / spring in debug and make sure
>> that spring is loading correctly. You'll see warnings in the logs if
>> axis2 can't find a bean name, ie, spring isn't getting loaded, before
>> the exception.
>>
>> HTH,
>> Robert
>>
> 
> I have tested changing serviceObjetSupplier with ServiceObjectSupplier in
> the services.xml file and I get a different error message. When I start
> tomcat I get "[INFO] org.apache.axis2.deployment.DeploymentException: The
> following error occu
> rred during schema generation: null" but nothing else information about
> this error. In services.xml I have tu put serviceObjetSupplier or
> ServiceObjectSupplier? how can I manage to get more verbose from the
> output of tomcat (I have put all logging properties to FINE)?
> 
> -- 
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SERVICE_ONJECT_SUPPLIER-not-specified-tp21255767p21290205.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: SERVICE_ONJECT_SUPPLIER not specified

2009-01-02 Thread rabelenda



iksrazal wrote:
> 
> On Fri, Jan 2, 2009 at 4:13 PM, rabelenda  wrote:
>>
>> Hi, I have developed a webService using axis2 and spring. When I request
>> de
>> wsdl file of the webservice I get the right wsdl file, but when I want to
>> use a defined operation of the webservice (using a java client or a
>> browser)
>> I get the following exception:
>>
>> [CODE]org.apache.axis2.AxisFault: The SERVICE_OBJECT_SUPPLIER parameter
>> is
>> not specified.
> 
> You most likely have a bean name / service class mismatch. I'd look
> for typos. Here's the problem code from
> modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
> :
> 
> Parameter implInfoParam =
> service.getParameter(Constants.SERVICE_CLASS);
> if (implInfoParam != null) {
> final Class implClass = Loader.loadClass(
> classLoader,
> ((String) implInfoParam.getValue()).trim());
> return
> org.apache.axis2.java.security.AccessController.doPrivileged(
> new PrivilegedExceptionAction() {
> public Object run() throws
> InstantiationException, IllegalAccessException {
> return implClass.newInstance();
> }
> }
> );
> } else {
> throw new AxisFault(
> Messages.getMessage("paramIsNotSpecified",
> "SERVICE_OBJECT_SUPPLIER"));
> }
> 
> HTH,
> Robert
> 
> 

I have search for any mistake and I didn't find anything. I tested chenging
the SpringBeanName parameter in the services.xml file to an invalid one and
the application gives me the same error. But if a put it in the correct way,
it still gives me the error. I think that the problem isn't a mapping
between bean and service because if a put an invalid class name on the bean
the server (tomcat) gives me an error when deploying saying that the class
doesn't exists. I don't kow if is this what you were thinking that could be
wrong, thanks for the fast reply :-).

-- 
View this message in context: 
http://www.nabble.com/SERVICE_ONJECT_SUPPLIER-not-specified-tp21255767p21257431.html
Sent from the Axis - User mailing list archive at Nabble.com.



SERVICE_ONJECT_SUPPLIER not specified

2009-01-02 Thread rabelenda

Hi, I have developed a webService using axis2 and spring. When I request de
wsdl file of the webservice I get the right wsdl file, but when I want to
use a defined operation of the webservice (using a java client or a browser)
I get the following exception:

[CODE]org.apache.axis2.AxisFault: The SERVICE_OBJECT_SUPPLIER parameter is
not specified.
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at springma.webservice.MyWSStub.myOp(MyWSStub.java:1077)
at springma.test.webservice.MyWSTests.main(MyWSTests.java:24)
[/CODE]

In the client the line pointed contains the call to the operation, and in
the stub is [CODE]_operationClient.execute(true);[/CODE]
Anybody knows what it could be? Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/SERVICE_ONJECT_SUPPLIER-not-specified-tp21255767p21255767.html
Sent from the Axis - User mailing list archive at Nabble.com.