Hi Hailong, as far as I know the axis stack is used for the client api as well. When not configured axis uses a default configuration (Please correct me if I am wrong). So when you want to configure the axis2 client to use for example the rampart module for outgoing messages, you have to ask your axis2 to do so.
One way to do this is via axis2.xml, where you can configure your axis2
to use this module. You can specify your config file in the constructor
of your stub.
ConfigurationContext configurationContext = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(axisRepositoryPath,
axisConfigPath);
MessagingClientServiceStub stub = new MessagingClientServiceStub(
configurationContext, serviceUrl);
Regards,
Sebastian
Wang, Hailong (NIH/CIT) [C] schrieb:
> I understand that the server needs the axis2.xml, why the client also
> need axis2.xml?
>
>
> Hailong
>
> -----Original Message-----
> From: Sebastian Roschke [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 19, 2007 4:10 AM
> To: [email protected]
> Subject: Re: [Axis2] [rampart] Problems using rampart
>
> Hi Dimuthu,
>
> thanks for your support solving this problem. I'm currently using
> rampart-1.1 and axis2-1.1.1. I have no policy configured at all. I
> removed all configurations but the failure remains. The only thing that
> is configured is that the client should use the rampart module. I have a
>
> <module ref="rampart"/>
>
> in the axis2 related config file. The exception is thrown on client side
> while the rampart module is invoked on the axis2 stack. Do you need any
> additional information?
>
> Regards,
> Sebastian
>
>
> Dimuthu Leelaratne schrieb:
>
>> Hi Sebastian,
>>
>> Looks like I was wrong in the previos mail. Can you pls tell me the
>> rampart version that you are using, so that I can look into it the
>> matter? One more question, do you load Policy at the client side?
>>
>> Thank you,
>> Dimuthu.
>>
>>
>> On 1/18/07, Sebastian Roschke <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Hi Dimuthu,
>>>
>>> Thanks for the hint... The SOAP messages I use are really simple.
>>>
> There
>
>>> is nothing special I think. It is something like that:
>>>
>>> <?xml version='1.0' encoding='utf-8'?>
>>> <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>>> <soapenv:Header>
>>>
>>>
>>>
> <wsa:To>http://localhost:3003/axis2/services/MessagingClientService</wsa
> :To>
>
>>> <wsa:ReplyTo>
>>>
>>>
>>>
> <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address
>
>>> </wsa:ReplyTo>
>>>
>>>
>>>
> <wsa:MessageID>urn:uuid:8655FCF2CBB79A97C711691163447531</wsa:MessageID>
>
>>> <wsa:Action>urn:addClient</wsa:Action>
>>> </soapenv:Header>
>>> <soapenv:Body>
>>> <ns2:addClient
>>>
>>>
> xmlns:ns2="http://www.hpi.uni-potsdam.de/skid.common/wsmessaging/types">
>
>>> <ns2:agentName>test</ns2:agentName>
>>> <ns2:className>skid.agent.test.TestAgent</ns2:className>
>>> <ns2:configPath>messaging_test.config</ns2:configPath>
>>> <ns2:messageFactoryClassName />
>>> </ns2:addClient>
>>> </soapenv:Body>
>>> </soapenv:Envelope>
>>>
>>> Maybe you have any ideas. Please write when you have suggestions...
>>>
>>> Regards,
>>> Sebastian
>>>
>>>
>>> Dimuthu Leelaratne schrieb:
>>>
>>>> Hi Sebastian,
>>>>
>>>> This is not a rampart problem. The pointed out JIRA shows the bug.
>>>>
> I
>
>>>> walked through the stack trace. This happens for specific SOAP
>>>> messages, when they are converted to DOOM as mentioned. I have
>>>>
> never
>
>>>> experienced the problem. Maybe because the SOAP messages that I use
>>>> wouldn't re-create the problem.
>>>>
>>>> Regards,
>>>> Dimuthu
>>>>
>>>>
>>>> On 1/17/07, Sebastian Roschke
>>>>
> <[EMAIL PROTECTED]>
>
>>>> wrote:
>>>>
>>>>> Hi everybody,
>>>>>
>>>>> I have a problem using rampart in axis2. I just have configured
>>>>>
> the
>
>>>>> axis2-client.xml this way, that it should use rampart. At the
>>>>>
>>> moment I
>>>
>>>>> have no configuration for the rampart module at all. While using
>>>>>
> the
>
>>>>> client api to invoke a soap request, I get the following
>>>>>
> exceptions:
>
>>>>> org.apache.axis2.AxisFault: Error in extracting message
>>>>>
> properties;
>
>>>>> nested exception is:
>>>>> org.apache.rampart.RampartException: Error in extracting
>>>>>
> message
>
>>>>> properties
>>>>> at
>>>>>
>>>>>
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
>
>>>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:381)
>>>>> at
>>>>>
> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:518)
>
>>>>> at
>>>>>
> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:651)
>
>>>>> at
>>>>>
>>>>>
> org.apache.axis2.description.OutOnlyAxisOperationClient.execute(OutOnlyA
> xisOperation.java:353)
>
>>>>> at
>>>>>
>>>>>
> skid.messaging.ws.client.client.MessagingClientServiceStub.addClient(Mes
> sagingClientServiceStub.java:126)
>
>>>>> at
>>>>>
>>> skid.messaging.client.ClientControl.main(ClientControl.java:55)
>>>
>>>>> Caused by: org.apache.rampart.RampartException: Error in
>>>>>
> extracting
>
>>>>> message properties
>>>>> at
>>>>>
>>>>>
> org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:294
> )
>
>>>>> at
>>>>>
>>> org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56)
>>>
>>>>> at
>>>>>
>>>>>
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59)
>
>>>>> ... 6 more
>>>>> Caused by: org.apache.ws.security.WSSecurityException: Error in
>>>>> converting SOAP Envelope to Document; nested exception is:
>>>>> org.apache.axiom.om.OMException:
>>>>>
>>> javax.xml.stream.XMLStreamException
>>>
>>>>> at
>>>>>
>>>>>
> org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.
> java:121)
>
>>>>> at
>>>>>
>>>>>
> org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:146
> )
>
>>>>> ... 8 more
>>>>> Caused by: org.apache.axiom.om.OMException:
>>>>> javax.xml.stream.XMLStreamException
>>>>> at
>>>>>
>>>>>
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1
> 99)
>
>>>>> at
>>>>>
> org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:469)
>
>>>>> at
>>>>>
>>>>>
> org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:476)
>
>>>>> at
>>>>>
>>>>>
> org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.
> java:107)
>
>>>>> ... 9 more
>>>>> Caused by: javax.xml.stream.XMLStreamException
>>>>> at
>>>>>
>>>>>
> org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper
> .java:952)
>
>>>>> at
>>>>>
>>>>>
> org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:913)
>
>>>>> at
>>>>>
>>>>>
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:1
> 16)
>
>>>>> ... 12 more
>>>>>
>>>>> This exception is thrown when invoking the first request on the
>>>>>
>>> stub. I
>>>
>>>>> can find the following link concerning that problem:
>>>>> http://www.mail-archive.com/[email protected]/msg25582.html
>>>>>
>>>>>
>>>>> As proposed in this post I should check wether the soap message
>>>>>
>>> includes
>>>
>>>>> MIME parts. I used MIME parts in former times, but at the moment I
>>>>> disabled all MTOM related things.
>>>>>
>>>>> Do you have any suggestions concernings this problem? Is it a
>>>>>
> known
>
>>>>> problem or a bug?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
> ---------------------------------------------------------------------
>
>>>> 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]
>
>
signature.asc
Description: OpenPGP digital signature
