Hi, I'm trying to consume a web service:
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
@WebService(targetNamespace = "http://xmlns.oracle.com/someaddress", name = "BPELProcess2")
@XmlSeeAlso({ObjectFactory.class})
public interface BPELProcess2 {
@RequestWrapper(localName = "process", targetNamespace = "http://xmlns.oracle.com/someaddress/BPELProcess2", className = "package.Process")
@WebMethod(action = "process")
@ResponseWrapper(localName = "processResponse", targetNamespace = "http://xmlns.oracle.com/someaddress/BPELProcess2", className = "package.ProcessResponse")
public void process(
@WebParam(name = "acct_id", targetNamespace = "http://xmlns.oracle.com/someaddress/BPELProcess2")
@WebParam(mode = WebParam.Mode.OUT, name = "lastBillDate", targetNamespace = "http://xmlns.oracle.com/someaddress/BPELProcess2")
javax.xml.ws.Holder<javax.xml.datatype.XMLGregorianCalendar> lastBillDate,
I call this:
BPELProcess2 soap = service.getBPELProcess2Pt();
BindingProvider bind = (BindingProvider) soap;
Map<String,Object> requestContext = bind.getRequestContext();
requestContext.put(bind.USERNAME_PROPERTY, "user");
requestContext.put(bind.PASSWORD_PROPERTY, "pass");
Holder<String> acct_id = new Holder<String>();
Holder<XMLGregorianCalendar> lastBillDate = new Holder<XMLGregorianCalendar>();
String ac_id = 123;
soap.process(ac_id,lastBillDate);
Date dt= lastBillDate.value
The value of the date always comes null... i have changed the datatypes to string and also comes null. Am I missing something? I did tried to instantiate this and nothing.
lastBillDate.value = DatatypeFactory.newInstance().newXMLGregorianCalendar();