Axis2 & Rampart1.4, Encounter org.apache.axis2.AxisFault: Error in extracting message properties

2010-02-18 Thread aldray

Hi, 

I am currently having some issue with Rampart on Axis2. I am trying to
configure the Rampart for only 1 way request security header, this means
that the response back from the Server to the Client does not contain the
SOAP security header.

What i did is instead of having both InflowSecurity and OutflowSecurity at
the Server and Client, i did this
Client - remain OutflowSecurity, remove InflowSecurity.
Server - remain InflowSecurity, remove OutflowSecurity.

This is the error that i encountered. Anyone knows how to resolve this?

= ERROR ENCOUNTERED ==

org.apache.axis2.AxisFault: Error in extracting message properties

at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)

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

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

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

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

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

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

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

at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at
com.ncs.iframe.struts.filter.LocaleFilter.doFilter(LocaleFilter.java:98)

at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)

at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:730)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Caused by: org.apache.rampart.RampartException: Error in extracting message
properties

at
org.apache.rampart.RampartMessageData.(RampartMessageData.java:322)

at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)

at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)

... 30 more

Caused by: org.apache.ws.security.WSSecurityException: Error in converting
SOAP Envelope to Document; nested exception is:

java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl

at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:161)

at
org.apache.rampart.RampartMessageData.(RampartMessageData.java:158)

... 32 more

Caused by: java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl

at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:111)

... 33 more


-- 
View this message in context: 
http://old.nabble.com/Axis2---Rampart1.4%2C-Encounter-org.apache.axis2.AxisFault%3A-Error-in-extracting-message-properties-tp27649884p27649884.html
Sent from the Axis - User mailing list archive at Nabble.com.



Axis2 & Rampart1.4, Encounter org.apache.axis2.AxisFault: Error in extracting message properties

2010-02-18 Thread aldray

Hi, 

I am currently having some issue with Rampart on Axis2. I am trying to
configure the Rampart for only 1 way request security header, this means
that the response back from the Server to the Client does not contain the
SOAP security header.

What i did is instead of having both InflowSecurity and OutflowSecurity at
the Server and Client, i did this
Client - remain OutflowSecurity, remove InflowSecurity.
Server - remain InflowSecurity, remove OutflowSecurity.

This is the error that i encountered. Anyone knows how to resolve this?

= ERROR ENCOUNTERED ==

org.apache.axis2.AxisFault: Error in extracting message properties

at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)

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

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

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

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

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

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

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

at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at
com.ncs.iframe.struts.filter.LocaleFilter.doFilter(LocaleFilter.java:98)

at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)

at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404)

at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:730)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Caused by: org.apache.rampart.RampartException: Error in extracting message
properties

at
org.apache.rampart.RampartMessageData.(RampartMessageData.java:322)

at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)

at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)

... 30 more

Caused by: org.apache.ws.security.WSSecurityException: Error in converting
SOAP Envelope to Document; nested exception is:

java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl

at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:161)

at
org.apache.rampart.RampartMessageData.(RampartMessageData.java:158)

... 32 more

Caused by: java.lang.ClassCastException:
org.apache.axiom.om.impl.llom.OMElementImpl

at
org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:111)

... 33 more


-- 
View this message in context: 
http://old.nabble.com/Axis2---Rampart1.4%2C-Encounter-org.apache.axis2.AxisFault%3A-Error-in-extracting-message-properties-tp27649883p27649883.html
Sent from the Axis - User mailing list archive at Nabble.com.



How to tailor our generated client XML

2010-02-18 Thread Damian Carey
Hello,

We have created client software using ADB and a WSDL & XSD files
supplied by a third party who controls the Web Service.  We have no
control over the Web Service at all, and we are not yet able to test
against it.

We do have some sample XML as to what is expected. In checking our
generated XML against the samples we noticed differences in the first
two lines as follows.

 OUR GENERATED first two lines  ...



--- 3rd PARTY EXAMPLES first two lines 

http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="XYZ_Quote.xsd">

Can anyone advise how to
(1) remove the "standalone="yes"" from our generated xml
(2) add the  "xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="XYZ_Quote.xsd"" to our generated xml.

Any pointers, advice, suggestions would be greatly appreciated.

Many thanks,
-Damian


AW: how to add interceptor for axis2 client

