• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 942
  • Last Modified:

service client is throwing the following error message

I have deployed a webservice( Axis 2 )   in Jboss.

When I try to access this service from a standalone  proxy client  class,  the client  is throwing the following error  message:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

what is this ?  What does this imply ?  How to get rid of this ?

0
cofactor
Asked:
cofactor
  • 6
  • 5
  • 3
  • +2
2 Solutions
 
for_yanCommented:
Default Re: SAXParseExceptionThe processing instruction target matching"[xX][mM][l

    I ran into this issue. I finally fixed it by removing four spaces I had be=
    fore the line "<?xml version=3D"1.0" encoding=3D"UTF-8"?>" in the offending=
    xml.
0
 
objectsCommented:
>  faultString: org.xml.sax.SAXParseException: The processing instruction target matching &quot;[xX][mM][lL]&quot; is not allowed.

you should not have anything before your xml instruction
(including any control characters)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
cofactorAuthor Commented:
>>> I finally fixed it by removing four spaces I had bfore the line "<?xml version=3D"1.0" >>encoding=3D"UTF-8"?>" in the offending xml.

My WSDL starts with this ..

<?xml version="1.0" encoding="UTF-8"?>

This is valid .  I cant blame this. There is no space.



>>>you should not have anything before your xml instruction
(including any control characters)

WSDL starts with that instruction . There is nothing before xml instruction.
0
 
objectsCommented:
check there aren't any (non-visible) control characters
0
 
cofactorAuthor Commented:
>>>check there aren't any (non-visible) control characters

how do I check that ?  I have EditPlus / TextPad / Eclipse editor. Can I use them to view them ?

How ?
0
 
CEHJCommented:
If you attach it, i'll check for you
0
 
objectsCommented:
in eclipse: Preferences > General > Editors > Text Editors > Show whitespace characters
0
 
cofactorAuthor Commented:
>>>in eclipse: Preferences > General > Editors > Text Editors > Show whitespace characters

Done .

file attached. This is just the first line of WSDL.  I dont see anything suspicious at the beginning line.

By the way , for  more troubleshooting , I wish to check the IP my proxy class is targetting. Where to look for that ? Which source file contains this information ?
checkThis.JPG
0
 
CEHJCommented:
>>file attached.

I need the wsdl file itself as an attachment. This could be BOM-related. See

http://www.experts-exchange.com/Programming/Languages/Java/Q_21966775.html
0
 
cofactorAuthor Commented:
>>>I need the wsdl file itself as an attachment. This could be BOM-related. See
CHEJ , I understand . I wish I could.But, I can not share WSDL contract  completely here.

Here is some more information I gathered after reading your comments.

Jboss server is retruning the service response object . I can say that because I have put a Log statement  in the service before it returns .

I get the a Log print in the service just before it returns . Here is the  service response object in the Jboss server console.

summaryInfoResponse =webservice.com.eam.www.SummaryInfoResponse@16d8a3c

However , client is not receiving this  response object but throwing the error message.

Does this make any sense ?

0
 
objectsCommented:
add some debug to check the first character of the response to check if its a <
0
 
cofactorAuthor Commented:
>>>add some debug to check the first character of the response to check if its a < 

first character ?  response is a Object . What do you mean by debug  first chracter here.

I just have a print
System.out.println(summaryInfoResponse );

What debug you suggest here ?
0
 
CEHJCommented:
Can you post the client code which includes the line that introduces the error?
0
 
cofactorAuthor Commented:
issue has been resolved.
Client was not catching the same type of return what server is returning. The service works ok now.
I'll award points for your inputs and get going with the debug.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 6
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now