发出Curl命令时出现SaxParseException

发出Curl命令时出现SaxParseException,curl,sax,Curl,Sax,我使用CURL向Web服务发送消息。通常我在CURL命令中传递.xml文件路径,但现在我需要在命令行参数中以字符串形式传递整个.xml。将路径传递到.xml文档时没有问题,但是当我尝试将.xml内容作为字符串传递时,会出现SaxParseException 命令 Curl -k -v -u username:password -d "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">SOME M

我使用CURL向Web服务发送消息。通常我在CURL命令中传递.xml文件路径,但现在我需要在命令行参数中以字符串形式传递整个.xml。将路径传递到.xml文档时没有问题,但是当我尝试将.xml内容作为字符串传递时,会出现SaxParseException

命令

Curl -k -v -u username:password -d "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">SOME MESSAGE</soap:Envelope>" endpointurl

已解决:出于某种原因,它不喜欢xmlns:soap属性中的双引号。移除它们就成功了

org.xml.sax.SAXParseException: Open quote is expected for attribute "xmlns:soap" associated with an  element type  "soap:Envelope". (net.sf.saxon.trans.DynamicError). Message payload is of type: String (org.mule.api.transformer.TransformerMessagingException). Message payload is of type: String* Closing connection 0