Fw: Re: How to get Envelope String - or other ideas? - Solved

2005-08-19 Thread Mike . Witters
In case anyone ever runs across the same issue...  I had a different version of the Commons Http Client jar file than axis ships within my class path (web-inf/lib directory) for some other work that the application was doing.It apparently hassome mismatched code that was causing the cookie to get lost.  Thanks. -Forwarded by Mike Witters/People/Perficient on 08/19/2005 10:29AM -To: axis-user@ws.apache.orgFrom: Mike Witters/People/PerficientDate: 08/18/2005 11:27AMSubject: Re: How to get Envelope String - or other ideas?Thanks for the advice. This is one of the things that I had seen hashed over several times in previous emails in the archive. I had tried it before and it didn't work, but I knew that so many people wouldnt have said it works if it didnt. So I tried again usingsmall test case from a command like application and it worked. Using the TCP Monitor I can see the Header for the cookie in the Http transaction. The wierd thing is that when I do the exact same code from within my WebSphere portal application the cookie is not set when watching in TCP Monitor so I get denied entry into my web service. This is why Ididnt think it worked for the past few days. I'm not sure that thisis an Axis problem since it only happens when running in WebSphere, but I'm not sure how WebSphere portal could be doing something to remove the cookieeither.  Any ideas, anyone? Thanks.  -Davanum Srinivas [EMAIL PROTECTED] wrote: - To: axis-user@ws.apache.org From: Davanum Srinivas [EMAIL PROTECTED] Date: 08/17/2005 03:09PM Subject: Re: How to get Envelope String - or other ideas? See http://shemnon.com/speling/archives/98.html on how to set the cookie by yourself. -- dims On 8/17/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:   I have to write a web service client in short time that calls a web service  running on a WebSphere app server. The service is not under my control as  it is a vendor product. The service is in our SSO domain so we can call it  with the LTPA token as a cookie(actually its a requirement for SSO since it  is a background call) and not require the user's password. I didnt see a  way to do this using the custom cookie (LtpaToken) with Axis even though  similar things were hashed over in hundreds of posts to this list. For now  I have a quick solution using Apache SOAP that works where: I use Apache  SOAP to build the request envelope then unmarshal it into String, use  Commons HttpClient to send it after adding the Http Header representing the  LtpaToken as a cookie to the request, then use Apache SOAP to marshal the  response back into a response envelope for processing. Its convoluted, I  know, but the SSO works and I didnt see a better way in the time I need it  done.The problem is that some of the vendors services take org.w3c.dom.Elements  as arguments and Apache SOAP has no serializers/deserializers for (literal)  Elements. Apache Axis handles org.w3c.dom.Elements fine, but it appears to  be a much more difficult proposition to get the String, or byte[]  representation of the Envelope that it intends to send across the wire, user  HttpClient to actually send it, and then to build a response envelope from  the response bytes that come back through HttpClient. Can anyone point me  to a quick way to do one, or both? Or am I missing the boat and there is an  easier way to add the cookie to the request when Axis goes to send the  request?Thanks in advance.  Mike   -- Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform 


Re: How to get Envelope String - or other ideas?

2005-08-18 Thread Mike . Witters
Thanks for the advice. This is one of the things that I had seen hashed over several times in previous emails in the archive. I had tried it before and it didn't work, but I knew that so many people wouldnt have said it works if it didnt. So I tried again usingsmall test case from a command like application and it worked. Using the TCP Monitor I can see the Header for the cookie in the Http transaction. The wierd thing is that when I do the exact same code from within my WebSphere portal application the cookie is not set when watching in TCP Monitor so I get denied entry into my web service. This is why Ididnt think it worked for the past few days. I'm not sure that thisis an Axis problem since it only happens when running in WebSphere, but I'm not sure how WebSphere portal could be doing something to remove the cookieeither.Any ideas, anyone?Thanks.-Davanum Srinivas [EMAIL PROTECTED] wrote: -To: axis-user@ws.apache.orgFrom: Davanum Srinivas [EMAIL PROTECTED]Date: 08/17/2005 03:09PMSubject: Re: How to get Envelope String - or other ideas?See http://shemnon.com/speling/archives/98.htmlon how to set thecookie by yourself.-- dimsOn 8/17/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:  I have to write a web service client in short time that calls a web service running on a WebSphere app server. The service is not under my control as it is a vendor product. The service is in our SSO domain so we can call it with the LTPA token as a cookie(actually its a requirement for SSO since it is a background call) and not require the user's password. I didnt see a way to do this using the custom cookie (LtpaToken) with Axis even though similar things were hashed over in hundreds of posts to this list. For now I have a quick solution using Apache SOAP that works where: I use Apache SOAP to build the request envelope then unmarshal it into String, use Commons HttpClient to send it after adding the Http Header representing the LtpaToken as a cookie to the request, then use Apache SOAP to marshal the response back into a response envelope for processing. Its convoluted, I know, but the SSO works and I didnt see a better way in the time I need it done.   The problem is that some of the vendors services take org.w3c.dom.Elements as arguments and Apache SOAP has no serializers/deserializers for (literal) Elements. Apache Axis handles org.w3c.dom.Elements fine, but it appears to be a much more difficult proposition to get the String, or byte[] representation of the Envelope that it intends to send across the wire, user HttpClient to actually send it, and then to build a response envelope from the response bytes that come back through HttpClient. Can anyone point me to a quick way to do one, or both? Or am I missing the boat and there is an easier way to add the cookie to the request when Axis goes to send the request?  Thanks in advance. Mike  -- Davanum Srinivas : http://wso2.com/- Oxygenating The Web Service Platform


