1 2 3 Previous Next 31 Replies Latest reply on Feb 17, 2011 8:10 AM by izgur

    Specific (national) characters & UTF-8 Hex

    izgur

      Hey!

       

      JBOSS supports 2 of 3 special Slovenian character. How to add the third?  Or encode it separatelly ?

       

      I have the jboss5.1, jbossesb4.9 and riftsaw2.2.0 and I made a SOAP service for sending SMS (using others REST SMS gateway)...

      Of course I have problems with the SLOVENIAN characters. There are basically 3 special characters, small and big:

       

      UCS-2
      Dec
      UCS-2
      Hex
      UTF-8
      Hex
      HTML
      (&##;)
      UTF-8
      Native
      Unaccented
      English
      268  010C C4 8CČ Č C   not supported
      269 010D C4 8Dč č c not supported
      352 0160 C5 A0Š Š S supported
      353 0161 C5 A1š š s supported
      381 017D C5 BDŽ Ž Z supported
      382 017E C5 BEž ž z supported

       

      What I found out ... The characters are encoded well if they are in UTF-8HEX in the REST request, like %C5%BE for the last in the table.

      Example:  if žšč is encoded into %C5%BE%C5%A1%C4%8D, the SMS is ok ...

       

      I'm testing it with SOAPUI.

      1.  If I call my axis2 web service DIRECTLY from SOAPUI, my axis2 service encodes the data well -> ENCODED WELL (all 3 are encoded well).

      2.  If I call my axis2 web service from SOAPUI through RIFTSAW's web service(which call 2-3 other services and of course my axis2 SMS service),  the C5A0/C5A1 and C5BD/C5BE works well, but only the C48C/C48D is a ? character...

       

      So... how can it be that 2 are supported and the third is not ??

      How can I add the support ?

      Should I encode the not supported character somehow by hand in my axis2 service ?

       

      Thanks!

        • 1. Specific (national) characters & UTF-8 Hex
          objectiser

          Hi Igor

           

          Could you enable finest level logging (i.e trace) to see if you can detect where the message content is being changed?

           

          It would also be useful if you could provide a testcase, more details on the SMS service.

           

          Regards

          Gary

          • 2. Specific (national) characters & UTF-8 Hex
            izgur

            Hey Gary!

             

            I found out that it has nothing to do with my SMS service... It a Riftsaw problem...

            Because I just called a java service which prints out my input string... It's with ? instead of my slovenian character č.

            So, when taking arguments out of the input request, he replaces č with ?.

            No finest level logging set.... How ?  (if we still need it)

             

            So... how can I specify the encoding that RiftSaw should use?  

            Would be nice if RiftSaw would parse the encoding from the WSDL artifacts..   like  <?xml version="1.0"? encoding=...>

             

            Regards, Igor!

            • 3. Specific (national) characters & UTF-8 Hex
              objectiser

              Hi Igor

               

              You have previously enabled the finest logging, its in the jboss-log4j.xml - yes it is still required.

               

              If you believe this is a bug, can you raise a jira and provide a testcase to demonstrate the problem.

               

              Regards

              Gary

              • 4. Specific (national) characters & UTF-8 Hex
                izgur

                Is there no way to specify a different encoding?

                 

                Like for example: adding -Djava.encoding=UTF-8' ...

                 


                • 5. Specific (national) characters & UTF-8 Hex
                  objectiser

                  Hi Igor

                   

                  As far as I am aware, you should just be able to define the encoding on the SOAP message. However we don't have any examples that use different encodings, so if you can provide a testcase/example, then we can investigate further.

                   

                  Regards

                  Gary

                  • 6. Specific (national) characters & UTF-8 Hex
                    izgur

                    My testcase is the simpliest possible:

                     

                    1 external service which prints out the input string like      (showString.wsdl)

                            @WebMethod

                        public string showString(int test) {      

                            System.out.println("input: " + test);

                            return test;       

                        }

                     

                    1 default BPEL process which passes the input string to the showString webmethod... so u can see it in the server.log  (testCharArtifacts.wsdl)

                     

                    That's it...

                     

                    If you now call the BPEL process with the input parameter containing a č or Č (%C4%8C or %C4%8D), Ritfsaw doesn't recognize it and replaces it with a ? character...

                     

                    I tried now to specify the encoding in the testCharArtifacts.wsdl, but no success...

                     

                    Can u give any other possibility worth trying?

                    How to define SOAP message encoding ?

                    • 7. Re: Specific (national) characters & UTF-8 Hex
                      mbaluch

                      Hi Igor, you can define the SOAP encoding the same way as for any XML document + you can define the encoding in the envelope. Just be sure to choose the same encoding when you save the contents to a file.

                       

                      See ... http://www.soapuser.com/basics3.html ...

                      • 8. Re: Specific (national) characters & UTF-8 Hex
                        izgur

                        FINEST LEVEL TRACE

                         

                        2011-02-15 13:19:07,138 TRACE [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http-172.17.3.15-9000-5) BEFORE handleRequest - Recording Handler

                        <soapenv:Envelope xmlns:cod='http://kkissiskratel/codes' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>

                        <soapenv:Header/>

                        <soapenv:Body>

                          <cod:codesRequest>

                           <cod:input>testiram čšž ČŠŽ</cod:input>

                          </cod:codesRequest>

                        </soapenv:Body>

                        </soapenv:Envelope>

                        2011-02-15 13:19:07,138 TRACE [org.jboss.ws.core.CommonMessageContext] (http-172.17.3.15-9000-5) put: APPLICATION:org.jboss.ws.allow.expand.dom=true

                        2011-02-15 13:19:07,138 TRACE [org.jboss.ws.core.CommonMessageContext] (http-172.17.3.15-9000-5) get(javax.xml.ws.handler.message.outbound): APPLICATION:javax.xml.ws.handler.message.outbound=false

                        2011-02-15 13:19:07,139 TRACE [org.jboss.ws.core.soap.SOAPContentElement] (http-172.17.3.15-9000-5) getChildNodes

                        2011-02-15 13:19:07,139 TRACE [org.jboss.ws.core.soap.SOAPContentElement] (http-172.17.3.15-9000-5) getChildNodes

                        2011-02-15 13:19:07,139 TRACE [org.jboss.ws.core.soap.SOAPContentElement] (http-172.17.3.15-9000-5) getChildNodes

                        2011-02-15 13:19:07,139 TRACE [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http-172.17.3.15-9000-5) AFTER handleRequest - Recording Handler: unchanged

                        2011-02-15 13:19:07,139 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerChainExecutor] (http-172.17.3.15-9000-5) Exit: handleIn BoundMessage with status: true

                        2011-02-15 13:19:07,139 TRACE [org.jboss.ws.core.CommonMessageContext] (http-172.17.3.15-9000-5) put: APPLICATION:org.jboss.ws.allow.expand.dom=true

                        2011-02-15 13:19:07,139 TRACE [org.jboss.ws.core.CommonMessageContext] (http-172.17.3.15-9000-5) get(javax.xml.ws.servlet.request): APPLICATION:javax.xml.ws.servlet.request=org.apache.catalina.connector.RequestFacade@1219bea

                        2011-02-15 13:19:07,139 TRACE [org.jboss.ws.core.CommonMessageContext] (http-172.17.3.15-9000-5) get(javax.xml.ws.servlet.request): APPLICATION:javax.xml.ws.servlet.request=org.apache.catalina.connector.RequestFacade@1219bea

                        2011-02-15 13:19:07,140 DEBUG [org.jboss.ws.core.EndpointInvocation] (http-172.17.3.15-9000-5) getRequestPayload

                        2011-02-15 13:19:07,140 DEBUG [org.jboss.ws.core.EndpointInvocation] (http-172.17.3.15-9000-5) getRequestParamValue: genericParam

                        2011-02-15 13:19:07,140 DEBUG [org.jboss.ws.core.EndpointInvocation] (http-172.17.3.15-9000-5) transformPayloadValue: org.jboss.ws.core.soap.SOAPMessageImpl -> org.jboss.ws.core.soap.SOAPMessageImpl

                        2011-02-15 13:19:07,140 DEBUG [org.jboss.ws.core.EndpointInvocation] (http-172.17.3.15-9000-5) syncEndpointInputParam: org.jboss.ws.core.soap.SOAPMessageImpl -> org.jboss.ws.core.soap.SOAPMessageImpl(0)

                        2011-02-15 13:19:07,140 DEBUG [org.jboss.soa.bpel.runtime.ws.generated.BPELWebServiceEndpoint_6472ab9c-fb66-4549-9273-b1c6d6c54ea0] (http-172.17.3.15-9000-5) Invoking endpoint 6472ab9c-fb66-4549-9273-b1c6d6c54ea0

                        2011-02-15 13:19:07,141 TRACE [org.jboss.ws.core.soap.SOAPContentElement] (http-172.17.3.15-9000-5) getChildNodes

                        2011-02-15 13:19:07,141 TRACE [org.jboss.ws.core.soap.SOAPContentElement] (http-172.17.3.15-9000-5) getChildNodes

                        2011-02-15 13:19:07,141 TRACE [org.jboss.ws.core.soap.SOAPContentElement] (http-172.17.3.15-9000-5) getChildNodes

                        2011-02-15 13:19:07,141 DEBUG [org.jboss.soa.bpel.runtime.ws.generated.BPELWebServiceEndpoint_6472ab9c-fb66-4549-9273-b1c6d6c54ea0] (http-172.17.3.15-9000-5) ODE inbound message:

                        <soapenv:Envelope xmlns:cod='http://kkissiskratel/codes' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>

                        <soapenv:Header/>

                        <soapenv:Body>

                          <cod:codesRequest>

                           <cod:input>testiram čšž ČŠŽ</cod:input>

                          </cod:codesRequest>

                        </soapenv:Body>

                        </soapenv:Envelope>

                        2011-02-15 13:19:07,141 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl] (http-172.17.3.15-9000-5) Starting transaction.

                        2011-02-15 13:19:07,142 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl] (http-172.17.3.15-9000-5) ODE routed to operation Operation: name=process

                        style=REQUEST_RESPONSE,1

                        Input: name=null

                        Message: name={http://kkissiskratel/codes}codesRequestMessage

                        Part: name=payload

                        elementName={http://kkissiskratel/codes}codesRequest

                        Output: name=null

                        Message: name={http://kkissiskratel/codes}codesResponseMessage

                        Part: name=payload

                        elementName={http://kkissiskratel/codes}codesResponse from service {http://kkissiskratel/codes}codes

                        2011-02-15 13:19:07,142 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl] (http-172.17.3.15-9000-5) Is two way operation? true

                        2011-02-15 13:19:07,142 TRACE [org.jboss.ws.core.soap.SOAPContentElement] (http-172.17.3.15-9000-5) getFirstChild

                        2011-02-15 13:19:07,143 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl] (http-172.17.3.15-9000-5) Invoking ODE using MEX {MyRoleMex#hqejbhcnphr61a8w8i4pjt [Client hqejbhcnphr61a8w8i4pjs] calling {http://kkissiskratel/codes}codes.process(...)}

                        2011-02-15 13:19:07,143 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl] (http-172.17.3.15-9000-5) Message content:  <?xml version="1.0" encoding="UTF-8"?>

                        <message><payload><cod:codesRequest xmlns:cod="http://kkissiskratel/codes">

                                 <cod:input>testiram čšž ČŠŽ</cod:input>

                              </cod:codesRequest></payload></message>

                        2011-02-15 13:19:07,144 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl] (http-172.17.3.15-9000-5) Commiting ODE MEX {MyRoleMex#hqejbhcnphr61a8w8i4pjt [Client hqejbhcnphr61a8w8i4pjs] calling {http://kkissiskratel/codes}codes.process(...)}

                        2011-02-15 13:19:07,144 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.BPELEngineImpl] (http-172.17.3.15-9000-5) Commiting transaction.

                        2011-02-15 13:19:07,360 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.EndpointReferenceContextImpl] (ODEServer-67) Map access not implemented

                        2011-02-15 13:19:07,361 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.MessageExchangeContextImpl] (ODEServer-67) Invoking a partner operation: showMessage

                        2011-02-15 13:19:07,361 DEBUG [org.jboss.soa.bpel.runtime.engine.ode.MessageExchangeContextImpl] (ODEServer-67) Invoking a partner operation: showMessage

                        2011-02-15 13:19:07,361 DEBUG [org.jboss.soa.bpel.runtime.ws.WebServiceClient] (ODEServer-67) Invoking dispatcher 2d6074c8-b446-40fc-bf51-677312b13e00

                        2011-02-15 13:19:07,424 TRACE [org.jboss.wsf.common.DOMUtils] (ODEServer-69) createElement {http://schemas.xmlsoap.org/soap/envelope/}env:Envelope

                        2011-02-15 13:19:07,424 TRACE [org.jboss.wsf.common.DOMUtils] (ODEServer-69) createElement {http://schemas.xmlsoap.org/soap/envelope/}env:Header

                        2011-02-15 13:19:07,424 TRACE [org.jboss.wsf.common.DOMUtils] (ODEServer-69) createElement {http://schemas.xmlsoap.org/soap/envelope/}env:Body

                        2011-02-15 13:19:07,427 DEBUG [org.jboss.soa.bpel.runtime.ws.WebServiceClient] (ODEServer-69) ODE outbound message:

                        <message>

                        <parameters>

                          <showMessage xmlns='http://ws.apache.org/axis2'>

                           <ns:args0 xmlns:ns='http://ws.apache.org/axis2'>testiram ?šž ?ŠŽ</ns:args0>

                          </showMessage>

                        </parameters>

                        </message>

                         

                        Any Idea?

                        • 9. Re: Specific (national) characters & UTF-8 Hex
                          izgur

                          I have defined <?xml version="1.0" encoding="UTF-8"?> in all my WSDLs...

                          • 10. Re: Specific (national) characters & UTF-8 Hex
                            objectiser

                            Hi Igor

                             

                            If you could create a jira and attached your testcase packaged, then we can investigate.

                             

                            At the moment it is hard to tell whether this is a riftsaw or ODE issue.

                             

                            Regards

                            Gary

                            • 11. Re: Specific (national) characters & UTF-8 Hex
                              izgur

                              OK. Nothing I can do...

                              I made a new BPEL just assinging input string to output string. It returns ? characters instead of the sent Č characters...

                               

                              So it is a bug...  How can i create i jira ?

                              • 12. Re: Specific (national) characters & UTF-8 Hex
                                objectiser
                                • 13. Re: Specific (national) characters & UTF-8 Hex
                                  izgur

                                  I would say it's an ODE issue. There is a discussion on the Apache ODE forum : http://old.nabble.com/ODE-and-UTF8-ts14360312.html#a14360312.

                                  Although more than 3 years old..

                                  What triggered me:

                                       Windows 9X,.. systems support unicode and UTF-8 natively, older unix distributions has
                                  To be set in etc/conf files and kernel should be compiled for the activation of UTF-8 support.


                                  So, could my LINUX encoding have affect on this?

                                  In my /etc/sysconfig/i18n  I have :  LANG="en_US.UTF-8"

                                   

                                  Could that be the problem?  Must I use sl_SL.UTF-8 to get my Slovenian character work...

                                   

                                  I'm not optimistic.. because šž works..

                                   


                                   

                                  S

                                  • 14. Re: Specific (national) characters & UTF-8 Hex
                                    mbaluch

                                    Hi Igor,

                                     

                                    I created a simple process which is supposed to reproduce your issue. I must say that I haven't had much success. All foreign strings display in the server console normally. (including yours and a chinese 火車 [火车] string).

                                     

                                    As far as /etc/sysconfig/i18n is concerned then I have the same LANG setting as you. Please be so kind and create a JIRA with your testcase attached. Thanks.

                                     

                                    Regards

                                    Marek

                                    1 2 3 Previous Next