1

I am invoking the WS using SudzC generated code:

[service createPendingSalesOrders:self action:@selector(handler:) arg0: 
 @"<?xml version='1.0'"
 " encoding='utf-8'?>"
 "<root>test</root>"];

The soap request is:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope   
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:com="http://com/">
      <soapenv:Body>
           <com:createPendingSalesOrders>
                <arg0>"<?xml version='1.0' encoding='utf-8'?><root>test</root>"
                </arg0>          
           </com:createPendingSalesOrders>
      </soapenv:Body>
 </soapenv:Envelope>

I am receiving:

[com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.

from my WS running on glassfish.

The WS works with other XML strings that seem to contain the same PI.

Thanks for any insight, Dane

4

1 回答 1

0

如果您坚持将 xml 包装到 xml 中,请将内容放入 CDATA 部分,以便解析器将其作为字符串处理。

于 2012-04-06T12:38:29.767 回答