java - SOAP MalformedURIException with character ^ -
i have call webservice soap happens have ^ in url. url has structure 
string url = "http://sampleurl.com?type=entry&version=1.0&sender.service=senderservice&interface=sampleurl/abc^servicerequest"; this gives me following exception:
com.sun.xml.messaging.saaj.util.jaxmuri$malformeduriexception: query string contains invalid character:^ 11:47:10,670 error [stderr]     @ com.sun.xml.messaging.saaj.util.jaxmuri.initializepath(jaxmuri.java:690) 11:47:10,670 error [stderr]     @ com.sun.xml.messaging.saaj.util.jaxmuri.initialize(jaxmuri.java:407) 11:47:10,670 error [stderr]     @ com.sun.xml.messaging.saaj.util.jaxmuri.<init>(jaxmuri.java:194) 11:47:10,670 error [stderr]     @ com.sun.xml.messaging.saaj.util.jaxmuri.<init>(jaxmuri.java:178) 11:47:10,670 error [stderr]     @ com.sun.xml.messaging.saaj.client.p2p.httpsoapconnection.post(httpsoapconnection.java:254) the thing puzzle me out calling webservice soap ui gives me correct answer if put ^ in url.
if scape caret character %5e in application or in soap ui webservice responds "message incomplete. no sender found" seems ^ must present.
any idea of how put ^ in url without giving exception? 
the ^ character not allowed in url, soapui encoding url you. think case representation importat url escape characters try uppercase %5e instead of lowercase %5e.
edit:
i make try configuring tcp monitor on localhost , making soap request soapui http://localhost:8091?type=entry&version=1.0&sender.service=senderservice&interface=sampleurl/abc^servicerequest. in tcp monitor see %5e instead of ^ seems soapui encoding url properly, can see in image below:

hope helps,
Comments
Post a Comment