• Post Reply Bookmark Topic Watch Topic
  • New Topic

Content is not allowed in prolog and Unable to handle request without a valid action parameter.  RSS feed

 
Moguluri Ravi Kiran
Ranch Hand
Posts: 63
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

Facing a problem in my first web-services program. help from you is definitely a stepping stone for me.



Spring conf. file is (tst.xml)



And the request xml is (reqSoap12.xml)



The error i am getting is




After Google-ing i modified my request as (reqSoap12.xml)



Then the error is



Thanks in advance,
Ravi M.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception in thread "main" org.springframework.ws.client.WebServiceTransformerException: Transformation error: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.; nested exception is javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.


You get that if the first character in an XML stream is NOT a "<" - note line 1 character 1

I would use TC{MON or SOAPui to see exactly what is being sent / received.

Bill
 
Moguluri Ravi Kiran
Ranch Hand
Posts: 63
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William Brogden,

Thank you for the hint provided.
If i remove the first 4 lines in request,
I am getting SOAPAction required message.
If i am not expecting more, Could you please guide me little further to get the response from my program.


For more information, From SOAP Ui following is being sent


And Response is


If i use same request in my program SOAPAction header required message is coming. Please see above first stack trace.


Regards,
Ravi M.
 
Vijitha Kumara
Bartender
Posts: 3973
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be additional space(s) (or some other character) in prolog etc... As William said you can try with TCPMon to see what the request contains when your java program is used.
 
juan ramón huergo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, you can try this, set the Soap action inthe call to WS template.

response = (OrderResponse) webServiceTemplate.marshalSendAndReceive(request, new ActionCallback(soapAction));
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!