If you are going to send XML within the string parameter, you need to
escape it first, however doing that is really the wrong approach. You
should generate a java object matching the schema for the XML that you are
going to send in (jaxb can do this for you) and then the method would
contain this object as its argument.


*Aaron Titus*
Senior Software Engineer
F.W. Davison & Company, Inc.
508-747-7261 x245
[email protected]



On Tue, Nov 5, 2013 at 9:12 AM, mozahidone <[email protected]> wrote:

> Hi guys,
>
> My CXF webservice method receive XML input. The method is getApi:
>
> package com.apro.web.webservice;
>
> import javax.jws.WebParam;
> import javax.jws.WebService;
>
> import com.apro.web.service.UserService;
>
> @WebService(endpointInterface = "com.apro.web.webservice.IUserWebService")
> public class UserWebService {
>
>         private UserService userService;
>
>         public void setUserService(UserService userService) {
>                 this.userService = userService;
>         }
>
>         public String getApi(@WebParam(name="name")String name){
>                 return userService.getApi(name);
>         }
>
> }
>
> The method works fine with String. But I need to input XML string.
>
>
> Thanks.
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Sending-XML-input-to-CXF-SOAP-webservice-tp5735954.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to