You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "John Mayer (JIRA)" <ji...@apache.org> on 2007/02/05 09:18:06 UTC
[jira] Created: (AXIS2-2110) How to get WS-A info from transport
layer
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
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-2110) How to get WS-A info from transport
layer
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Closed: (AXIS2-2110) How to get WS-A info from transport
layer
Posted by "David Illsley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Illsley closed AXIS2-2110.
--------------------------------
Resolution: Invalid
The wsa:From value is available in the service. Try messageContext.getFrom()
> 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
> Assignee: 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.
[jira] Commented: (AXIS2-2110) How to get WS-A info from transport
layer
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481449 ]
Davanum Srinivas commented on AXIS2-2110:
-----------------------------------------
David, Can you please take this one?
-- dims
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-2110) How to get WS-A info from transport
layer
Posted by "David Illsley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-2110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509045 ]
David Illsley commented on AXIS2-2110:
--------------------------------------
John, Please add sender.gngageModule("addressing"); to your client code to turn on addressing.
> 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
> Assignee: 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org