Hi , I tried passing the operation name with the namespace but it didn't work. I get the same exception as below.
*java.lang.IllegalArgumentException: Part {http://wso2.org/wso2con/2011/sample/adder}payload <http://wso2.org/wso2con/2011/sample/adder}payload> should be of type org.wso2.wso2con._2011.sample.adder.AdderProcessRequest, not java.lang.Integer* * at org.apache.cxf.jaxb.io.DataWriterImpl.checkPart(DataWriterImpl.java:284)* * at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:212)* * at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:122)* * at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)* * at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)* * at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572)* * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481)* * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)* * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)* * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355)* * at cxfClient_1.main(cxfClient_1.java:61)* * at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)* * at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)* * at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)* * at java.lang.reflect.Method.invoke(Method.java:606)* * at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)* Best Regards, Natasha Wijesekare On Thu, Mar 17, 2016 at 3:39 PM, Himasha Guruge <himas...@wso2.com> wrote: > Hi Natasha, > > Can you try passing the operation name with the namespace as well? > > Regards, > Himasha > > On Thu, Mar 17, 2016 at 2:16 PM, Natasha Wijesekara <nata...@wso2.com> > wrote: > >> Hi, >> >> I'm trying to invoke an external soap service operation which takes >> integers as the parameters. >> >> *Request Body of the Soap Service *: >> >> *<soapenv:Envelope >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ >> <http://schemas.xmlsoap.org/soap/envelope/>" >> xmlns:add="http://wso2.org/wso2con/2011/sample/adder >> <http://wso2.org/wso2con/2011/sample/adder>">* >> * <soapenv:Header/>* >> * <soapenv:Body>* >> * <add:AdderProcessRequest>* >> * <add:a>?</add:a>* >> * <add:b>?</add:b>* >> * </add:AdderProcessRequest>* >> * </soapenv:Body>* >> *</soapenv:Envelope>* >> >> I have created a client to invoke the soap operation using >> JaxWsDynamicClientFactory. >> JaxWsDynamicClientFactory clientFactory = >> JaxWsDynamicClientFactory.newInstance(); >> >> I have invoked the operation by passing the operation name and the >> parameters to the client. >> When multiple parameters of type *string* is passed, no error is given. >> >> In this request I need to pass 2 *integers* as the parameters as shown >> below : >> client.invoke("operationName", num1, num2); >> But when I do so I get the following error : >> >> *java.lang.IllegalArgumentException: Part >> {http://wso2.org/wso2con/2011/sample/adder}payload >> <http://wso2.org/wso2con/2011/sample/adder%7Dpayload> should be of type >> org.wso2.wso2con._2011.sample.adder.AdderProcessRequest, not >> java.lang.Integer* >> * at >> org.apache.cxf.jaxb.io.DataWriterImpl.checkPart(DataWriterImpl.java:284)* >> * at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:212)* >> * at >> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:122)* >> * at >> org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)* >> * at >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)* >> * at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572)* >> * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481)* >> * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)* >> * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)* >> * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355)* >> * at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:341)* >> >> Appreciate any help on this. >> >> Best Regards, >> *Natasha Wijesekare* >> >> *Software Engineering Intern, WSO2 Inc: http://wso2.com >> <http://wso2.com/>* >> *email : nata...@wso2.com <nata...@wso2.com>* >> *mobile: +94 771358651 <%2B94%20771358651>* >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Himasha Guruge > *Software Engineer* > WS*O2* *Inc.* > Mobile: +94 777459299 > himas...@wso2.com > -- *Natasha Wijesekare* *Software Engineering Intern, WSO2 Inc: http://wso2.com <http://wso2.com/>* *email : nata...@wso2.com <nata...@wso2.com>* *mobile: +94 771358651*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev