Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messages

 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are migrating from Websphere 6.0 to JBoss 5.1 where we have one web service.

When I try to invoke the web service using my client code, I am getting the following exception:



Please help me if anybody have idea
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the WSDL to get the correct endpoint URL, perhaps the service URL for your webservice changed when you moved to a different app server. You can try out http://www.soapui.org/ to test your webservice.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest using SOAPui or TCPMON to capture the complete SOAP request your client is generating. You may be surprised.

Bill
 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for responses. I am using TCPIP Monitor to capture the request/response.

Please find the request/resposne I am getting through TCPIP monitor. I am getting two request and two responses as follows:

Request1
-------------


Response1
--------------


Request2
----------------


Response2
--------------


Do I need to change the WSDL? I am using the same client code with Axis which was generated using RAd for Websphere. do I need to re-generate the client using JBoss IDE for JBoss 5.1 however I have re-generated the server side code with JBossWS specification.

Please clarify me
1. whether I need to change the WSDL due to change of AppServer
2. Whether I need to re-generate the client code again due to change of AppServer and IDE

Please help me.
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server is returning HTML instead of a SOAP message. That's the problem. Check your endpoint in the request and what the service points are in the WSDL.
 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These are my WSDL contents. I am referring my localhost as endpoint URL.

WSDL Schema definition:
---------------------------

EndPoint URL
-------------------

Please let me know if there are mistakes.
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Soap UI as mentioned before, or use your web browser to see if you can access the WSDL directly from the web service, for instance: http://localhost:8080/vega/services/EpgFileTransferSOAP?wsdl
Change the URL, if needed, until the WSDL shows up in the browser, and not some HTML page. Also In your JBoss log file you should be able to find the service URLs somewhere (i.e. when the webservice app is deployed).
 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct.

I am not able to get the WSDL when I try to access the Web service with the following URLs. I am getting always web page saying "Hello World"

1. http://localhost:8080/vega/services/EpgFileTransferSOAP?wsdl (JBoss Localhost Port)
2. http://localhost:18310/vega/services/EpgFileTransferSOAP?wsdl (TCPIP configured custom port)

I am able to see the following in my logs when server startup.



does it impactin anyway? How can I see the WSDL? How can I fix the issue?

Please.
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try "tns:" instead of "service:" for the binding attribute in the wsdl:port element. Not sure if that is the problem though.
 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still same error.



Any help please.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you captured the complete text of the SOAP request that causes this error response?

Both SOAPui and TCPMON allow you to save the captured request so you can examine and modify it. Look for <? ... ?> Processing instruction syntax.

Bill
 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Willim,

I have pasted the request and response which tracked using TCPIP Monitor in this same thread above.

Please check and help me.

Thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess the "processing instruction" error is spurious.

If you are still getting the two responses shown earlier:
1. a redirect HTTP/1.1 302 moved temporarily
and
2. a HTML Hello World page

then we must reluctantly conclude that your SOAP request never gets near a SOAP service and your client misinterprets the hello world page, throwing the error you see.

I should have picked up on this earlier as something similar happened to me - sorry.

Bill
 
Chandrasekhar Aadhanapattu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help, please.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to me - if your SOAP request is not getting to a SOAP service you need to look at:

1. Are you using the right address?
2. Is the service really running?

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic