axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Re: Problems trying to send XML as a String to a web service?
Date Wed, 13 Jun 2007 13:58:14 GMT
I tend to tackle this in two ways: Convert / unconvert the string to base64
and send it that way. Or use mtom and send the string as an attachment.

Someone else may be able to comment on getting the actual string escaped
correctly inside the soap body, but I tend not to bother.

HTH,
Robert

On 6/13/07, Rick Reumann <rickcr@gmail.com> wrote:
>
> 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(
> TransportUtils.java:81)
>         at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:356)
>         at org.apache.axis2.description.OutInAxisOperationClient.execute(
> OutInAxisOperation.java:294)
>         at
> com.nielsen.webservices.SampleWebServiceSampleWebServiceHttpportStub.getResults
> (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
>
>

Mime
View raw message