You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Prasanna.dpm" <ba...@dnb.com> on 2008/06/12 19:02:13 UTC

JSR Request without Operation Name

Hi,

I am using servicemix 3.1-incubation. 

Flow is like    --> http-bc(consumer) --> jsr181

Soap request will be sent to http-bc with soap body which can have any
payload xml. Root element inside soap body should not be considered to
decide the operation or method to be invoked in the jsr. Method in jsr
should get the entire xml inside the soap body. How can this be configured
in jsr. I tried using annotations, but it dint work as I expected. Request
always expects <sayHello>. Below is xbean and java using which I tried.

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.WebResult;
import javax.jws.WebParam;
import javax.jws.soap.SOAPBinding;
import java.w3c.dom.Document;
import org.apache.servicemix.jbi.jaxp.SourceTransformer;

@WebService(name = "ExampleService", targetNamespace =
"http://example.com/exampleService/", portName="soap")
public class ExampleService {

	@WebMethod(operationName = "sayHello")


@SOAPBinding(style=javax.jws.soap.SOAPBinding.Style.DOCUMENT,use=javax.jws.soap.SOAPBinding.Use.LITERAL,parameterStyle=javax.jws.soap.SOAPBinding.ParameterStyle.BARE)

	public String sayHello(Document doc) {
		SourceTransformer sourceTransformer = new SourceTransformer();
		String request = sourceTransformer.toString(doc);
		System.out.println("The request received here::"+request);
		return doc;
	}
}

I tried both wrapped and bare parameter style. It dint work as I was
expecting.

Xbean.xml

<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0">

    <jsr181:endpoint
pojoClass="org.apache.servicemix.tutorial1.ExampleService"/>

</beans>


-- 
View this message in context: http://www.nabble.com/JSR-Request-without-Operation-Name-tp17804847p17804847.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.