Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
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;

/**
 * This class was generated by Apache CXF 3.0.4
 * 2015-03-13T14:21:06.017-04:00
 * Generated source version: 3.0.4
 * 
 */
@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();
Posted
Updated 26-Mar-15 10:27am
v2
Comments
Sergey Alexandrovich Kryukov 26-Mar-15 17:01pm    
In what line?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900