import com.fujitsu.uji.soap.SOAPCallFactory;
import com.fujitsu.uji.soap.UjiServiceCall;
public void someMethod(DispatchContext context, XMLDataBean dataBean) {
...
// CallFactoryの取得
SOAPCallFactory callFactory=(SOAPCallFactory)context.getCallFactory(CallFactory.SOAP);
// UjiServiceCallの取得
String url = new String("http://some.host/service");
UjiServiceCall call =callFactory.createUjiServiceCall(url,null, SOAPCallFactory.INTERSTAGE_JAXM);
call.setUserName("username");
call.setPassword("password");
// サービスの呼び出し
XmlDataBean response=(XmlDataBean)call.invoke(dataBean,verb);
...
}
|