2010-02-18 Thread Stadelmann Josef
0. intercepting ... just looking at it or doing something clever by a 
program-code?

Just Looking at it - you can use TcpMonitor to see your soap/xml code 
traveling to the server (TcpMonitor is an interceptor too)

Just Looking at it - you can use the soap-monitoring module (did never 
use it so far)

Doing-something-clever-at-interception-point - you have to write your 
own code and develop an interceptor-modul.mar

1. In this case best look at the architecture of Axis2 first, 

2. look at the component model of AXIS2 , 
in particular look about phases and global gains 
using http://integ1:8080/axis2-1_2/axis2-admin/listPhases 
and http://integ1:8080/axis2-1_2/axis2-admin/viewGlobalHandlers
study about what modules and when they are becoming engaged at various 
points in time when a request travels to the server 
and a response comes back.

3. and then take the Example Module Sample and do a trial until it deploys and 
gets engaged and invoked properly it is a bit of work but once you done
you have a perfect idea about what Axis2 can do for you. 

So in short : You can write, build, deploy, then-engage a client side 
interceptor-module.mar and do what you want at interception-point-and-time.
In example: ws-addressing to work needs the addressing.mar engaged at each 
side, client and server.

And writing an interceptor for a MS WCF-Client and a MS WCF-Service, I can help 
as well.


Josef.Stadelmann
@Axa-winterthur.ch 


-Ursprüngliche Nachricht-
Von: and) [mailto:andromedagal...@yandex.ru] 
Gesendet: Donnerstag, 18. Februar 2010 18:34
An: axis-user@ws.apache.org
Betreff: how to add interceptor for axis2 client


hi all

I need to add interseptor in client code, which will be triggered before
sending (pos/get)requests on server, it is possible in axis2?
-- 
View this message in context: 
http://old.nabble.com/how-to-add-interceptor-for-axis2-client-tp27642627p27642627.html
Sent from the Axis - User mailing list archive at Nabble.com.



how to add interceptor for axis2 client

2010-02-18 Thread and)

hi all

I need to add interseptor in client code, which will be triggered before
sending (pos/get)requests on server, it is possible in axis2?
-- 
View this message in context: 
http://old.nabble.com/how-to-add-interceptor-for-axis2-client-tp27642627p27642627.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Can't get Axis handlers to work

2010-02-18 Thread Joe Ammann
On Thursday 18 February 2010 16:15:03 Joe Ammann wrote:
> And - my problem - the handler.invoke() is never called.
> 
> Any hints what I'm doing wrong?

Ok, https://issues.apache.org/jira/browse/AXIS2-3588 was extremly helpful :-)

Of course, I also got the XML tags case wrong :-/ Now it works

-- 
CU, Joe


Can't get Axis handlers to work

2010-02-18 Thread Joe Ammann
Hi list

I'm about to write my first module with Axis2 1.5. Here's what I did until now 
to my existing service:

- write 2 classes SimpleModule (implements org.apache.axis2.modules.Module) 
and Simple handler (extends AbstractHandler implements Handler)

- write module.xml and put it together with the 2 classes into a .mar file
 
  





  

- extend my services.xml with

  

- put the extend .aar file and the new .mar file into services/ resp. modules/ 
directory

I can see in the logs that my module is somehow picked up:

2010-02-18 15:57:30,380 INFO  org.apache.axis2.deployment.ModuleDeployer  - 
Deploying module: ExampleModule - file:./modules/ExampleModule.mar

I have DEBUG on an following this message above, I have nothing else that 
would indicate that the handler is installed somehow.

And - my problem - the handler.invoke() is never called.

Any hints what I'm doing wrong?

-- 
CU, Joe


Link to Rampart Module

2010-02-18 Thread Lorenzo Carnevale
Why does http://ws.apache.org/axis2/ does still link (via "modules" section)  
to http://ws.apache.org/axis2/modules/rampart/1_3/security-module.html instead 
of http://ws.apache.org/rampart/ ?
Is this intended? 
 

Axis2 1.5.1, JAX-WS and Rampart: client and endpoint configuration

2010-02-18 Thread Victor Rentea
Hy everyone!

