axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rudolph, Troy" <Troy.Rudo...@ca.com>
Subject RE: Problems trying to send XML as a String to a web service?
Date Thu, 14 Jun 2007 14:58:16 GMT
The XML string that I send from the service to the client can be quite
long.  So, I compress it and send it to the client as an attachment via
MTOM.  Works great!

-----Original Message-----
From: Rick Reumann [mailto:rickcr@gmail.com] 
Sent: Wednesday, June 13, 2007 8:43 AM
To: axis-user@ws.apache.org
Subject: Problems trying to send XML as a String to a web service?

I have an Axis2 service set up. It's super simple. I want the user to be
able to send some XML to the service so I figured I'd set up my POJO
service to just accept a String...

public String getResults( String xmlSpec) { ... }

I built my client stubs with java2wsdl (actually used Eclipse's
plugin) and if I pass in a simple String like "Hello World,"
everything is fine. However, when I try to send some XML as a String, I
end up with the service never receiving the XML and get an error
like:

org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxParsingException:
Unexpected close tag </body>; expected </HR>.
 at [row,col {unknown-source}]: [11,187]
	at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:81)
	at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:356)
	at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:294)
	at
com.nielsen.webservices.SampleWebServiceSampleWebServiceHttpportStub.get
Results(SampleWebServiceSampleWebServiceHttpportStub.java:164)
	at com.nielsen.webservices.Client.main(Client.java:31)


I even tried wrapping the String with <![CDATA[ ]]> but it didn't seem
to help. What is the best way to send XML over the wire to an exposed
service?

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message