I have a process that calls a wsdl of a document sevrer using web service component in AEM Forms 6.5. There are multiple web service components configured in that process which works but it fails to invoke a partcular operation of the document server.
The same process is working in ES4. One of the variable in that SOAP request is a string. That string data is a base64 value of a pdf document which is passed as a string in the SOAP request to the document server.
Not sure if it is causing this issue or something else.
I have also tried adding <?xml version="1.0"?> in SOAP request but still the same error.
The workaround is to pass all the input values of the soap request making it hard coded. In this case, the web service gets a response when invoked. But i need the data to be dynamic as the data has to be filled by the users in workspace.
Below is the snippet of the error:
10:16:00,776 INFO [com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils] (SwingWorker) Loading schema types from [http://devnt10/ProxiWS/OwcEdocsWebservice.asmx?wsdl] 10:16:00,776 INFO [com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils] (SwingWorker) Getting schema http://devnt10/ProxiWS/OwcEdocsWebservice.asmx?wsdl 10:16:00,866 WARN [com.eviware.soapui.support.xml.XmlUtils] (default task-6) Failed to prettyPrint xml [The server cannot service the request because the media type is unsupported.]: org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA 10:16:00,868 INFO [com.adobe.idp.dsc.webservice.WebServiceSoapUIInvoker] (default task-6) Response parsing error: failed to parse document from response. Response: The server cannot service the request because the media type is unsupported. 10:16:00,869 ERROR [stderr] (default task-6) org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. 10:16:00,870 ERROR [stderr] (default task-6) at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:245) 10:16:00,870 ERROR [stderr] (default task-6) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:298)
After checking the network logs, the response received from the document server to the AEM server
is that the content type is text/html, probabily this is why prolog error is coming.
Not sure if the document server is expecting content type as text/xml but it is getting text/html from the soap request. How can I change the content type if the AEM is sending text/html in request Here is the SOAP request :