Skip to content

Instantly share code, notes, and snippets.

@luismoramedina
Created February 4, 2016 18:26
Show Gist options
  • Select an option

  • Save luismoramedina/897c492d079a436c6c02 to your computer and use it in GitHub Desktop.

Select an option

Save luismoramedina/897c492d079a436c6c02 to your computer and use it in GitHub Desktop.
create SOAPMessage from string
/**
* Util to get a soapmessage from a string.
*/
private SOAPMessage getSoapMessageFromString(String xml) throws SOAPException, IOException {
MessageFactory factory = MessageFactory.newInstance()
factory.createMessage(new MimeHeaders(), new ByteArrayInputStream(xml.getBytes('UTF-8')))
}
@msines
Copy link
Copy Markdown

msines commented Sep 22, 2016

Hola, me arroja esta excepcion, pese a indicarle utf-8 "javax.xml.soap.SOAPException: Content-Type not specified"

Un saludo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment