Question

I use CURL to drop a message to a webservice. Normally I pass the .xml file path in the CURL command, but now I need to pass the entire .xml as a string in my command line argument. No issues while passing path to the .xml doc, but when I try to pass .xml contents as String, I get a SaxParseException...

Command

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

Exception

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
Was it helpful?

Solution

Solved: For some reason it doesn't like the double quotes in the xmlns:soap attribute. Removing them did the trick.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top