[ 
https://issues.apache.org/jira/browse/AXIS2-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davanum Srinivas updated AXIS2-2110:
------------------------------------

    Assignee: David Illsley

> How to get WS-A info from transport layer
> -----------------------------------------
>
>                 Key: AXIS2-2110
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2110
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Addressing
>    Affects Versions: 1.1.1
>         Environment: Linux Fedora5, tomcat 6.0.7 java1.5.0_0.9, Axis2 1.1.1
>            Reporter: John Mayer
>         Assigned To: David Illsley
>
> I't trying to get the epr of the client invoking a web service.
> Where does axis store this information? 
> My classes do something like this:
> //client class
> public static void main(String[] args){
>               try{
>                       EndpointReference targetEPR = new 
> EndpointReference("http://localhost:8080/axis2/services/RPCCalcService/";);
>                       EndpointReference myEPR = new 
> EndpointReference("http://localhost:8080/axis2/services/clientService/";);
>                       Options options = new Options();
>                       options.setTo(targetEPR);
>                       options.setReplyTo(myEPR);
>                       options.setFrom(myEPR);
>                       options.setAction("getClientName");
>                        
>                       RPCServiceClient sender = new RPCServiceClient();
>                       sender.setOptions(options);
>                       QName op = new QName("http://calc/xsd";, 
> "getClientName");
>                       Object[] params = new Object[] { };
>                       Class[] returnTypes = new Class[] { String.class };
>                       Object[] response = sender.invokeBlocking(op, params, 
> returnTypes);
>                       String result = (String) response[0];
>                       System.out.println(result);
> }
> //method in service class
> public String getClientName() {
>       MessageContext msgCtx = MessageContext.getCurrentMessageContext();      
>                 
>       String remoteAddress = 
> (String)msgCtx.getProperty(MessageContext.REMOTE_ADDR);
>       
>       //TRANSPORT_URL 
>       TransportHeaders transport = 
> (TransportHeaders)msgCtx.getProperty(MessageContext.TRANSPORT_HEADERS);
>       String trh = "";
>       trh = "Message Context Transport Header Propertie Keys: " +
>                       transport.keySet() +"\nvalues: "+transport.values();
>       
>       String to = msgCtx.getTo().toString();
>       String from = msgCtx.getFrom().toString();
>       String env = msgCtx.getEnvelope().toString();
>       return "To: "+ to + " From:  "+ from +" evn: "+ env+ " thr: "+trh;
> }
>       
> I get: 
> To: Address: http://localhost:8080/axis2/services/RPCCalcService/ 
> From:  Address: 127.0.0.1 
> evn: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header 
> /><soapenv:Body><getClientName xmlns="http://calc/xsd"; 
> /></soapenv:Body></soapenv:Envelope> 
> thr: Message Context Transport Header Propertie Keys: [host=localhost:8080, 
> user-agent=Axis2, transfer-encoding=chunked, content-type=text/xml; 
> charset=UTF-8, soapaction="getClientName"]
> values: [localhost:8080, Axis2, chunked, text/xml; charset=UTF-8, 
> "getClientName"]
> Why wsa info are not present in the soap envelope?
> How can I get the client erp
> EndpointReference myEPR = new 
> EndpointReference("http://localhost:8080/axis2/services/clientService/";);
> in the server side?
> Many Thank

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to