You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Francisco Serrano <fr...@multicom.co.uk> on 2012/03/19 15:46:40 UTC

[Axis2] Axis2 client generated from WSDL ignoring encoding

Any advice on this please?

-------- Original Message --------
Subject: 	[Axis2] Axis2 client generated from WSDL ignoring encoding
Date: 	Thu, 23 Feb 2012 17:02:42 +0000
From: 	Francisco Serrano <fr...@multicom.co.uk>
To: 	java-user@axis.apache.org



Hello,

I have an axis2 client generated from a WSDL, which is working fine but
I'm having some problems since it's ignoring the charset specified in
the response it's getting back.

The response specifies charset=UTF-8 in the Content-Type HTTP header and
the same in the encoding parameter in the xml message.

Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1
which is the one set for the JVM where the client is running. For this
reason I'm getting some strange characters in the response. I've double
checked that the characters are encoded correctly using UTF-8.

It's an old client generated with version 1.0. Does anybody know if
there's some issue about that version regarding this problem? Are there
any parameters to specify the charset to use to decode the response?

Best regards,
Francisco.



-- 
Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS.

This email is confidential to the addressee and may contain privileged information.  If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party.  Unauthorised use or disclosure of this email is prohibited and may be unlawful.

We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system.

We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email.

Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks.

RE: Request is not received at Axis2 SERVIVE

Posted by Dipesh Garg <di...@erevmax.com>.
Thanks Sagara,

Hi so if I want to migrate from Axis2 1.4 to Axis2 1.6.1, what step I need
to follow, is there any code change required?? Or just copy the upgraded jar
of Axis2 1.6.1 is sufficient

Dipesh 

-----Original Message-----
From: Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com] 
Sent: Wednesday, March 21, 2012 12:11 PM
To: java-user@axis.apache.org
Subject: Re: Request is not received at Axis2 SERVIVE

May be Axis2 1.6.1 version provides better results.

Thanks !

On Tue, Mar 20, 2012 at 11:04 PM, Dipesh Garg <di...@erevmax.com> wrote:
> Hi,
>
>
>
> I have written a axis2 1.4 web service which receive a request and modify
> that request and make a soap message and  send it to another axis 2 1.4
> service using operation client.
>
>  If load is less say in the range of 30000-40000 it will work fine , but
> when request will increase , from first service request will sent to
second
> service , but  second service receive that request after a long time say
> after 1 hour . I think request will stay in queue and wait for other
>
>
>
> Is there any setting for Operation client so that we can fix that issue?
>
>
>
>
>
> Thanks in advance
>
>
>
> Dipesh



-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Request is not received at Axis2 SERVIVE

Posted by Sagara Gunathunga <sa...@gmail.com>.
May be Axis2 1.6.1 version provides better results.

Thanks !

On Tue, Mar 20, 2012 at 11:04 PM, Dipesh Garg <di...@erevmax.com> wrote:
> Hi,
>
>
>
> I have written a axis2 1.4 web service which receive a request and modify
> that request and make a soap message and  send it to another axis 2 1.4
> service using operation client.
>
>  If load is less say in the range of 30000-40000 it will work fine , but
> when request will increase , from first service request will sent to second
> service , but  second service receive that request after a long time say
> after 1 hour . I think request will stay in queue and wait for other
>
>
>
> Is there any setting for Operation client so that we can fix that issue?
>
>
>
>
>
> Thanks in advance
>
>
>
> Dipesh