How to get Envelope String - or other ideas?

2005-08-17 Thread Mike . Witters
I have to write a web service client in short time that calls a web service running on a WebSphere app server. The service is not under my control as it is a vendor product. The service is in our SSO domain so we can call it with the LTPA token as a cookie(actually its a requirement for SSO since it is a background call) and not require the user's password. I didnt see a way to do this usingthe custom cookie (LtpaToken) with Axis even though similar things were hashed over in hundreds of posts to this list. For now I have a quick solution using Apache SOAP that works where: I use Apache SOAP to build the request envelope then unmarshal it into String, use Commons HttpClient to send it after adding the Http Header representing the LtpaToken asa cookie to the request, then use Apache SOAP to marshal the response back intoa responseenvelope for processing. Its convoluted, I know, but the SSO works and I didnt see a better way in the time I need it done.Theproblem is that some of the vendors services take org.w3c.dom.Elements as arguments and Apache SOAP has no serializers/deserializers for (literal) Elements. ApacheAxis handlesorg.w3c.dom.Elements fine, but it appears to be a much more difficult proposition to get the String, or byte[] representation of the Envelope that it intends to send across the wire, user HttpClient to actually send it,and then to build a response envelope from the response bytes that come backthrough HttpClient. Can anyone point me to a quick way to do one, or both? Or am I missing the boat and there is an easier way to add the cookie to the request when Axis goes to send the request?Thanks in advance.Mike 

Re: How to get Envelope String - or other ideas?

2005-08-17 Thread Davanum Srinivas
See http://shemnon.com/speling/archives/98.html on how to set the
cookie by yourself.

-- dims

On 8/17/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 I have to write a web service client in short time that calls a web service
 running on a WebSphere app server.  The service is not under my control as
 it is a vendor product.  The service is in our SSO domain so we can call it
 with the LTPA token as a cookie(actually its a requirement for SSO since it
 is a background call) and not require the user's password.  I didnt see a
 way to do this using the custom cookie (LtpaToken) with Axis even though
 similar things were hashed over in hundreds of posts to this list.  For now
 I have a quick solution using Apache SOAP that works where: I use Apache
 SOAP to build the request envelope then unmarshal it into String, use
 Commons HttpClient to send it after adding the Http Header representing the
 LtpaToken as a cookie to the request, then use Apache SOAP to marshal the
 response back into a response envelope for processing.  Its convoluted, I
 know, but the SSO works and I didnt see a better way in the time I need it
 done. 
  
 The problem is that some of the vendors services take org.w3c.dom.Elements
 as arguments and Apache SOAP has no serializers/deserializers for (literal)
 Elements.  Apache Axis handles org.w3c.dom.Elements fine, but it appears to
 be a much more difficult proposition to get the String, or byte[]
 representation of the Envelope that it intends to send across the wire, user
 HttpClient to actually send it, and then to build a response envelope from
 the response bytes that come back through HttpClient.  Can anyone point me
 to a quick way to do one, or both?  Or am I missing the boat and there is an
 easier way to add the cookie to the request when Axis goes to send the
 request?
  
 Thanks in advance.
 Mike 
  


-- 
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform