Forum Discussion

dwiam01's avatar
dwiam01
New Contributor
7 years ago

SOAP UI failed to load wsdl having element name having full width character

Getting XmlException on SOAP UI when element name has string 全半角2but if we remove the 2 from the string it is able to parse correctly.2is fullwidth character with code point \uff12.

We were exposing EJB as a Web Service and string used for webparam coming from end user which is "全半角2"

Below is the abstracted code. (stackoverflow:https://stackoverflow.com/questions/45980193/soap-ui-failed-to-load-wsdl-having-element-name-having-full-width-character)

import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 * Session Bean implementation class testABCD
 */
@Stateless
@Local
@WebService
public class testABCD {

    /**
     * Default constructor. 
     */
    public testABCD() {
        // TODO Auto-generated constructor stub
    }

    @WebMethod
    public String sayHello(@WebParam(name = "全半角2") String name) {
        // return back the name wit Hello
        return "Hello " + name + "!";

    }
}

When tyring to load the wsdl in soap ui getting below error:

2017:ERROR:org.apache.xmlbeans.XmlException: error: invalid-value: The value '全半角2' is an invalid name. org.apache.xmlbeans.XmlException: error: invalid-value: The value '全半角2' is an invalid name. at org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)

I tried to check the nature of the other character in this 全半角2 and below is the finding character //全 5168(hex code point) E5 85 A8 (utf-8 bytes) //半 534A(hex code point) E5 8D 8A (utf-8 bytes) //角 89D2 (hex code point) E8 A7 92 (utf-8 bytes)

What's wrong with this character?

//2 FF12 (hex code point)  EF BC 92 (utf-8 bytes)  

  

2 Replies