White spaces are required between publicId and systemId

前端 未结 5 1947
心在旅途
心在旅途 2020-12-01 10:12

I am trying to make a ajax call to other domain locally from my computer by writing some proxy code in jsp. And this is my jQuery AJAX code that is calling proxy.jsp page. <

5条回答
  •  有刺的猬
    2020-12-01 10:49

    I just found my self with this Exception, I was trying to consume a JAX-WS, with a custom URL like this:

    String WSDL_URL= ;
    Customer service = new Customer(new URL(WSDL_URL));
    ExecutePtt port = service.getExecutePt();
    return port.createMantainCustomers(part);
    

    and Java threw:

    XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,63]
    Message: White spaces are required between publicId and systemId.
    

    Turns out that the URL string used to construct the service was missing the "?wsdl" at the end. For instance:

    Bad:

    http://www.host.org/service/Customer
    

    Good:

    http://www.host.org/service/Customer?wsdl
    

提交回复
热议问题