Thanks for your response,

However, I am still not getting the expected behavior....My stub has
three constructors, I am using the one shown below, passing in the
configurationContext from the client:

---Client code:


ConfigurationContext configurationContext = ConfigurationContextFactory
        
.createConfigurationContextFromFileSystem("C:\\Documents and
Settings\\dev_dir\\client_repo", null);



(NOTE: I use null for the second arg because according to the API: 

"...the repository will be the value specfied by path [first] parameter
and, system will try to find axis2.xml from sub directory called "conf"
inside the repository...". 

I have created a "conf" directory in the above location where I have
placed the axis2.xml, so I am expecting Axis to find the client's
Axis2.xml in that spot.)



//Create the stub by passing the AXIS_HOME and target EPR.
TestServiceStub stub= new
TestServiceStub(configurationContext,targetEPR);



------------------------------------------------------
---Stub code showing constructor I used:

public TestServiceStub(
        org.apache.axis2.context.ConfigurationContext
configurationContext,
        java.lang.String targetEndpoint) throws java.lang.Exception {
        //To populate AxisService
        populateAxisService();
        populateFaults();

        _serviceClient = new
org.apache.axis2.client.ServiceClient(configurationContext,
                _service);
        _serviceClient.getOptions().setTo(new
org.apache.axis2.addressing.EndpointReference(
                targetEndpoint));

        //Set the soap version
 
_serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP
12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
    }

------------------

The behavior that I am expecting is that the client request will be
timestamped, encrypted and signed, just as in the security sample ( I am
using the sample files of sec.jks, sec.props, etc archived in with my
service implementation), however I get the following error:

"org.apache.axis2.AxisFault: WSDoAllReceiver: Request does not contain
required Security header"

Usually I have found this error to occur when the axis2.xml is not
available/reachable.

Of course, I could be totally off base in assuming the axis2.xml
configuration parameters do the security stuff for client requests...

                        



Thanks again,

Alan J


--------------------------------------------
Alan R Jones
Software Engineering
Boeing S&IS Mission Systems
Denver Engineering Center (BDEC)

-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 01, 2006 12:39 PM
To: [email protected]
Subject: Re: How reference a particular descriptor from client

Create a new ConfigurationContext  with the repo and file path:
ConfigurationContext  configurationContext =
ConfigurationContextFactory.
          createConfigurationContextFromFileSystem(repo, axis2_xml);

Then use it either in the generated stub or when creating ServiceClient.

thanks,
dims

On 8/1/06, Jones, Alan R <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I am of course trying to understand Axis2 stuff,  and there's a little

> thing I am missing somewhere...if I have a client that I would like to

> have referencing an axis2.xml descriptor, in a client repository, how 
> do I point the client to reference that particular file? In the 
> Rampart security example they use a command line in the ant build file
> ("Daxis2.xml=client_repo/conf/axis2.xml") but is there a way for my 
> client code to know which axis2.xml file to use, say in the Client
API?
> Thanks in advance
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thanks,
>
> Alan J
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service
Developers)

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

Reply via email to