Re: how to return xml file as string ?

2006-06-20 Thread Sai Arunachalam
Hi,   I think the problem comes because of the characters like "<" and ">" in your XML which is returned as a string inside the SOAP envelope XML. I am not very sure, but you can still see if the following works:
Replace all the "<",">" and "\" (and any other characters that might pose problems) in the string (XML) you return by "<", ">" and """ respectively. At the client, do the reverse process to get your XML.
- SaiOn 6/20/06, akkachotu <[EMAIL PROTECTED]> wrote:
I hava rpc encoded style web service that returns a string asresponse. In the string I'll storing  a xml file which has CDATAsections and some inline DTD. My problem is sometimes I am getting anerror from axis serialization classes saying that there is an invalid
character in xml.So is it better to convert the xml data into a BASE64 string (may beusing AXIS API Or Jakarta Commons API) and return that string asresponse ?  or is there any other way of doing returning xml files as
strings ?Please suggest.-To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Axis2] Setting attributes in SOAP envelope

2006-06-19 Thread Sai Arunachalam
Is setting the XSD and XSI properties also not allowed in Axis2?
On 6/19/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:

Axis2 doesn't support SOAP Encoding.

On 6/19/06, Sai Arunachalam <[EMAIL PROTECTED]
> wrote: 

Hi,  I am changing a piece of code of mine to use Axis 2 instead of Commons HttpClient. I am able to connect to an existing web service using HttpClient. In my current code the SOAP envelope generated is as follows: 
     xmlns:soapenv="
 http://schemas.xmlsoap.org/soap/envelope/ "    xmlns:xsd=\"http://www.w3.org/2001/XMLSchema
"     xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance ">
But when I use Axis2, I don't know how to set the xmlns:xsd and xmlns:xsi property. So the SOAP envelope gets generated as follows: http://schemas.xmlsoap.org/soap/envelope/"> I am currently getting the SOAP envelope by using: 
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();SOAPEnvelope envelope = factory.getDefaultEnvelope();Can somebody tell me how to set xmlns:xsd and xmlns:xsi properties? I checked that the service returns an error code if I don't set these properties. 
--Ques 2:In the continuation of the SOAP request, I get the following:
 http://someurl">I get this by doing: OMNamespace namespace =         factory.createOMNamespace("
http://someurl","ns1");OMElement params = factory.createOMElement("ShowChart", namespace);I would like to set an extra attribute of the following:"soapenv:encodingStyle="
 http://schemas.xmlsoap.org/soap/encoding/"in the above OMElement. How can I do this?
Thanks, 
Sai


Re: [Axis2] Setting attributes in SOAP envelope

2006-06-19 Thread Sai Arunachalam
Hey Anne,
    
    Thanks for that information. Can I do it in Axis 1.4 (or Axis 1.2). And I suppose there would be some reason for not supporting such a thing. If you have any links that explain why this is so, that might help me to understand things better. 

 
Thanks,
Sai


[Axis2] Setting attributes in SOAP envelope

2006-06-19 Thread Sai Arunachalam
Hi,  I am changing a piece of code of mine to use Axis 2 instead of Commons HttpClient. I am able to connect to an existing web service using HttpClient. In my current code the SOAP envelope generated is as follows:
     xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
"    xmlns:xsd=\"http://www.w3.org/2001/XMLSchema"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
">But when I use Axis2, I don't know how to set the xmlns:xsd and xmlns:xsi property. So the SOAP envelope gets generated as follows:
http://schemas.xmlsoap.org/soap/envelope/">I am currently getting the SOAP envelope by using:
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();SOAPEnvelope envelope = factory.getDefaultEnvelope();Can somebody tell me how to set xmlns:xsd and xmlns:xsi properties? I checked that the service returns an error code if I don't set these properties.
--Ques 2:In the continuation of the SOAP request, I get the following:http://someurl">I get this by doing:
OMNamespace namespace =         factory.createOMNamespace("http://someurl","ns1");OMElement params = factory.createOMElement("ShowChart", namespace);
I would like to set an extra attribute of the following:"soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"in the above OMElement.
How can I do this?Thanks,Sai


