Hello All,
 
Could someone more specific state where it violates the Ws-Addressing
spec if you use a different value for epr (where you send the message
to) and the wsa to header?. I raised the question about being able te
seperate a WS-Aheader from where you actually want to send the message a
while back. The Axis2 1.3 version i used the wsa:to was automaticvally
used to route the message. Is it not the idea to have seperate wsa
headers, with possible contain logical values i.o. actual endpoint urls
of web services?
 
Kind regards,
Erwin

  _____  

Van: Vinh Nguyen (vinguye2) [mailto:[EMAIL PROTECTED] 
Verzonden: donderdag 5 juni 2008 8:22
Aan: axis-user@ws.apache.org
Onderwerp: RE: [AXIS2] - How to control "To" element in the SOAP header?


Hi Eran,
 
Actually, I think Axis2 is fine and is setting the wsa:To properly.
It's Victor's createSOAPEnvelope() code that I believe is wrong because
it manually adds its own wsa:To element.  The end result is a SOAP
header with two wsa:To elements.  I don't believe this is correct.
 
So if I'm reading this right, Victor is asking for a solution that will
allow him to change/override the wsa:To value that Axis2 sets there by
default (from the EndpointReference).  I don't have the solution, but
I'm merely stating that even if there was, using that solution to make
wsa:To and EndpointReference.address be different values...may end up in
a message that's not WS-Addressing compliant.  Designs/implementations
that do require non-compliant messages like this probably needs to be
re-evaluated closely:)
 
-Vinh
 

  _____  

From: Eran Chinthaka [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2008 9:23 PM
To: axis-user@ws.apache.org
Subject: Re: [AXIS2] - How to control "To" element in the SOAP header?


Oh I see.Thanks Vinh for the update ;) Can you please help Axis2 to
implement it properly to be WS-Addressing compliant ?




On Wed, Jun 4, 2008 at 4:00 PM, Vinh Nguyen (vinguye2)
<[EMAIL PROTECTED]> wrote:


        Hi,
        The WS-Addressing spec states that the "address" value of the
EndpointReference should be copied into the "To" header.  If
implementations are doing otherwise, they are probably not WS-Addressing
compliant.
         
        See Section 2.3 of the following link:
        http://www.w3.org/Submission/ws-addressing/
         
        Hope this helps...
        -Vinh

  _____  

        From: Victor Solakhian [mailto:[EMAIL PROTECTED] 
        Sent: Wednesday, June 04, 2008 3:01 PM 
        
        To: axis-user@ws.apache.org
        
        Subject: RE: [AXIS2] - How to control "To" element in the SOAP
header?
        
        

        Hi Chinthaka,

         

        Actually createSOAPEnvelope() method is mine. It creates an
envelope that has "To" element in the header according to specs of the
Web Servcies server. The Axis2 code that sends the message adds another
"To" header block using the value that was set in options.setTo()
method.

         

        The problem is that sometimes servers expect values in the "To"
element that differ from the value of the endpoint reference used to
send messages. I do not know if this is a bug in Axis2. I know that some
developers used Axis1 to successfully implement desired behavior.

         

        Thanks

         

        
  _____  


        From: Eran Chinthaka [mailto:[EMAIL PROTECTED] 
        Sent: Wednesday, June 04, 2008 5:41 PM
        To: axis-user@ws.apache.org
        Subject: Re: [AXIS2] - How to control "To" element in the SOAP
header?

         

        Hi Victor,
        
        If createSOAPEnvelope() method adds wsa:To header, then it is a
bug, IMO. Please create a bug in JIRA and someone will look in to this
(but it might take some time for me to commit in to this :( )
        
        Thanks,
        Chinthaka

        On Wed, Jun 4, 2008 at 10:37 AM, Victor Solakhian
<[EMAIL PROTECTED]> wrote:

        I have code that creates a SOAP envelope and sends it using
Axis2 ServiceCLient.

         

                EndpointReference targetEPR = 

                new EndpointReference("https://...";);

         

                String action = "...";        

                client = new ServiceClient(ctx, null);

                operationClient =
client.createClient(ServiceClient.ANON_OUT_IN_OP);

         

                MessageContext outMsgCtx = new MessageContext();

                Options options = outMsgCtx.getOptions();

                options.setTo(targetEPR);

        
options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);

                options.setProperty(HTTPConstants.CHUNKED, false);

                options.setAction(action);

                

                outMsgCtx.setEnvelope(createSOAPEnvelope(operation,
payload));

                operationClient.addMessageContext(outMsgCtx);

                operationClient.execute(true);

         

        Now the createSOAPEnvelope(operation, payload)) method creates
an envelope with a header  that includes:

         

              <soapenv:Header>

                                ...

                                <wsa:To

        
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>

                                            urn:xxx.yyy.com.zzz

                                </wsa:To>

         

        which is expected by the web services server, but Axis2 code
adds another To" element:

         

                                <wsa:To>

                                            https://...

                                </wsa:To>

         

        to the header (using the endpoint reference set by
options.setTo(targetEPR)).

         

        We need to set the targetEPR to  the options so that messages
are sent to the right place, but we need to have control on what is put
in the header.

         

        Is there a way to avoid adding the targetEPR to the header?

         

        Thanks,

         

        Victor

        
        
        
        -- 
        With Mettha,
        Eran Chinthaka
        
        
--------------------------------------------------------------------
        Health is the greatest gift; contentment is the greatest wealth;
trusting is the best relationship; nirvana is the highest joy. -
Dhammapada 




-- 
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth;
trusting is the best relationship; nirvana is the highest joy. -
Dhammapada 

Reply via email to