axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Fernandes" <ralphfer...@gmail.com>
Subject Re: How to send WS-Addressing headers in AXIOM based client
Date Fri, 12 Oct 2007 20:14:41 GMT
Thanks, I dropped addressing-1.3.mar into the lib folder (it was already in
the module folder), and that made it work.

However, the WS-A To URI value is getting used as the HTTP
endpoint.  In my case, the WS-A To URI is not the same as the HTTP
end-point.  What does ServiceClient::setTargetEPR() do?  I am setting
the endpoint with this method, but it is not the one that is being
used to connect.


On 10/12/07, Deepal Jayasinghe <deepal@opensource.lk> wrote:
>
>
> > I have Axis2-1.3 and am trying to send WS-Addressing headers in the
> > request using the code snippet below. The only header that gets set is
> > the SOAPAction (HTTP) header, but none of the SOAP envelope headers,
> > viz. To, From, Action, MessageID. If I try to explicitly engage the
> > module, I get a runtime error "unable to engage module". I understood
> > that to enable the addressing module, the axis2.xml file needs to have
> > the module entry un-commented, which it is by default.
> >
> > What should I be doing to get the To, Action, From, Msg. ID sent in
> > the SOAP header? Besides the default module configuration in
> > axis2.xml, is there any other configuration?
> Well drop addressing.mar into classpath and call
> serviceClient.engageModule("addressing");
>
> Thanks
> Deepal
> >
> > (I am not using the wsdl2java ADB code generation since it does not
> > work for our WSDLs.)
> >
> >
> > Thanks
> >
> >
> -----------------------------------------------------------------------------
> >
> > // TestAXIOMClient.java
> > ...
> > public static void main(String[] args) {
> > // TODO Auto-generated method stub
> > OMElement req = createRequestDocument();
> > Options options = new Options();
> > options.setTo (targetEPR);
> > options.setAction(wsaAction);
> > options.setFrom(wsaFrom);
> > options.setMessageId("ab838db4-c0e5-11da-90b6-7be9a196b6d2");
> > options.setTransportInProtocol (Constants.TRANSPORT_HTTP);
> >
> > try {
> > ServiceClient sender = new ServiceClient();
> > sender.engageModule("addressing"); // throws runtime exception below
> > sender.setTargetEPR (targetEPR);
> >
> > sender.setOptions(options);
> > sender.sendReceive(req);
> > } catch (java.lang.Exception e) {
> > e.printStackTrace();
> > }
> >
> > }
> >
> >
> >
> > -----------
> >
> > org.apache.axis2.AxisFault: Unable to engage module : addressing
> > at
> > org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java
> :339)
> > at
> > com.frk.corp.noam.sharedservices.TestAXIOMClient.main(
> TestAXIOMClient.java
> > :53)
> >
>
> --
> Thanks,
> Deepal
> ................................................................
> "The highest tower is built one brick at a time"
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Mime
View raw message