I built a working (?) solution and I want your opinion if this is a
safe approach, and if its semantically consistent with Axis2
internals.
I would really appreciate if you could give me a hand because my
knowledge of Axis internals is very limited.
Many will be interested in this subject especially because the
examples on the net are missing, and I didn’t managed to find anything
useful on this topic.

My requirements are:
Build J2ee web apps that expose secure web services with the latest
stable technology.

The solution I am building consists of an axis engine with the JAX-WS
services deployed right onto the web-app classes folder (next to the
Axis2Servlet), not putting any jaxws jar in servicejar.

Following [1] I managed to create an endpoint that used Rampart with
JAX-WS. By using SoapUI I managed to test it successfully. In fact,
this behavior (rampart configured on a per-axis2 engine basis) is
exactly what I needed, because all my webservices deployed there where
homogenous (part of the same application).

The next task, as other had also encountered [2], is creating a client
jax-ws application to consume the secure WS. I really wanted to stay
on the JAX-WS world because of the great JAXB and the Proxy feature,
that kept my code clean and small. Of course, I guess one can always
switch to the old JAX-RPC approach, that works perfect with Axis2, but
this seemed to me as a “downgrade”.

So I tried building a JAX-WS client to consume a secured WS.

First observation: another axis2 runtime was build in order to invoke
a jax-ws call (some modules were loaded again, time was wasted).

Second obs: the new runtime was not using the axis2.xml configuration
file, so the Rampart module was not loaded. The sent messages were not
passing through Rampart. What I needed is to somehow reuse the
existing Axis2 engine (started with the web-app) with the JAX-WS call.

As this seemed pseudo-impossible, I tried to at least reuse the
org.apache.axis2.context.ConfigurationContext from the running engine.
In order to get a grip of that context, I created a module that stored
this context for later use in a static field CONFIG_CONTEXT_REF.

After deep searches, I found
org.apache.axis2.jaxws.ClientConfigurationFactory that had an factory
method

public static ClientConfigurationFactory newInstance() {
return 
(ClientConfigurationFactory)MetadataFactoryRegistry.getFactory(ClientConfigurationFactory.class);
   }
That can be customized (through
org.apache.axis2.metadata.registry.MetadataFactoryRegistry) to return
ANOTHER IMPLEMENTATION, by means of a particular configuration file
placed at
WEB-INF/classes/META-INF/services/org.apache.axis2.metadata.registry.MetadataFactoryRegistry


With the contents of

org.apache.axis2.jaxws.ClientConfigurationFactory|com.sample.CustomClientConfigurationFactory

So what I did is implement a

public class CustomClientConfigurationFactory extends
org.apache.axis2.jaxws.ClientConfigurationFactory {
@Override
public synchronized ConfigurationContext 
getClientConfigurationContext() {
if (MyModule.CONFIG_CONTEXT_REF!=null) {
return MyModule.CONFIG_CONTEXT_REF;
} else {
return super.getClientConfigurationContext();
}
}
}


That returned the stored config context from the module.

The strange thing is that when I deployed this solution, I noticed
that no additional Axis engine was created anymore, and the Rampart
module did his job, securing out and in flow.



[1] 
http://markmail.org/message/dkwjvskrh3gysvnw?q=list#query:list+page:1+mid:aioxif5ayfhwagnz+state:results
[2] 
http://markmail.org/message/dkwjvskrh3gysvnw?q=list#query:list+page:1+mid:t7cpqqdc7pbcstol+state:results


Jar/Mar files in temp directory are not getting deleted

2010-02-18 Thread Matthias.Gaiser
Hi all,

 

after using Axis2 for about a year, I have discovered that Axis2 creates
a lot of temporary jar/mar/aar copies on my temp folder. That way in the
last 7 months 1256 folders with 18722 files were created which now use
about 4GB of my disk space. It seems to me that every time I restart my
Tomcat the files are generated again.

 

I have read now in several older posts that others also have the
problem. I understand that Axis2 generates these temp files for
performance reasons, but why does it not  delete them afterwards? Is
this fixed in the current Axis version?

I am using Axis2 version 1.5.

 

Hoping for help,

Matthias

 

Users with the same problem:

http://markmail.org/message/bo77yh2kvlb7k6fe?q=list:org.apache.ws.axis-u
ser+temp+mar

http://markmail.org/message/yv5b2lf6jasabsh2?q=list:org.apache.ws.axis-u
ser+temp+mar