Re: A concrete axis + ssl client example.

2006-06-19 Thread Sai Arunachalam
Hey Subir,    Can you provide some code or example for what you did...? I am looking to implement a similar functionality.Thanks,SaiOn 6/19/06, 
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Thanks manuel...I am using a self signed certificate and so I had to import my servers certificate (not issued by any CA, but me ;) ) into the truststore and change the default trust store as they are not available in the default CA file available in the JRE.. That is the reason that I set the truststore explicitly ofcourse I can import my servers certificate into the default file to avoid setting any properties related to trust store..you can say I do this for testing purpose
Thanks again for pointing out that.I thought you could have given a few links that discuss these things (SSL, Certificates in JAVA) in detail to help all of us in the group.Cheers-Subir S-Original Message-
From: Manuel Mall [mailto:[EMAIL PROTECTED]]Sent: Friday, June 16, 2006 9:08 PMTo: axis-user@ws.apache.orgSubject: Re: A concrete axis + ssl client example.
On Friday 16 June 2006 21:07, [EMAIL PROTECTED] wrote:> Hi,>> I guess if you use the stubs generated using WSDL2Java then there is> nothing much to do. Set the trust store property and trust store
> password property before invoking the client. Just leave the other> properties as default it self.>> System.setProperty("javax.net.ssl.trustStore",> "c:\\TraceLogs\\tempstore.jks");
> System.setProperty("javax.net.ssl.trustStorePassword", "temp123");>For client authentication you usually the the keyStore andkeyStorePassword properties not the trustStore. The keyStore contains
your key and the corresponding certificate presented to the server. ThetrustStore contains certificates of the servers you trust. Actuallytypically not the certificates itself but the CA certificates. The CA
trustStore that comes with your JDK/JRE contains many of the commonlyused CA certificates (Verisign and the like) and normally you don'tneed to make any changes to it.  System.setProperty("javax.net.ssl.keyStore
", "keystore>");  System.setProperty("javax.net.ssl.keyStorePassword", "");works for me to use SSL client authentication.The biggest complication typically is to get your keyStore sorted out.
The details of that depend on how you your private/public key pair andfrom that your certificate is issued to you. This topic is however wayoff this list.>> -Subir S>> -Original Message-
> From: ip vp [mailto:[EMAIL PROTECTED]]>> Sent: Wednesday, June 14, 2006 6:56 PM> To: axis-user@ws.apache.org
> Subject: A concrete axis + ssl client example. Can somebody supply a concrete example of axis client accessing> webservice>> using ssl and a client certificate ?
>>> regards>Manuel-To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com-To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [SPAM] - [Axis2] Client cookie support - Bayesian Filter detected spam

2006-06-15 Thread Sai Arunachalam
Hey Davanum and Hariharasudhan,    Thanks a lot for your inputs. I'll try it out and get back in case I have more questions. Thanks again!- Sai


[Axis2] Client cookie support

2006-06-15 Thread Sai Arunachalam
Hi,     Is there a way I can set a cookie (my own) in the HTTP requests sent to a web service via Axis2 clients? The cookie I wish to set contains authentication information and not session information.I currently use HttpClient wherein I am able to set the cookie as follows:
        HttpState initialState = new HttpState( );    initialState.addCookie( mycookie );    httpclient.setState(initialState);I am trying to move my codebase to use Axis2 and am not able to find out how to do this in Axis2? If anyone can provide me with links to examples or any resource, that would be a great help.
Thanks,Sai


Custom cookies in request

2006-06-08 Thread Sai Arunachalam
Hi,   I am an Axis newbie. I want to use Axis to communicate with a web service but there are 2 (seemingly) problems:1. I need to set a custom persistent cookie in my request.2. The webservice returns only a string without the SOAP envelopes.
Can I use Axis in this scenario too?Thanks in advance,Sai