use of com.oracle.webservices.api.databinding.DatabindingFactory in project metro-jax-ws by eclipse-ee4j.
the class SAAJMessageWrapperTest method setUp.
public void setUp() {
Class<?> proxySEI = MtomSEI.class;
DatabindingFactory dbfac = DatabindingFactory.newInstance();
Databinding.Builder builder = dbfac.createBuilder(proxySEI, null);
builder.serviceName(new QName("http://example.org", "MtomTestService"));
builder.portName(new QName("http://example.org", "MtomTestPort"));
builder.feature(mtomf);
databinding = builder.build();
mcf = MessageContextFactory.createFactory(mtomf);
Method method = findMethod(proxySEI, "echoByteArray");
byte[] req = reqStr.getBytes();
Object[] args = { req };
clientCall = databinding.createJavaCallInfo(method, args);
}
use of com.oracle.webservices.api.databinding.DatabindingFactory in project metro-jax-ws by eclipse-ee4j.
the class JAXBWrapperAccessorTest method testDatabindingCreation.
public void testDatabindingCreation() {
Class<?> sei = DocServicePortType.class;
DatabindingFactory fac = DatabindingFactory.newInstance();
Databinding.Builder b = fac.createBuilder(sei, null);
DatabindingModeFeature dbf = new DatabindingModeFeature("eclipselink.jaxb");
WebServiceFeature[] f = { dbf };
b.feature(f);
String ns = "http://performance.bea.com";
b.serviceName(new QName(ns, "DocService"));
b.portName(new QName(ns, "DocServicePortTypePort"));
assertNotNull(b.build());
}
use of com.oracle.webservices.api.databinding.DatabindingFactory in project metro-jax-ws by eclipse-ee4j.
the class WrapperNSTest method testWrapperNS.
public void testWrapperNS() throws Exception {
Class<?> sei = MyHelloRPC.class;
DatabindingFactory fac = DatabindingFactory.newInstance();
Databinding.Builder b = fac.createBuilder(sei, null);
DatabindingModeFeature dbf = new DatabindingModeFeature("eclipselink.jaxb");
WebServiceFeature[] f = { dbf };
b.feature(f);
b.serviceName(new QName("http://echo.org/", "helloService"));
b.portName(new QName("http://echo.org/", "helloPort"));
Databinding db = b.build();
{
Method method = findMethod(sei, "echoString");
Object[] args = { "test" };
JavaCallInfo call = db.createJavaCallInfo(method, args);
MessageContext mc = db.serializeRequest(call);
SOAPMessage msg = mc.getSOAPMessage();
// System.out.println("------------------ eclipselink");
// msg.writeTo(System.out);
// System.out.println();
Node n = msg.getSOAPBody().getChildNodes().item(0);
// System.out.println("num of attributes is: "+
// n.getAttributes().getLength());
assertTrue(n.getAttributes().getLength() == 1);
}
}
use of com.oracle.webservices.api.databinding.DatabindingFactory in project metro-jax-ws by eclipse-ee4j.
the class WrapperNSTest method testGenerateWsdl.
public void testGenerateWsdl() throws Exception {
Class<?> sei = MyHelloRPC.class;
DatabindingFactory fac = DatabindingFactory.newInstance();
Databinding.Builder b = fac.createBuilder(sei, null);
DatabindingModeFeature dbf = new DatabindingModeFeature("eclipselink.jaxb");
WebServiceFeature[] f = { dbf };
DatabindingConfig config = new DatabindingConfig();
config.setFeatures(f);
config.setEndpointClass(MyHelloClass.class);
MappingInfo mi = new MappingInfo();
mi.setServiceName(new QName("http://echo.org/", "helloService"));
mi.setPortName(new QName("http://echo.org/", "helloPort"));
config.setMappingInfo(mi);
config.setClassLoader(this.getClass().getClassLoader());
RuntimeModeler rtModeler = new RuntimeModeler(config);
rtModeler.buildRuntimeModel();
}
use of com.oracle.webservices.api.databinding.DatabindingFactory in project metro-jax-ws by eclipse-ee4j.
the class WrapperNSTest method testWrapperNS_JAXBRI.
public void testWrapperNS_JAXBRI() throws Exception {
Class<?> sei = MyHelloRPC.class;
DatabindingFactory fac = DatabindingFactory.newInstance();
Databinding.Builder b = fac.createBuilder(sei, null);
DatabindingModeFeature dbf = new DatabindingModeFeature("glassfish.jaxb");
WebServiceFeature[] f = { dbf };
b.feature(f);
b.serviceName(new QName("http://echo.org/", "helloService"));
b.portName(new QName("http://echo.org/", "helloPort"));
Databinding db = b.build();
{
Method method = findMethod(sei, "echoString");
Object[] args = { "test" };
JavaCallInfo call = db.createJavaCallInfo(method, args);
MessageContext mc = db.serializeRequest(call);
SOAPMessage msg = mc.getSOAPMessage();
// System.out.println("------------------ glassfish");
// msg.writeTo(System.out);
// System.out.println();
Node n = msg.getSOAPBody().getChildNodes().item(0);
// System.out.println("num of attributes is: "+
// n.getAttributes().getLength());
assertTrue(n.getAttributes().getLength() == 1);
}
}
Aggregations