-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Andreas Veithen <an...@gmail.com>.
On Tue, Mar 20, 2012 at 15:25, Francisco Serrano
<fr...@multicom.co.uk> wrote:
>
> Hello Josef,
>
> Thanks a lot for your reply.
>
> The exact version I'm using is 1.0 and I can confirm that the stub is
> generated by WSDL2JAVA.
>
> The problem is that from my client I'm using the stub to call an external
> service. The response from this service is using UTF8 to encode the content,
> I've checked with Wireshark the communications and messages and the response
> is specifying UTF8 and the problematic character (a dash) is correctly
> encoded with UTF8. The response specifies "text/xml; charset=utf-8" in the
> HTTP header and the xml message within it "<?xml version='1.0'
> encoding='utf-8'?>" and the character in the payload is specified as: e2 80
> 93 (UTF-8 (hex) representation for EN DASH:
> http://www.fileformat.info/info/unicode/char/2013/index.htm).
>
> But when the control comes back to my application, the stub is using
> ISO-8859-15 (which is the charset specified for my JVM) to decode that
> response so the response is showing incorrect characters for the dash,
> debugging the code I'm getting: â
>
> According to
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html looks like
> before version 1.6 the encoding wasn't being taken into account in a
> reliable way...

The scope of AXIS2-4468 is limited to the XmlBeans data binding and
the issue occurs in the serialization of an outgoing message, not in
the deserialization of an incoming message.

> Wouldn't be any other way to solve this rather than generating the client
> with a newer version?
>
> Thanks,
> Francisco.
>
>
>
> On 20/03/2012 09:12, Stadelmann Josef wrote:
>
> Francisco
>
>
>
> What is your exact version of AXIS2?
>
>
>
> And just to be sure; are you creating a Java Client calling a stub
> generated by WSDL2JAVA?
>
>
>
> Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1
> characters.
>
> To transfer you need to escape certain characters before inserting it into
> your ISO-8859-1
>
> XML string, and it might be better to use UTF-8 for that.
>
>
>
> We had recently a similar issue which we did not have unless we changed to
> AXIS2-1.6.1
>
> Guess it has to do with Axiom version delivered with this release of
> AXIS2.
>
>
>
> I strongly suggest to use TCP Monitor to look what you get back by the
> sender which is
>
> in your case the service-response.
>
>
>
> How does the service return payload characters i.e. a "ä ö ü è é or > < &
> %"
>
>
>
> and I think that will get you further.
>
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html
>
>
>
>
>
> let me know if it helps.
>
>
>
> Josef
>
>
>
>
>
>
>
>
>
> Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> Gesendet: Montag, 19. März 2012 15:47
> An: java-user@axis.apache.org
> Betreff: [Axis2] Axis2 client generated from WSDL ignoring encoding
>
>
>
> Any advice on this please?
>
> -------- Original Message --------
>
> Subject:
>
> [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> Date:
>
> Thu, 23 Feb 2012 17:02:42 +0000
>
> From:
>
> Francisco Serrano <fr...@multicom.co.uk>
>
> To:
>
> java-user@axis.apache.org
>
>
>
> Hello,
>
>
>
> I have an axis2 client generated from a WSDL, which is working fine but
>
> I'm having some problems since it's ignoring the charset specified in
>
> the response it's getting back.
>
>
>
> The response specifies charset=UTF-8 in the Content-Type HTTP header and
>
> the same in the encoding parameter in the xml message.
>
>
>
> Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1
>
> which is the one set for the JVM where the client is running. For this
>
> reason I'm getting some strange characters in the response. I've double
>
> checked that the characters are encoded correctly using UTF-8.
>
>
>
> It's an old client generated with version 1.0. Does anybody know if
>
> there's some issue about that version regarding this problem? Are there
>
> any parameters to specify the charset to use to decode the response?
>
>
>
> Best regards,
>
> Francisco.
>
>
>
> Multicom Products Limited is a company registered in England and Wales
> (Registered Number 2447353 Wales) with its registered office at 33 Victoria
> Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged
> information. If you have reason to believe that you are not the intended
> recipient of this communication, please delete it from your system and
> contact the sender immediately. You are not permitted to use or copy this
> email or its attachments nor may you disclose the same to any third party.
> Unauthorised use or disclosure of this email is prohibited and may be
> unlawful.
> We reserve the right to intercept and read emails sent or received by our
> employees. This is to ensure compliance with our internal policies and to
> protect our business. If you do not wish for your communications to be
> subjected to such scrutiny, you should not communicate via this email
> system.
> We endeavour to exclude viruses and other malware from our data but it is
> the responsibility of the recipient to scan all emails and attachments for
> viruses before opening them. We accept no liability for any damage caused by
> any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted or
> corrupted and may arrive late or not at all. Anyone who communicates with us
> by email accepts these risks.
>
>
>
>
> --
> Francisco Serrano
> Java Developer
> Email: franciscos@multicom.co.uk
>
> Tel: 0117 908 1250
> Address: 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
> Facebook: www.facebook.com/multicomproductslimited
> Twitter: @MulticomFAB
> LinkedIn: www.linkedin.com/company/multicom-products-ltd
>
> www.multicom.co.uk
>
> Multicom Products Limited is a company registered in England and Wales
> (Registered Number 2447353 Wales) with its registered office at 33 Victoria
> Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged
> information. If you have reason to believe that you are not the intended
> recipient of this communication, please delete it from your system and
> contact the sender immediately. You are not permitted to use or copy this
> email or its attachments nor may you disclose the same to any third party.
> Unauthorised use or disclosure of this email is prohibited and may be
> unlawful.
> We reserve the right to intercept and read emails sent or received by our
> employees. This is to ensure compliance with our internal policies and to
> protect our business. If you do not wish for your communications to be
> subjected to such scrutiny, you should not communicate via this email
> system.
> We endeavour to exclude viruses and other malware from our data but it is
> the responsibility of the recipient to scan all emails and attachments for
> viruses before opening them. We accept no liability for any damage caused by
> any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted or
> corrupted and may arrive late or not at all. Anyone who communicates with us
> by email accepts these risks.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: AW: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Francisco Serrano <fr...@multicom.co.uk>.
Hi Josef,

The project isn't mavenized either :S

I'll follow your advice, I'm going to try to generate it and see if it 
works and otherwise I'll go for the handler approach.

Thanks a lot for your help.


On 22/03/2012 13:16, Stadelmann Josef wrote:
>
> Hi Francisco,
>
> OK -- I have no clue about your project setup.
>
> Are you working with Maven and NetBeans?
>
> have you "mavenized" your project?
>
> maven allows to define dependencies i.e. for your client,  based on 
> artifacts including the version, and this for each project / component 
> (module). With maven you can define a common place for your artifacts 
> like jar0's and pom's and other resources. local = ~/.m2/repository.
>
> The repository is where artifacts are stored, artifacts like the 
> various versions of jar's and pom's. When a project or sub-project or 
> a module depends on a given version of a jar, that is absolute no 
> problem for maven to get it; You can populate your local repository at 
> .m2/repository with what you want and have version controlled access 
> to your artifacts. And if a given artifact with a given version exists 
> but is not in your local repository, maven is so smart to download it 
> for you from apache or vice versa.
>
> What I suggest is to make a real small client using maven and 
> axis2-1.6.1 to see if the problem is fixed AND if the problem is 
> fixed, then you know about a working solution; Then have your team 
> decide how to best approach with the problem to back integrate the 
> stub into your existing project.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Ge**sendet:*Donnerstag, 22. März 2012 12:30
> *An:* java-user@axis.apache.org
> *Betreff:* Re: AW: [Axis2] Axis2 client generated from WSDL ignoring 
> encoding
>
> Hi Josef,
>
> Thanks a lot for your help.
>
> When I said that my system was quite old I didn't mean that the PC or 
> the environment is old but the projects I'm working on. AXIS2-1.0 is 
> being used in many places and the libraries are in a common root 
> project along with common classes etc, if I generate the client I'm 
> working on with 1.6 I would also have to change the libraries in the 
> root project and that might affect to the other clients/projects.
> I've tried to do it to see the impact but there are some classes that 
> have changed for example I get an errors saying that 
> getFirstChildWithName method is not in the response (I think this is 
> related to Axiom).
>
> Changing the libraries in the root project it's something that my team 
> is not very keen on :(
>
> Best regards,
> Francisco.
>
> On 22/03/2012 10:54, Stadelmann Josef wrote:
>
> Hi Francisco
>
> That is what I have expected about.
>
> BUT
>
> If you say you have a very old system, do you mean your PC where the 
> client is run, is very old . . .
>
> can you give me an idea about your environment where you intend to run 
> your client-code?
>
> I need your
>
> HW
>
> OS (Version / SP)
>
> Java JDK Version
>
> Application Server running (make and version) i.e. Tomcat 6.0.26 on 
> JDK 1.6.0_30 using AXIS2-1.0 (very old)
>
> NOW -- install in parallel a second axis2.war !
>
> AXIS2-1.0 as well as AXIS2-1.6.1 is just a servlet, as such you can 
> install both at once
>
> when you deploy axis2.war into /webapps while tomcat is running or 
> after tomcat starts axis2-*.war is deployed, that is to say, a new 
> directory is created under webapps/axis2
>
> when you deploy your brand new downloaded axis2-1.6.1.war, deploy it 
> to tomcat /webapps a new directory will be created under 
> wepapps/axis2-1.6.1
>
> download the binary kit of axis2-1.6.1 and install it -- set 
> AXIS2_HOME to this directory root; and enter %AXIS2_HOME%\bin; into 
> your path
>
> -- you need the tools not only the axis2-1.6.1 war
>
> Then create your stub one more time -- have wsdl2java  download/use 
> the wsdl info from the remote web service 
> http://remote:8080/axis2/services/yourservice?wsdl
>
> compile and use your client AND
>
> and I am nearly 90% confident that your encoding problems are gone.
>
> Compared to writing an interceptor, this is a much faster smarter way 
> to go, and you are not touching the rest of the system.
>
> The new axis2-1.6.1 compared to your axis2-1.0 brings more than 6 
> years of enhancements to your system.
>
> BUT
>
> before you go for a INTERCEPTOR you may write the INTERCEPTOR as
>
> a client side engaged module or handler; for that to start with go for
>
> http://axis.apache.org/axis2/java/core/docs/Axis2ArchitectureGuide.html
>
> In that handler you have control over what comes in and what is further
>
> returned to the client; that would be at least a smart clean approach, and
>
> it would really payoff and foster, why at same time in the past, one has
>
> selected AXIS2-1.0 (because it is extendable through phases, modules
>
> and handlers)
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Mittwoch, 21. März 2012 18:01
> *An:* java-user@axis.apache.org <ma...@axis.apache.org>
> *Betreff:* Re: [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> Hi Josef,
>
> Sorry for not being clear enough. The version I'm using is AXIS2 1.0 
> from 04 - May 2006 (http://axis.apache.org/axis2/java/core/download.cgi).
>
> The web service I'm trying to communicate with is from an external 
> company, so I've generated the client from their WSDL. About the 
> version they're running I'm not sure...
>
> I'm afraid I'm not able to change the AXIS2 version because the system 
> in my company is quite old and will require lots of changes. Isn't 
> there any option to specify the encoding for the incoming responses? 
> Otherwise maybe I could create sort of an Interceptor to deal with the 
> responses before they're delivered to the stub.
>
> Best regards,
> Francisco.
>
> On 21/03/2012 14:26, Stadelmann Josef wrote:
>
> Hi Francisco
>
> still unclear to me what you actually use.
>
> You say you have an external server? what make and version of web 
> service stack is running the service you like to work with?
>
> What does the wsdl say when requested?
>
> which version of axis(2) are you using?
>
> AXIS2-1.0 or AXIS-1.0 or what?
>
> AXIS   is the old make of a web service stack
>
> AXIS2 is the total new implementation of a web service engine.
>
> each of the two has several versions. So which one are you using.
>
> When I started in 2006 I took the latest greatest version of AXIS2-1.2.
>
> Since then we have arrived at AXIS2-1.6.1 and more to come ...
>
> Both axis versions are implemented in JAVA
>
> But there is also a AXIS2/C version.
>
> Both AXIS2/J and AXIS2/C have their AXIOM Library,
>
> a library which implements the AXIS2 Object Model
>
> which deals with SOAP/XML constructs and BTW,
>
> maybe with the problems you are faced with.
>
> So are you using AXIS or AXIS2?
>
> and what is the exact version of it?
>
> And yes, I would upgrade.
>
> Generating the stub with the tool WSDL2JAVA isn't a big work
>
> AND it can happen that your problems are gone thereafter.
>
> I would try the following. make a small example, client and server and 
> send &#8211 which is the decimal of 2013 hex. Echo this back and see 
> what you get. If you know what codes and code-pages you need you 
> should do so in a iterative way, you generate the string into a string 
> buffer and pass it to the stub to transmit this string I,e. "&#8211" 
> your server shall return it and you take Wireshark or TCP Monitor to 
> see what you get on the wire in both directions. If it leaves correct 
> in one way and returns correct sequence in the response, and finally 
> arrives wrong in your string buffer (for comparision), you know where 
> your problem is. If you take AXIS2/J-1.6.1 and have no problem I would 
> suggest to generate the stub again and use it. If your external 
> service response badly you know where to ask for upgrading the service.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Dienstag, 20. März 2012 15:25
> *An:* java-user@axis.apache.org <ma...@axis.apache.org>
> *Betreff:* Re: AW: [Axis2] Axis2 client generated from WSDL ignoring 
> encoding
>
> Hello Josef,
>
> Thanks a lot for your reply.
>
> The exact version I'm using is 1.0 and I can confirm that the stub is 
> generated by WSDL2JAVA.
>
> The problem is that from my client I'm using the stub to call an 
> external service. The response from this service is using UTF8 to 
> encode the content, I've checked with Wireshark the communications and 
> messages and the response is specifying UTF8 and the problematic 
> character (a dash) is correctly encoded with UTF8. The response 
> specifies "text/xml; charset=utf-8" in the HTTP header and the xml 
> message within it "<?xml version='1.0' encoding='utf-8'?>" and the 
> character in the payload is specified as: e2 80 93 (UTF-8 (hex) 
> representation for EN DASH: 
> http://www.fileformat.info/info/unicode/char/2013/index.htm).
>
> But when the control comes back to my application, the stub is using 
> ISO-8859-15 (which is the charset specified for my JVM) to decode that 
> response so the response is showing incorrect characters for the dash, 
> debugging the code I'm getting: â
>
> According to 
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.htmllooks 
> like before version 1.6 the encoding wasn't being taken into account 
> in a reliable way...
>
> Wouldn't be any other way to solve this rather than generating the 
> client with a newer version?
>
> Thanks,
> Francisco.
>
>
> On 20/03/2012 09:12, Stadelmann Josef wrote:
>
> Francisco
>
> What is your exact version of AXIS2?
>
> And just to be sure; are you creating a Java Client calling a stub 
> generated by WSDL2JAVA?
>
> Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 
> characters.
>
> To transfer you need to escape certain characters before inserting it 
> into your ISO-8859-1
>
> XML string, and it might be better to use UTF-8 for that.
>
> We had recently a similar issue which we did not have unless we 
> changed to AXIS2-1.6.1
>
> Guess it has to do with Axiom version delivered with this release of 
> AXIS2.
>
> I strongly suggest to use TCP Monitor to look what you get back by the 
> sender which is
>
> in your case the service-response.
>
> How does the service return payload characters i.e. a "ä ö ü è é or > 
> < & %"
>
> and I think that will get you further.
>
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html
>
> let me know if it helps.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Montag, 19. März 2012 15:47
> *An:* java-user@axis.apache.org <ma...@axis.apache.org>
> *Betreff:* [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> Any advice on this please?
>
> -------- Original Message --------
>
> *Subject: *
>
> 	
>
> [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> *Date: *
>
> 	
>
> Thu, 23 Feb 2012 17:02:42 +0000
>
> *From: *
>
> 	
>
> Francisco Serrano <fr...@multicom.co.uk> 
> <ma...@multicom.co.uk>
>
> *To: *
>
> 	
>
> java-user@axis.apache.org <ma...@axis.apache.org>
>
> Hello,
>   
> I have an axis2 client generated from a WSDL, which is working fine but
> I'm having some problems since it's ignoring the charset specified in
> the response it's getting back.
>   
> The response specifies charset=UTF-8 in the Content-Type HTTP header and
> the same in the encoding parameter in the xml message.
>   
> Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1
> which is the one set for the JVM where the client is running. For this
> reason I'm getting some strange characters in the response. I've double
> checked that the characters are encoded correctly using UTF-8.
>   
> It's an old client generated with version 1.0. Does anybody know if
> there's some issue about that version regarding this problem? Are there
> any parameters to specify the charset to use to decode the response?
>   
> Best regards,
> Francisco.
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>
> -- 
> *Francisco Serrano*
> *Java Developer*
> *Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>
> imap://franciscos@mail0.core.mcom:993/fetch%3EUID%3E.INBOX%3E23781?header=quotebody&part=1.2&filename=image001.png
> *Tel:* 0117 908 1250
> *Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
> *Facebook:* www.facebook.com/multicomproductslimited 
> <http://www.facebook.com/multicomproductslimited>
> *Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
> *LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
> <http://www.linkedin.com/company/multicom-products-ltd>
>
> *www.multicom.co.uk* <http://www.multicom.co.uk>
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>
> -- 
> *Francisco Serrano*
> *Java Developer*
> *Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>
>
> *Tel:* 0117 908 1250
> *Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
> *Facebook:* www.facebook.com/multicomproductslimited 
> <http://www.facebook.com/multicomproductslimited>
> *Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
> *LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
> <http://www.linkedin.com/company/multicom-products-ltd>
>
> *www.multicom.co.uk* <http://www.multicom.co.uk>
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>
> -- 
> *Francisco Serrano*
> *Java Developer*
> *Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>
>
> *Tel:* 0117 908 1250
> *Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
> *Facebook:* www.facebook.com/multicomproductslimited 
> <http://www.facebook.com/multicomproductslimited>
> *Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
> *LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
> <http://www.linkedin.com/company/multicom-products-ltd>
>
> *www.multicom.co.uk* <http://www.multicom.co.uk>
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>

-- 
*Francisco Serrano*
*Java Developer*
*Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>

*Tel:* 0117 908 1250
*Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
*Facebook:* www.facebook.com/multicomproductslimited 
<http://www.facebook.com/multicomproductslimited>
*Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
*LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
<http://www.linkedin.com/company/multicom-products-ltd>

www.multicom.co.uk <http://www.multicom.co.uk>


-- 
Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS.

This email is confidential to the addressee and may contain privileged information.  If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party.  Unauthorised use or disclosure of this email is prohibited and may be unlawful.

We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system.

We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email.

Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks.

AW: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Hi Francisco,

 

OK - I have no clue about your project setup. 

Are you working with Maven and NetBeans? 

have you "mavenized" your project? 

 

maven allows to define dependencies i.e. for your client,  based on artifacts including the version, and this for each project / component (module). With maven you can define a common place for your artifacts like jar0's and pom's and other resources. local = ~/.m2/repository. 

 

The repository is where artifacts are stored, artifacts like the various versions of jar's and pom's. When a project or sub-project or a module depends on a given version of a jar, that is absolute no problem for maven to get it; You can populate your local repository at .m2/repository with what you want and have version controlled access to your artifacts. And if a given artifact with a given version exists but is not in your local repository, maven is so smart to download it for you from apache or vice versa. 

 

What I suggest is to make a real small client using maven and axis2-1.6.1 to see if the problem is fixed AND if the problem is fixed, then you know about a working solution; Then have your team decide how to best approach with the problem to back integrate the stub into your existing project.

 

Josef

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Donnerstag, 22. März 2012 12:30
An: java-user@axis.apache.org
Betreff: Re: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Hi Josef,

Thanks a lot for your help. 

When I said that my system was quite old I didn't mean that the PC or the environment is old but the projects I'm working on. AXIS2-1.0 is being used in many places and the libraries are in a common root project along with common classes etc, if I generate the client I'm working on with 1.6 I would also have to change the libraries in the root project and that might affect to the other clients/projects. 
I've tried to do it to see the impact but there are some classes that have changed for example I get an errors saying that getFirstChildWithName method is not in the response (I think this is related to Axiom).

Changing the libraries in the root project it's something that my team is not very keen on :(

Best regards,
Francisco.

On 22/03/2012 10:54, Stadelmann Josef wrote: 

Hi Francisco

 

That is what I have expected about. 

 

BUT

 

If you say you have a very old system, do you mean your PC where the client is run, is very old . . . 

can you give me an idea about your environment where you intend to run your client-code?

 

I need your 

HW

OS (Version / SP)

Java JDK Version

Application Server running (make and version) i.e. Tomcat 6.0.26 on JDK 1.6.0_30 using AXIS2-1.0 (very old)

 

NOW - install in parallel a second axis2.war !

 

AXIS2-1.0 as well as AXIS2-1.6.1 is just a servlet, as such you can install both at once

 

when you deploy axis2.war into /webapps while tomcat is running or after tomcat starts axis2-*.war is deployed, that is to say, a new directory is created under webapps/axis2

when you deploy your brand new downloaded axis2-1.6.1.war, deploy it to tomcat /webapps a new directory will be created under wepapps/axis2-1.6.1

download the binary kit of axis2-1.6.1 and install it - set AXIS2_HOME to this directory root; and enter %AXIS2_HOME%\bin; into your path 

- you need the tools not only the axis2-1.6.1 war

 

Then create your stub one more time - have wsdl2java  download/use the wsdl info from the remote web service http://remote:8080/axis2/services/yourservice?wsdl

compile and use your client AND

and I am nearly 90% confident that your encoding problems are gone.

 

Compared to writing an interceptor, this is a much faster smarter way to go, and you are not touching the rest of the system.

 

The new axis2-1.6.1 compared to your axis2-1.0 brings more than 6 years of enhancements to your system.

 

BUT

 

before you go for a INTERCEPTOR you may write the INTERCEPTOR as 

a client side engaged module or handler; for that to start with go for 

http://axis.apache.org/axis2/java/core/docs/Axis2ArchitectureGuide.html

 

In that handler you have control over what comes in and what is further 

returned to the client; that would be at least a smart clean approach, and

it would really payoff and foster, why at same time in the past, one has

selected AXIS2-1.0 (because it is extendable through phases, modules 

and handlers)

 

Josef

 

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Mittwoch, 21. März 2012 18:01
An: java-user@axis.apache.org
Betreff: Re: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Hi Josef,

Sorry for not being clear enough. The version I'm using is AXIS2 1.0 from 04 - May 2006 (http://axis.apache.org/axis2/java/core/download.cgi).

The web service I'm trying to communicate with is from an external company, so I've generated the client from their WSDL. About the version they're running I'm not sure...

I'm afraid I'm not able to change the AXIS2 version because the system in my company is quite old and will require lots of changes. Isn't there any option to specify the encoding for the incoming responses? Otherwise maybe I could create sort of an Interceptor to deal with the responses before they're delivered to the stub.

Best regards,
Francisco.

On 21/03/2012 14:26, Stadelmann Josef wrote: 

Hi Francisco

 

still unclear to me what you actually use.

 

You say you have an external server? what make and version of web service stack is running the service you like to work with?

What does the wsdl say when requested?

 

 

which version of axis(2) are you using?

AXIS2-1.0 or AXIS-1.0 or what? 

AXIS   is the old make of a web service stack

AXIS2 is the total new implementation of a web service engine.

each of the two has several versions. So which one are you using. 

 

When I started in 2006 I took the latest greatest version of AXIS2-1.2. 

Since then we have arrived at AXIS2-1.6.1 and more to come ...

 

Both axis versions are implemented in JAVA

But there is also a AXIS2/C version.

 

 

Both AXIS2/J and AXIS2/C have their AXIOM Library, 

a library which implements the AXIS2 Object Model 

which deals with SOAP/XML constructs and BTW, 

maybe with the problems you are faced with.

 

So are you using AXIS or AXIS2?

and what is the exact version of it?

 

And yes, I would upgrade. 

Generating the stub with the tool WSDL2JAVA isn't a big work 

AND it can happen that your problems are gone thereafter.

 

 

I would try the following. make a small example, client and server and send &#8211 which is the decimal of 2013 hex. Echo this back and see what you get. If you know what codes and code-pages you need you should do so in a iterative way, you generate the string into a string buffer and pass it to the stub to transmit this string I,e. "&#8211" your server shall return it and you take Wireshark or TCP Monitor to see what you get on the wire in both directions. If it leaves correct in one way and returns correct sequence in the response, and finally arrives wrong in your string buffer (for comparision), you know where your problem is. If you take AXIS2/J-1.6.1 and have no problem I would suggest to generate the stub again and use it. If your external service response badly you know where to ask for upgrading the service.

 

Josef

 

 

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Dienstag, 20. März 2012 15:25
An: java-user@axis.apache.org
Betreff: Re: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Hello Josef,

Thanks a lot for your reply.

The exact version I'm using is 1.0 and I can confirm that the stub is generated by WSDL2JAVA.

The problem is that from my client I'm using the stub to call an external service. The response from this service is using UTF8 to encode the content, I've checked with Wireshark the communications and messages and the response is specifying UTF8 and the problematic character (a dash) is correctly encoded with UTF8. The response specifies "text/xml; charset=utf-8" in the HTTP header and the xml message within it "<?xml version='1.0' encoding='utf-8'?>" and the character in the payload is specified as: e2 80 93 (UTF-8 (hex) representation for EN DASH: http://www.fileformat.info/info/unicode/char/2013/index.htm <http://www.fileformat.info/info/unicode/char/2013/index.htm> ).

But when the control comes back to my application, the stub is using ISO-8859-15 (which is the charset specified for my JVM) to decode that response so the response is showing incorrect characters for the dash, debugging the code I'm getting: â

According to http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html looks like before version 1.6 the encoding wasn't being taken into account in a reliable way...

Wouldn't be any other way to solve this rather than generating the client with a newer version?

Thanks,
Francisco.


On 20/03/2012 09:12, Stadelmann Josef wrote: 

Francisco

 

What is your exact version of AXIS2?

 

And just to be sure; are you creating a Java Client calling a stub generated by WSDL2JAVA?

 

Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 characters.

To transfer you need to escape certain characters before inserting it into your ISO-8859-1

XML string, and it might be better to use UTF-8 for that.

 

We had recently a similar issue which we did not have unless we changed to AXIS2-1.6.1

Guess it has to do with Axiom version delivered with this release of AXIS2.

 

I strongly suggest to use TCP Monitor to look what you get back by the sender which is

in your case the service-response.

 

How does the service return payload characters i.e. a "ä ö ü è é or > < & %"

 

and I think that will get you further.

http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html

 

 

let me know if it helps.

 

Josef

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Montag, 19. März 2012 15:47
An: java-user@axis.apache.org <ma...@axis.apache.org> 
Betreff: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Any advice on this please?

-------- Original Message -------- 

Subject: 

[Axis2] Axis2 client generated from WSDL ignoring encoding

Date: 

Thu, 23 Feb 2012 17:02:42 +0000

From: 

Francisco Serrano <fr...@multicom.co.uk> <ma...@multicom.co.uk> 

To: 

java-user@axis.apache.org

 

Hello,
 
I have an axis2 client generated from a WSDL, which is working fine but 
I'm having some problems since it's ignoring the charset specified in 
the response it's getting back.
 
The response specifies charset=UTF-8 in the Content-Type HTTP header and 
the same in the encoding parameter in the xml message.
 
Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1 
which is the one set for the JVM where the client is running. For this 
reason I'm getting some strange characters in the response. I've double 
checked that the characters are encoded correctly using UTF-8.
 
It's an old client generated with version 1.0. Does anybody know if 
there's some issue about that version regarding this problem? Are there 
any parameters to specify the charset to use to decode the response?
 
Best regards,
Francisco.

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 

 

-- 
Francisco Serrano
Java Developer
Email: franciscos@multicom.co.uk <ma...@multicom.co.uk> 
 
Tel: 0117 908 1250
Address: 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
Facebook: www.facebook.com/multicomproductslimited <http://www.facebook.com/multicomproductslimited> 
Twitter: @MulticomFAB <http://twitter.com/#%21/multicomfab> 
LinkedIn: www.linkedin.com/company/multicom-products-ltd <http://www.linkedin.com/company/multicom-products-ltd> 

www.multicom.co.uk <http://www.multicom.co.uk>  

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 

 

-- 
Francisco Serrano
Java Developer
Email: franciscos@multicom.co.uk <ma...@multicom.co.uk> 

Tel: 0117 908 1250
Address: 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
Facebook: www.facebook.com/multicomproductslimited <http://www.facebook.com/multicomproductslimited> 
Twitter: @MulticomFAB <http://twitter.com/#%21/multicomfab> 
LinkedIn: www.linkedin.com/company/multicom-products-ltd <http://www.linkedin.com/company/multicom-products-ltd> 

www.multicom.co.uk <http://www.multicom.co.uk>  

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 

 

-- 
Francisco Serrano
Java Developer
Email: franciscos@multicom.co.uk <ma...@multicom.co.uk> 

Tel: 0117 908 1250
Address: 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
Facebook: www.facebook.com/multicomproductslimited <http://www.facebook.com/multicomproductslimited> 
Twitter: @MulticomFAB <http://twitter.com/#%21/multicomfab> 
LinkedIn: www.linkedin.com/company/multicom-products-ltd <http://www.linkedin.com/company/multicom-products-ltd> 

www.multicom.co.uk <http://www.multicom.co.uk>  

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 


Re: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Francisco Serrano <fr...@multicom.co.uk>.
Hi Josef,

Thanks a lot for your help.

When I said that my system was quite old I didn't mean that the PC or 
the environment is old but the projects I'm working on. AXIS2-1.0 is 
being used in many places and the libraries are in a common root project 
along with common classes etc, if I generate the client I'm working on 
with 1.6 I would also have to change the libraries in the root project 
and that might affect to the other clients/projects.
I've tried to do it to see the impact but there are some classes that 
have changed for example I get an errors saying that 
getFirstChildWithName method is not in the response (I think this is 
related to Axiom).

Changing the libraries in the root project it's something that my team 
is not very keen on :(

Best regards,
Francisco.

On 22/03/2012 10:54, Stadelmann Josef wrote:
>
> Hi Francisco
>
> That is what I have expected about.
>
> BUT
>
> If you say you have a very old system, do you mean your PC where the 
> client is run, is very old . . .
>
> can you give me an idea about your environment where you intend to run 
> your client-code?
>
> I need your
>
> HW
>
> OS (Version / SP)
>
> Java JDK Version
>
> Application Server running (make and version) i.e. Tomcat 6.0.26 on 
> JDK 1.6.0_30 using AXIS2-1.0 (very old)
>
> NOW -- install in parallel a second axis2.war !
>
> AXIS2-1.0 as well as AXIS2-1.6.1 is just a servlet, as such you can 
> install both at once
>
> when you deploy axis2.war into /webapps while tomcat is running or 
> after tomcat starts axis2-*.war is deployed, that is to say, a new 
> directory is created under webapps/axis2
>
> when you deploy your brand new downloaded axis2-1.6.1.war, deploy it 
> to tomcat /webapps a new directory will be created under 
> wepapps/axis2-1.6.1
>
> download the binary kit of axis2-1.6.1 and install it -- set 
> AXIS2_HOME to this directory root; and enter %AXIS2_HOME%\bin; into 
> your path
>
> -- you need the tools not only the axis2-1.6.1 war
>
> Then create your stub one more time -- have wsdl2java  download/use 
> the wsdl info from the remote web service 
> http://remote:8080/axis2/services/yourservice?wsdl
>
> compile and use your client AND
>
> and I am nearly 90% confident that your encoding problems are gone.
>
> Compared to writing an interceptor, this is a much faster smarter way 
> to go, and you are not touching the rest of the system.
>
> The new axis2-1.6.1 compared to your axis2-1.0 brings more than 6 
> years of enhancements to your system.
>
> BUT
>
> before you go for a INTERCEPTOR you may write the INTERCEPTOR as
>
> a client side engaged module or handler; for that to start with go for
>
> http://axis.apache.org/axis2/java/core/docs/Axis2ArchitectureGuide.html
>
> In that handler you have control over what comes in and what is further
>
> returned to the client; that would be at least a smart clean approach, and
>
> it would really payoff and foster, why at same time in the past, one has
>
> selected AXIS2-1.0 (because it is extendable through phases, modules
>
> and handlers)
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Mittwoch, 21. März 2012 18:01
> *An:* java-user@axis.apache.org
> *Betreff:* Re: [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> Hi Josef,
>
> Sorry for not being clear enough. The version I'm using is AXIS2 1.0 
> from 04 - May 2006 (http://axis.apache.org/axis2/java/core/download.cgi).
>
> The web service I'm trying to communicate with is from an external 
> company, so I've generated the client from their WSDL. About the 
> version they're running I'm not sure...
>
> I'm afraid I'm not able to change the AXIS2 version because the system 
> in my company is quite old and will require lots of changes. Isn't 
> there any option to specify the encoding for the incoming responses? 
> Otherwise maybe I could create sort of an Interceptor to deal with the 
> responses before they're delivered to the stub.
>
> Best regards,
> Francisco.
>
> On 21/03/2012 14:26, Stadelmann Josef wrote:
>
> Hi Francisco
>
> still unclear to me what you actually use.
>
> You say you have an external server? what make and version of web 
> service stack is running the service you like to work with?
>
> What does the wsdl say when requested?
>
> which version of axis(2) are you using?
>
> AXIS2-1.0 or AXIS-1.0 or what?
>
> AXIS   is the old make of a web service stack
>
> AXIS2 is the total new implementation of a web service engine.
>
> each of the two has several versions. So which one are you using.
>
> When I started in 2006 I took the latest greatest version of AXIS2-1.2.
>
> Since then we have arrived at AXIS2-1.6.1 and more to come ...
>
> Both axis versions are implemented in JAVA
>
> But there is also a AXIS2/C version.
>
> Both AXIS2/J and AXIS2/C have their AXIOM Library,
>
> a library which implements the AXIS2 Object Model
>
> which deals with SOAP/XML constructs and BTW,
>
> maybe with the problems you are faced with.
>
> So are you using AXIS or AXIS2?
>
> and what is the exact version of it?
>
> And yes, I would upgrade.
>
> Generating the stub with the tool WSDL2JAVA isn't a big work
>
> AND it can happen that your problems are gone thereafter.
>
> I would try the following. make a small example, client and server and 
> send &#8211 which is the decimal of 2013 hex. Echo this back and see 
> what you get. If you know what codes and code-pages you need you 
> should do so in a iterative way, you generate the string into a string 
> buffer and pass it to the stub to transmit this string I,e. "&#8211" 
> your server shall return it and you take Wireshark or TCP Monitor to 
> see what you get on the wire in both directions. If it leaves correct 
> in one way and returns correct sequence in the response, and finally 
> arrives wrong in your string buffer (for comparision), you know where 
> your problem is. If you take AXIS2/J-1.6.1 and have no problem I would 
> suggest to generate the stub again and use it. If your external 
> service response badly you know where to ask for upgrading the service.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Dienstag, 20. März 2012 15:25
> *An:* java-user@axis.apache.org <ma...@axis.apache.org>
> *Betreff:* Re: AW: [Axis2] Axis2 client generated from WSDL ignoring 
> encoding
>
> Hello Josef,
>
> Thanks a lot for your reply.
>
> The exact version I'm using is 1.0 and I can confirm that the stub is 
> generated by WSDL2JAVA.
>
> The problem is that from my client I'm using the stub to call an 
> external service. The response from this service is using UTF8 to 
> encode the content, I've checked with Wireshark the communications and 
> messages and the response is specifying UTF8 and the problematic 
> character (a dash) is correctly encoded with UTF8. The response 
> specifies "text/xml; charset=utf-8" in the HTTP header and the xml 
> message within it "<?xml version='1.0' encoding='utf-8'?>" and the 
> character in the payload is specified as: e2 80 93 (UTF-8 (hex) 
> representation for EN DASH: 
> http://www.fileformat.info/info/unicode/char/2013/index.htm).
>
> But when the control comes back to my application, the stub is using 
> ISO-8859-15 (which is the charset specified for my JVM) to decode that 
> response so the response is showing incorrect characters for the dash, 
> debugging the code I'm getting: â
>
> According to 
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.htmllooks 
> like before version 1.6 the encoding wasn't being taken into account 
> in a reliable way...
>
> Wouldn't be any other way to solve this rather than generating the 
> client with a newer version?
>
> Thanks,
> Francisco.
>
>
> On 20/03/2012 09:12, Stadelmann Josef wrote:
>
> Francisco
>
> What is your exact version of AXIS2?
>
> And just to be sure; are you creating a Java Client calling a stub 
> generated by WSDL2JAVA?
>
> Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 
> characters.
>
> To transfer you need to escape certain characters before inserting it 
> into your ISO-8859-1
>
> XML string, and it might be better to use UTF-8 for that.
>
> We had recently a similar issue which we did not have unless we 
> changed to AXIS2-1.6.1
>
> Guess it has to do with Axiom version delivered with this release of 
> AXIS2.
>
> I strongly suggest to use TCP Monitor to look what you get back by the 
> sender which is
>
> in your case the service-response.
>
> How does the service return payload characters i.e. a "ä ö ü è é or > 
> < & %"
>
> and I think that will get you further.
>
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html
>
> let me know if it helps.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Montag, 19. März 2012 15:47
> *An:* java-user@axis.apache.org <ma...@axis.apache.org>
> *Betreff:* [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> Any advice on this please?
>
> -------- Original Message --------
>
> *Subject: *
>
> 	
>
> [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> *Date: *
>
> 	
>
> Thu, 23 Feb 2012 17:02:42 +0000
>
> *From: *
>
> 	
>
> Francisco Serrano <fr...@multicom.co.uk> 
> <ma...@multicom.co.uk>
>
> *To: *
>
> 	
>
> java-user@axis.apache.org <ma...@axis.apache.org>
>
> Hello,
>   
> I have an axis2 client generated from a WSDL, which is working fine but
> I'm having some problems since it's ignoring the charset specified in
> the response it's getting back.
>   
> The response specifies charset=UTF-8 in the Content-Type HTTP header and
> the same in the encoding parameter in the xml message.
>   
> Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1
> which is the one set for the JVM where the client is running. For this
> reason I'm getting some strange characters in the response. I've double
> checked that the characters are encoded correctly using UTF-8.
>   
> It's an old client generated with version 1.0. Does anybody know if
> there's some issue about that version regarding this problem? Are there
> any parameters to specify the charset to use to decode the response?
>   
> Best regards,
> Francisco.
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>
> -- 
> *Francisco Serrano*
> *Java Developer*
> *Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>
> imap://franciscos@mail0.core.mcom:993/fetch%3EUID%3E.INBOX%3E23781?header=quotebody&part=1.2&filename=image001.png
> *Tel:* 0117 908 1250
> *Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
> *Facebook:* www.facebook.com/multicomproductslimited 
> <http://www.facebook.com/multicomproductslimited>
> *Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
> *LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
> <http://www.linkedin.com/company/multicom-products-ltd>
>
> *www.multicom.co.uk* <http://www.multicom.co.uk>
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>
> -- 
> *Francisco Serrano*
> *Java Developer*
> *Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>
>
> *Tel:* 0117 908 1250
> *Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
> *Facebook:* www.facebook.com/multicomproductslimited 
> <http://www.facebook.com/multicomproductslimited>
> *Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
> *LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
> <http://www.linkedin.com/company/multicom-products-ltd>
>
> *www.multicom.co.uk* <http://www.multicom.co.uk>
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>

-- 
*Francisco Serrano*
*Java Developer*
*Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>

*Tel:* 0117 908 1250
*Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
*Facebook:* www.facebook.com/multicomproductslimited 
<http://www.facebook.com/multicomproductslimited>
*Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
*LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
<http://www.linkedin.com/company/multicom-products-ltd>

www.multicom.co.uk <http://www.multicom.co.uk>


-- 
Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS.

This email is confidential to the addressee and may contain privileged information.  If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party.  Unauthorised use or disclosure of this email is prohibited and may be unlawful.

We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system.

We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email.

Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks.

AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Hi Francisco

 

That is what I have expected about. 

 

BUT

 

If you say you have a very old system, do you mean your PC where the client is run, is very old . . . 

can you give me an idea about your environment where you intend to run your client-code?

 

I need your 

HW

OS (Version / SP)

Java JDK Version

Application Server running (make and version) i.e. Tomcat 6.0.26 on JDK 1.6.0_30 using AXIS2-1.0 (very old)

 

NOW - install in parallel a second axis2.war !

 

AXIS2-1.0 as well as AXIS2-1.6.1 is just a servlet, as such you can install both at once

 

when you deploy axis2.war into /webapps while tomcat is running or after tomcat starts axis2-*.war is deployed, that is to say, a new directory is created under webapps/axis2

when you deploy your brand new downloaded axis2-1.6.1.war, deploy it to tomcat /webapps a new directory will be created under wepapps/axis2-1.6.1

download the binary kit of axis2-1.6.1 and install it - set AXIS2_HOME to this directory root; and enter %AXIS2_HOME%\bin; into your path 

- you need the tools not only the axis2-1.6.1 war

 

Then create your stub one more time - have wsdl2java  download/use the wsdl info from the remote web service http://remote:8080/axis2/services/yourservice?wsdl

compile and use your client AND

and I am nearly 90% confident that your encoding problems are gone.

 

Compared to writing an interceptor, this is a much faster smarter way to go, and you are not touching the rest of the system.

 

The new axis2-1.6.1 compared to your axis2-1.0 brings more than 6 years of enhancements to your system.

 

BUT

 

before you go for a INTERCEPTOR you may write the INTERCEPTOR as 

a client side engaged module or handler; for that to start with go for 

http://axis.apache.org/axis2/java/core/docs/Axis2ArchitectureGuide.html

 

In that handler you have control over what comes in and what is further 

returned to the client; that would be at least a smart clean approach, and

it would really payoff and foster, why at same time in the past, one has

selected AXIS2-1.0 (because it is extendable through phases, modules 

and handlers)

 

Josef

 

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Mittwoch, 21. März 2012 18:01
An: java-user@axis.apache.org
Betreff: Re: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Hi Josef,

Sorry for not being clear enough. The version I'm using is AXIS2 1.0 from 04 - May 2006 (http://axis.apache.org/axis2/java/core/download.cgi).

The web service I'm trying to communicate with is from an external company, so I've generated the client from their WSDL. About the version they're running I'm not sure...

I'm afraid I'm not able to change the AXIS2 version because the system in my company is quite old and will require lots of changes. Isn't there any option to specify the encoding for the incoming responses? Otherwise maybe I could create sort of an Interceptor to deal with the responses before they're delivered to the stub.

Best regards,
Francisco.

On 21/03/2012 14:26, Stadelmann Josef wrote: 

Hi Francisco

 

still unclear to me what you actually use.

 

You say you have an external server? what make and version of web service stack is running the service you like to work with?

What does the wsdl say when requested?

 

 

which version of axis(2) are you using?

AXIS2-1.0 or AXIS-1.0 or what? 

AXIS   is the old make of a web service stack

AXIS2 is the total new implementation of a web service engine.

each of the two has several versions. So which one are you using. 

 

When I started in 2006 I took the latest greatest version of AXIS2-1.2. 

Since then we have arrived at AXIS2-1.6.1 and more to come ...

 

Both axis versions are implemented in JAVA

But there is also a AXIS2/C version.

 

 

Both AXIS2/J and AXIS2/C have their AXIOM Library, 

a library which implements the AXIS2 Object Model 

which deals with SOAP/XML constructs and BTW, 

maybe with the problems you are faced with.

 

So are you using AXIS or AXIS2?

and what is the exact version of it?

 

And yes, I would upgrade. 

Generating the stub with the tool WSDL2JAVA isn't a big work 

AND it can happen that your problems are gone thereafter.

 

 

I would try the following. make a small example, client and server and send &#8211 which is the decimal of 2013 hex. Echo this back and see what you get. If you know what codes and code-pages you need you should do so in a iterative way, you generate the string into a string buffer and pass it to the stub to transmit this string I,e. "&#8211" your server shall return it and you take Wireshark or TCP Monitor to see what you get on the wire in both directions. If it leaves correct in one way and returns correct sequence in the response, and finally arrives wrong in your string buffer (for comparision), you know where your problem is. If you take AXIS2/J-1.6.1 and have no problem I would suggest to generate the stub again and use it. If your external service response badly you know where to ask for upgrading the service.

 

Josef

 

 

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Dienstag, 20. März 2012 15:25
An: java-user@axis.apache.org
Betreff: Re: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Hello Josef,

Thanks a lot for your reply.

The exact version I'm using is 1.0 and I can confirm that the stub is generated by WSDL2JAVA.

The problem is that from my client I'm using the stub to call an external service. The response from this service is using UTF8 to encode the content, I've checked with Wireshark the communications and messages and the response is specifying UTF8 and the problematic character (a dash) is correctly encoded with UTF8. The response specifies "text/xml; charset=utf-8" in the HTTP header and the xml message within it "<?xml version='1.0' encoding='utf-8'?>" and the character in the payload is specified as: e2 80 93 (UTF-8 (hex) representation for EN DASH: http://www.fileformat.info/info/unicode/char/2013/index.htm <http://www.fileformat.info/info/unicode/char/2013/index.htm> ).

But when the control comes back to my application, the stub is using ISO-8859-15 (which is the charset specified for my JVM) to decode that response so the response is showing incorrect characters for the dash, debugging the code I'm getting: â

According to http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html looks like before version 1.6 the encoding wasn't being taken into account in a reliable way...

Wouldn't be any other way to solve this rather than generating the client with a newer version?

Thanks,
Francisco.


On 20/03/2012 09:12, Stadelmann Josef wrote: 

Francisco

 

What is your exact version of AXIS2?

 

And just to be sure; are you creating a Java Client calling a stub generated by WSDL2JAVA?

 

Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 characters.

To transfer you need to escape certain characters before inserting it into your ISO-8859-1

XML string, and it might be better to use UTF-8 for that.

 

We had recently a similar issue which we did not have unless we changed to AXIS2-1.6.1

Guess it has to do with Axiom version delivered with this release of AXIS2.

 

I strongly suggest to use TCP Monitor to look what you get back by the sender which is

in your case the service-response.

 

How does the service return payload characters i.e. a "ä ö ü è é or > < & %"

 

and I think that will get you further.

http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html

 

 

let me know if it helps.

 

Josef

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Montag, 19. März 2012 15:47
An: java-user@axis.apache.org <ma...@axis.apache.org> 
Betreff: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Any advice on this please?

-------- Original Message -------- 

Subject: 

[Axis2] Axis2 client generated from WSDL ignoring encoding

Date: 

Thu, 23 Feb 2012 17:02:42 +0000

From: 

Francisco Serrano <fr...@multicom.co.uk> <ma...@multicom.co.uk> 

To: 

java-user@axis.apache.org

 

Hello,
 
I have an axis2 client generated from a WSDL, which is working fine but 
I'm having some problems since it's ignoring the charset specified in 
the response it's getting back.
 
The response specifies charset=UTF-8 in the Content-Type HTTP header and 
the same in the encoding parameter in the xml message.
 
Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1 
which is the one set for the JVM where the client is running. For this 
reason I'm getting some strange characters in the response. I've double 
checked that the characters are encoded correctly using UTF-8.
 
It's an old client generated with version 1.0. Does anybody know if 
there's some issue about that version regarding this problem? Are there 
any parameters to specify the charset to use to decode the response?
 
Best regards,
Francisco.

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 

 

-- 
Francisco Serrano
Java Developer
Email: franciscos@multicom.co.uk <ma...@multicom.co.uk> 
 
Tel: 0117 908 1250
Address: 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
Facebook: www.facebook.com/multicomproductslimited <http://www.facebook.com/multicomproductslimited> 
Twitter: @MulticomFAB <http://twitter.com/#%21/multicomfab> 
LinkedIn: www.linkedin.com/company/multicom-products-ltd <http://www.linkedin.com/company/multicom-products-ltd> 

www.multicom.co.uk <http://www.multicom.co.uk>  

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 

 

-- 
Francisco Serrano
Java Developer
Email: franciscos@multicom.co.uk <ma...@multicom.co.uk> 

Tel: 0117 908 1250
Address: 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
Facebook: www.facebook.com/multicomproductslimited <http://www.facebook.com/multicomproductslimited> 
Twitter: @MulticomFAB <http://twitter.com/#%21/multicomfab> 
LinkedIn: www.linkedin.com/company/multicom-products-ltd <http://www.linkedin.com/company/multicom-products-ltd> 

www.multicom.co.uk <http://www.multicom.co.uk>  

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 


Re: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Francisco Serrano <fr...@multicom.co.uk>.
Hi Josef,

Sorry for not being clear enough. The version I'm using is AXIS2 1.0 
from 04 - May 2006 (http://axis.apache.org/axis2/java/core/download.cgi).

The web service I'm trying to communicate with is from an external 
company, so I've generated the client from their WSDL. About the version 
they're running I'm not sure...

I'm afraid I'm not able to change the AXIS2 version because the system 
in my company is quite old and will require lots of changes. Isn't there 
any option to specify the encoding for the incoming responses? Otherwise 
maybe I could create sort of an Interceptor to deal with the responses 
before they're delivered to the stub.

Best regards,
Francisco.

On 21/03/2012 14:26, Stadelmann Josef wrote:
>
> Hi Francisco
>
> still unclear to me what you actually use.
>
> You say you have an external server? what make and version of web 
> service stack is running the service you like to work with?
>
> What does the wsdl say when requested?
>
> which version of axis(2) are you using?
>
> AXIS2-1.0 or AXIS-1.0 or what?
>
> AXIS   is the old make of a web service stack
>
> AXIS2 is the total new implementation of a web service engine.
>
> each of the two has several versions. So which one are you using.
>
> When I started in 2006 I took the latest greatest version of AXIS2-1.2.
>
> Since then we have arrived at AXIS2-1.6.1 and more to come ...
>
> Both axis versions are implemented in JAVA
>
> But there is also a AXIS2/C version.
>
> Both AXIS2/J and AXIS2/C have their AXIOM Library,
>
> a library which implements the AXIS2 Object Model
>
> which deals with SOAP/XML constructs and BTW,
>
> maybe with the problems you are faced with.
>
> So are you using AXIS or AXIS2?
>
> and what is the exact version of it?
>
> And yes, I would upgrade.
>
> Generating the stub with the tool WSDL2JAVA isn't a big work
>
> AND it can happen that your problems are gone thereafter.
>
> I would try the following. make a small example, client and server and 
> send &#8211 which is the decimal of 2013 hex. Echo this back and see 
> what you get. If you know what codes and code-pages you need you 
> should do so in a iterative way, you generate the string into a string 
> buffer and pass it to the stub to transmit this string I,e. "&#8211" 
> your server shall return it and you take Wireshark or TCP Monitor to 
> see what you get on the wire in both directions. If it leaves correct 
> in one way and returns correct sequence in the response, and finally 
> arrives wrong in your string buffer (for comparision), you know where 
> your problem is. If you take AXIS2/J-1.6.1 and have no problem I would 
> suggest to generate the stub again and use it. If your external 
> service response badly you know where to ask for upgrading the service.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Dienstag, 20. März 2012 15:25
> *An:* java-user@axis.apache.org
> *Betreff:* Re: AW: [Axis2] Axis2 client generated from WSDL ignoring 
> encoding
>
> Hello Josef,
>
> Thanks a lot for your reply.
>
> The exact version I'm using is 1.0 and I can confirm that the stub is 
> generated by WSDL2JAVA.
>
> The problem is that from my client I'm using the stub to call an 
> external service. The response from this service is using UTF8 to 
> encode the content, I've checked with Wireshark the communications and 
> messages and the response is specifying UTF8 and the problematic 
> character (a dash) is correctly encoded with UTF8. The response 
> specifies "text/xml; charset=utf-8" in the HTTP header and the xml 
> message within it "<?xml version='1.0' encoding='utf-8'?>" and the 
> character in the payload is specified as: e2 80 93 (UTF-8 (hex) 
> representation for EN DASH: 
> http://www.fileformat.info/info/unicode/char/2013/index.htm).
>
> But when the control comes back to my application, the stub is using 
> ISO-8859-15 (which is the charset specified for my JVM) to decode that 
> response so the response is showing incorrect characters for the dash, 
> debugging the code I'm getting: â
>
> According to 
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.htmllooks 
> like before version 1.6 the encoding wasn't being taken into account 
> in a reliable way...
>
> Wouldn't be any other way to solve this rather than generating the 
> client with a newer version?
>
> Thanks,
> Francisco.
>
>
> On 20/03/2012 09:12, Stadelmann Josef wrote:
>
> Francisco
>
> What is your exact version of AXIS2?
>
> And just to be sure; are you creating a Java Client calling a stub 
> generated by WSDL2JAVA?
>
> Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 
> characters.
>
> To transfer you need to escape certain characters before inserting it 
> into your ISO-8859-1
>
> XML string, and it might be better to use UTF-8 for that.
>
> We had recently a similar issue which we did not have unless we 
> changed to AXIS2-1.6.1
>
> Guess it has to do with Axiom version delivered with this release of 
> AXIS2.
>
> I strongly suggest to use TCP Monitor to look what you get back by the 
> sender which is
>
> in your case the service-response.
>
> How does the service return payload characters i.e. a "ä ö ü è é or > 
> < & %"
>
> and I think that will get you further.
>
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html
>
> let me know if it helps.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Montag, 19. März 2012 15:47
> *An:* java-user@axis.apache.org <ma...@axis.apache.org>
> *Betreff:* [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> Any advice on this please?
>
> -------- Original Message --------
>
> *Subject: *
>
> 	
>
> [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> *Date: *
>
> 	
>
> Thu, 23 Feb 2012 17:02:42 +0000
>
> *From: *
>
> 	
>
> Francisco Serrano <fr...@multicom.co.uk> 
> <ma...@multicom.co.uk>
>
> *To: *
>
> 	
>
> java-user@axis.apache.org <ma...@axis.apache.org>
>
> Hello,
>   
> I have an axis2 client generated from a WSDL, which is working fine but
> I'm having some problems since it's ignoring the charset specified in
> the response it's getting back.
>   
> The response specifies charset=UTF-8 in the Content-Type HTTP header and
> the same in the encoding parameter in the xml message.
>   
> Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1
> which is the one set for the JVM where the client is running. For this
> reason I'm getting some strange characters in the response. I've double
> checked that the characters are encoded correctly using UTF-8.
>   
> It's an old client generated with version 1.0. Does anybody know if
> there's some issue about that version regarding this problem? Are there
> any parameters to specify the charset to use to decode the response?
>   
> Best regards,
> Francisco.
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>
> -- 
> *Francisco Serrano*
> *Java Developer*
> *Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>
> imap://franciscos@mail0.core.mcom:993/fetch%3EUID%3E.INBOX%3E23781?header=quotebody&part=1.2&filename=image001.png
> *Tel:* 0117 908 1250
> *Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
> *Facebook:* www.facebook.com/multicomproductslimited 
> <http://www.facebook.com/multicomproductslimited>
> *Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
> *LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
> <http://www.linkedin.com/company/multicom-products-ltd>
>
> *www.multicom.co.uk* <http://www.multicom.co.uk>
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>

-- 
*Francisco Serrano*
*Java Developer*
*Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>

*Tel:* 0117 908 1250
*Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
*Facebook:* www.facebook.com/multicomproductslimited 
<http://www.facebook.com/multicomproductslimited>
*Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
*LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
<http://www.linkedin.com/company/multicom-products-ltd>

www.multicom.co.uk <http://www.multicom.co.uk>


-- 
Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS.

This email is confidential to the addressee and may contain privileged information.  If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party.  Unauthorised use or disclosure of this email is prohibited and may be unlawful.

We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system.

We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email.

Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks.

[Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Hi Francisco

 

still unclear to me what you actually use.

 

You say you have an external server? what make and version of web service stack is running the service you like to work with?

What does the wsdl say when requested?

 

 

which version of axis(2) are you using?

AXIS2-1.0 or AXIS-1.0 or what? 

AXIS   is the old make of a web service stack

AXIS2 is the total new implementation of a web service engine.

each of the two has several versions. So which one are you using. 

 

When I started in 2006 I took the latest greatest version of AXIS2-1.2. 

Since then we have arrived at AXIS2-1.6.1 and more to come ...

 

Both axis versions are implemented in JAVA

But there is also a AXIS2/C version.

 

 

Both AXIS2/J and AXIS2/C have their AXIOM Library, 

a library which implements the AXIS2 Object Model 

which deals with SOAP/XML constructs and BTW, 

maybe with the problems you are faced with.

 

So are you using AXIS or AXIS2?

and what is the exact version of it?

 

And yes, I would upgrade. 

Generating the stub with the tool WSDL2JAVA isn't a big work 

AND it can happen that your problems are gone thereafter.

 

 

I would try the following. make a small example, client and server and send &#8211 which is the decimal of 2013 hex. Echo this back and see what you get. If you know what codes and code-pages you need you should do so in a iterative way, you generate the string into a string buffer and pass it to the stub to transmit this string I,e. "&#8211" your server shall return it and you take Wireshark or TCP Monitor to see what you get on the wire in both directions. If it leaves correct in one way and returns correct sequence in the response, and finally arrives wrong in your string buffer (for comparision), you know where your problem is. If you take AXIS2/J-1.6.1 and have no problem I would suggest to generate the stub again and use it. If your external service response badly you know where to ask for upgrading the service.

 

Josef

 

 

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Dienstag, 20. März 2012 15:25
An: java-user@axis.apache.org
Betreff: Re: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Hello Josef,

Thanks a lot for your reply.

The exact version I'm using is 1.0 and I can confirm that the stub is generated by WSDL2JAVA.

The problem is that from my client I'm using the stub to call an external service. The response from this service is using UTF8 to encode the content, I've checked with Wireshark the communications and messages and the response is specifying UTF8 and the problematic character (a dash) is correctly encoded with UTF8. The response specifies "text/xml; charset=utf-8" in the HTTP header and the xml message within it "<?xml version='1.0' encoding='utf-8'?>" and the character in the payload is specified as: e2 80 93 (UTF-8 (hex) representation for EN DASH: http://www.fileformat.info/info/unicode/char/2013/index.htm <http://www.fileformat.info/info/unicode/char/2013/index.htm> ).

But when the control comes back to my application, the stub is using ISO-8859-15 (which is the charset specified for my JVM) to decode that response so the response is showing incorrect characters for the dash, debugging the code I'm getting: â

According to http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html looks like before version 1.6 the encoding wasn't being taken into account in a reliable way...

Wouldn't be any other way to solve this rather than generating the client with a newer version?

Thanks,
Francisco.


On 20/03/2012 09:12, Stadelmann Josef wrote: 

Francisco

 

What is your exact version of AXIS2?

 

And just to be sure; are you creating a Java Client calling a stub generated by WSDL2JAVA?

 

Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 characters.

To transfer you need to escape certain characters before inserting it into your ISO-8859-1

XML string, and it might be better to use UTF-8 for that.

 

We had recently a similar issue which we did not have unless we changed to AXIS2-1.6.1

Guess it has to do with Axiom version delivered with this release of AXIS2.

 

I strongly suggest to use TCP Monitor to look what you get back by the sender which is

in your case the service-response.

 

How does the service return payload characters i.e. a "ä ö ü è é or > < & %"

 

and I think that will get you further.

http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html

 

 

let me know if it helps.

 

Josef

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Montag, 19. März 2012 15:47
An: java-user@axis.apache.org <ma...@axis.apache.org> 
Betreff: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Any advice on this please?

-------- Original Message -------- 

Subject: 

[Axis2] Axis2 client generated from WSDL ignoring encoding

Date: 

Thu, 23 Feb 2012 17:02:42 +0000

From: 

Francisco Serrano <fr...@multicom.co.uk> <ma...@multicom.co.uk> 

To: 

java-user@axis.apache.org

 

Hello,
 
I have an axis2 client generated from a WSDL, which is working fine but 
I'm having some problems since it's ignoring the charset specified in 
the response it's getting back.
 
The response specifies charset=UTF-8 in the Content-Type HTTP header and 
the same in the encoding parameter in the xml message.
 
Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1 
which is the one set for the JVM where the client is running. For this 
reason I'm getting some strange characters in the response. I've double 
checked that the characters are encoded correctly using UTF-8.
 
It's an old client generated with version 1.0. Does anybody know if 
there's some issue about that version regarding this problem? Are there 
any parameters to specify the charset to use to decode the response?
 
Best regards,
Francisco.

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 

 

-- 
Francisco Serrano
Java Developer
Email: franciscos@multicom.co.uk <ma...@multicom.co.uk> 
 
Tel: 0117 908 1250
Address: 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
Facebook: www.facebook.com/multicomproductslimited <http://www.facebook.com/multicomproductslimited> 
Twitter: @MulticomFAB <http://twitter.com/#%21/multicomfab> 
LinkedIn: www.linkedin.com/company/multicom-products-ltd <http://www.linkedin.com/company/multicom-products-ltd> 

www.multicom.co.uk <http://www.multicom.co.uk>  

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks. 

 


Request is not received at Axis2 SERVIVE

Posted by Dipesh Garg <di...@erevmax.com>.
Hi,

 

I have written a axis2 1.4 web service which receive a request and modify
that request and make a soap message and  send it to another axis 2 1.4
service using operation client. 

 If load is less say in the range of 30000-40000 it will work fine , but
when request will increase , from first service request will sent to second
service , but  second service receive that request after a long time say
after 1 hour . I think request will stay in queue and wait for other 

 

Is there any setting for Operation client so that we can fix that issue?

 

 

Thanks in advance

 

Dipesh 


Re: AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Francisco Serrano <fr...@multicom.co.uk>.
Hello Josef,

Thanks a lot for your reply.

The exact version I'm using is 1.0 and I can confirm that the stub is 
generated by WSDL2JAVA.

The problem is that from my client I'm using the stub to call an 
external service. The response from this service is using UTF8 to encode 
the content, I've checked with Wireshark the communications and messages 
and the response is specifying UTF8 and the problematic character (a 
dash) is correctly encoded with UTF8. The response specifies "text/xml; 
charset=utf-8" in the HTTP header and the xml message within it "<?xml 
version='1.0' encoding='utf-8'?>" and the character in the payload is 
specified as: e2 80 93 (UTF-8 (hex) representation for EN DASH: 
http://www.fileformat.info/info/unicode/char/2013/index.htm).

But when the control comes back to my application, the stub is using 
ISO-8859-15 (which is the charset specified for my JVM) to decode that 
response so the response is showing incorrect characters for the dash, 
debugging the code I'm getting: â

According to 
http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html looks 
like before version 1.6 the encoding wasn't being taken into account in 
a reliable way...

Wouldn't be any other way to solve this rather than generating the 
client with a newer version?

Thanks,
Francisco.


On 20/03/2012 09:12, Stadelmann Josef wrote:
>
> Francisco
>
> What is your exact version of AXIS2?
>
> And just to be sure; are you creating a Java Client calling a stub 
> generated by WSDL2JAVA?
>
> Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 
> characters.
>
> To transfer you need to escape certain characters before inserting it 
> into your ISO-8859-1
>
> XML string, and it might be better to use UTF-8 for that.
>
> We had recently a similar issue which we did not have unless we 
> changed to AXIS2-1.6.1
>
> Guess it has to do with Axiom version delivered with this release of 
> AXIS2.
>
> I strongly suggest to use TCP Monitor to look what you get back by the 
> sender which is
>
> in your case the service-response.
>
> How does the service return payload characters i.e. a "ä ö ü è é or > 
> < & %"
>
> and I think that will get you further.
>
> http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html
>
> let me know if it helps.
>
> Josef
>
> *Von:*Francisco Serrano [mailto:francisco.serrano@multicom.co.uk]
> *Gesendet:* Montag, 19. März 2012 15:47
> *An:* java-user@axis.apache.org
> *Betreff:* [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> Any advice on this please?
>
> -------- Original Message --------
>
> *Subject: *
>
> 	
>
> [Axis2] Axis2 client generated from WSDL ignoring encoding
>
> *Date: *
>
> 	
>
> Thu, 23 Feb 2012 17:02:42 +0000
>
> *From: *
>
> 	
>
> Francisco Serrano <fr...@multicom.co.uk> 
> <ma...@multicom.co.uk>
>
> *To: *
>
> 	
>
> java-user@axis.apache.org <ma...@axis.apache.org>
>
> Hello,
>   
> I have an axis2 client generated from a WSDL, which is working fine but
> I'm having some problems since it's ignoring the charset specified in
> the response it's getting back.
>   
> The response specifies charset=UTF-8 in the Content-Type HTTP header and
> the same in the encoding parameter in the xml message.
>   
> Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1
> which is the one set for the JVM where the client is running. For this
> reason I'm getting some strange characters in the response. I've double
> checked that the characters are encoded correctly using UTF-8.
>   
> It's an old client generated with version 1.0. Does anybody know if
> there's some issue about that version regarding this problem? Are there
> any parameters to specify the charset to use to decode the response?
>   
> Best regards,
> Francisco.
>
> Multicom Products Limited is a company registered in England and Wales 
> (Registered Number 2447353 Wales) with its registered office at 33 
> Victoria Street, Bristol, BS1 6AS.
> This email is confidential to the addressee and may contain privileged 
> information. If you have reason to believe that you are not the 
> intended recipient of this communication, please delete it from your 
> system and contact the sender immediately. You are not permitted to 
> use or copy this email or its attachments nor may you disclose the 
> same to any third party. Unauthorised use or disclosure of this email 
> is prohibited and may be unlawful.
> We reserve the right to intercept and read emails sent or received by 
> our employees. This is to ensure compliance with our internal policies 
> and to protect our business. If you do not wish for your 
> communications to be subjected to such scrutiny, you should not 
> communicate via this email system.
> We endeavour to exclude viruses and other malware from our data but it 
> is the responsibility of the recipient to scan all emails and 
> attachments for viruses before opening them. We accept no liability 
> for any damage caused by any virus transmitted by this email.
> Email may not be completely secure or error free, can be intercepted 
> or corrupted and may arrive late or not at all. Anyone who 
> communicates with us by email accepts these risks.
>

-- 
*Francisco Serrano*
*Java Developer*
*Email:* franciscos@multicom.co.uk <ma...@multicom.co.uk>

*Tel:* 0117 908 1250
*Address:* 33 Victoria St. 2nd Floor, Bristol, BS1 6AS
*Facebook:* www.facebook.com/multicomproductslimited 
<http://www.facebook.com/multicomproductslimited>
*Twitter:* @MulticomFAB <http://twitter.com/#%21/multicomfab>
*LinkedIn:* www.linkedin.com/company/multicom-products-ltd 
<http://www.linkedin.com/company/multicom-products-ltd>

www.multicom.co.uk <http://www.multicom.co.uk>


-- 
Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS.

This email is confidential to the addressee and may contain privileged information.  If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party.  Unauthorised use or disclosure of this email is prohibited and may be unlawful.

We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system.

We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email.

Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks.

AW: [Axis2] Axis2 client generated from WSDL ignoring encoding

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Francisco

 

What is your exact version of AXIS2?

 

And just to be sure; are you creating a Java Client calling a stub generated by WSDL2JAVA?

 

Are you using SOAP-XML over HTTP? THEN XML cannot keep all ISO-8859-1 characters.

To transfer you need to escape certain characters before inserting it into your ISO-8859-1

XML string, and it might be better to use UTF-8 for that.

 

We had recently a similar issue which we did not have unless we changed to AXIS2-1.6.1

Guess it has to do with Axiom version delivered with this release of AXIS2.

 

I strongly suggest to use TCP Monitor to look what you get back by the sender which is

in your case the service-response.

 

How does the service return payload characters i.e. a "ä ö ü è é or > < & %"

 

and I think that will get you further.

http://osdir.com/ml/axis-dev-ws.apache.org/2009-08/msg00132.html

 

 

let me know if it helps.

 

Josef

 

 

 

 

Von: Francisco Serrano [mailto:francisco.serrano@multicom.co.uk] 
Gesendet: Montag, 19. März 2012 15:47
An: java-user@axis.apache.org
Betreff: [Axis2] Axis2 client generated from WSDL ignoring encoding

 

Any advice on this please?

-------- Original Message -------- 

Subject: 

[Axis2] Axis2 client generated from WSDL ignoring encoding

Date: 

Thu, 23 Feb 2012 17:02:42 +0000

From: 

Francisco Serrano <fr...@multicom.co.uk> <ma...@multicom.co.uk> 

To: 

java-user@axis.apache.org

 

Hello,
 
I have an axis2 client generated from a WSDL, which is working fine but 
I'm having some problems since it's ignoring the charset specified in 
the response it's getting back.
 
The response specifies charset=UTF-8 in the Content-Type HTTP header and 
the same in the encoding parameter in the xml message.
 
Instead of using UTF-8 to decode the xml content, it's using ISO-8859-1 
which is the one set for the JVM where the client is running. For this 
reason I'm getting some strange characters in the response. I've double 
checked that the characters are encoded correctly using UTF-8.
 
It's an old client generated with version 1.0. Does anybody know if 
there's some issue about that version regarding this problem? Are there 
any parameters to specify the charset to use to decode the response?
 
Best regards,
Francisco.

 

Multicom Products Limited is a company registered in England and Wales (Registered Number 2447353 Wales) with its registered office at 33 Victoria Street, Bristol, BS1 6AS. 
This email is confidential to the addressee and may contain privileged information. If you have reason to believe that you are not the intended recipient of this communication, please delete it from your system and contact the sender immediately. You are not permitted to use or copy this email or its attachments nor may you disclose the same to any third party. Unauthorised use or disclosure of this email is prohibited and may be unlawful. 
We reserve the right to intercept and read emails sent or received by our employees. This is to ensure compliance with our internal policies and to protect our business. If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this email system. 
We endeavour to exclude viruses and other malware from our data but it is the responsibility of the recipient to scan all emails and attachments for viruses before opening them. We accept no liability for any damage caused by any virus transmitted by this email. 
Email may not be completely secure or error free, can be intercepted or corrupted and may arrive late or not at all. Anyone who communicates with us by email accepts these risks.