http://markmail.org/message/kknpneit4ojlvgzg?q=list:org.apache.ws.axis-u
ser+temp+jar

http://markmail.org/message/nvyt4xsf54yefosn?q=list:org.apache.ws.axis-u
ser+cached+archives



Re: Sandesha2 1.5 Release Candidate

2010-02-18 Thread David Parsons1
Hi Amila,

Definitely.  I was planning on getting to this asap.  I will try to get to 
it today and put the vote out.

Regards,

Dave

Dave Parsons
Web Services Development
INTERNAL:  David Parsons1/UK/i...@ibmgb :: DE3F20 :: 246930
EXTERNAL:  parso...@uk.ibm.com :: (01962) 816930
Mail Point 211, IBM Hursley Park, Winchester. SO21 2JN




From:
Amila Suriarachchi 
To:
David Parsons1/UK/i...@ibmgb
Cc:
axis-user@ws.apache.org, sandesha-...@ws.apache.org, 
axis-...@ws.apache.org, gene...@ws.apache.org
Date:
18/02/2010 04:55
Subject:
Re: Sandesha2 1.5 Release Candidate



since rampart 1.5 has been released shall we do the sandesha release?

thanks,
Amila.

On Tue, Oct 6, 2009 at 9:07 PM, David Parsons1  
wrote:

Hi, 

I have created a Sandesha2 1.5 release candidate here: 

http://people.apache.org/~parsonsd/sandesha-1.5/RC1/dist/ 

and the M2 repository can be found here: 

http://people.apache.org/~parsonsd/sandesha-1.5/RC1/m2_repo/ 

This release candidate is using the Rampart 1.5 release candidate which 
can be found: 

 http://people.apache.org/~nandana/rampart-1.5/RC1/dist/ 

and the M2 repository for this can be found here: 

   http://people.apache.org/~nandana/rampart-1.5/RC1/m2_repo/ 


I will leave this available for a short period of time.  If no one finds 
any issues I'll request a vote on whether to submit it as a release of 
Sandesha2.  The Rampart 1.5 release is going to have to be cut before I 
can officially cut the Sandesha2 release so does anyone know how close 
this is to being done? 

Regards, 

Dave 

Dave Parsons
Web Services Development
INTERNAL:  David Parsons1/UK/i...@ibmgb :: DE3F20 :: 246930
EXTERNAL:  parso...@uk.ibm.com :: (01962) 816930
Mail Point 211, IBM Hursley Park, Winchester. SO21 2JN





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU 












Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU 









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







Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU







Setting up the server side

2010-02-18 Thread StevenN82

Hello,

I'm having troubles with setting up a webservice succesfully.

I have to develop a rahter complex webservice and client. The client was not
a problem. I generated the classes with WSDL2Java with option -g and -ss.
I dit this because I have 2 wsdl files (thus 2 services) who use the same
xsd schemes and could reuse the same generated classes for both the clients.
This works good.

Now I also have to implement a webservice, again starting from a WSDL, also
using the same xsd schemes.
Since they use the same classes I'm putting the client and the server in the
same project. (Don't know if this is a good approach ?).

Now I get lost.
The client side was pretty straight-forward : Create a class with void main,
instantiate the stub class and call the right function to invoke the right
service.
With the server I don't know where to start. WSDL2Java generated for the
server some extra classes :
SifCareerServiceMessageReceiverInOut.java
SifCareerServiceSkeleton.java

It seems clear that I need to change the Skeleton class en add the right
code, right ?

Then I want to test/deploy this service using Eclipse and the built-in
Tomcat Server v6.0.
I right-click on my project, choose New, then Other and then select Web
Service.
There I select bottom up Java bean Web Service and select the Skeleton
class.
If I want to test it, Tomcat fails to find the WSDL.
Which is kinda logic since it searches for SifCareerServiceSkeleton.wsdl
instead of the existing SifCareerService_v1.wsdl that was used to generate
the classes.

Where did I go wrong or miss something ?

If anyone can give me some more insight on how to set this up correctly, it
would be a great help.

Thanks in advance.

Greetz,
Steven
-- 
View this message in context: 
http://old.nabble.com/Setting-up-the-server-side-tp27635591p27635591.html
Sent from the Axis - User mailing list archive at Nabble.com.