I am trying to send request data to external soap server but data is going to null in the request to External Soap Server.
Please find the code as below:
UserListResponse response = null;
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "UserList")
@ResponsePayload
public UserListResponse UserListRequest(@RequestPayload UserListRequest request) throws Exception {
System.out.println("Enters into UserList()");
try {
//Client call
UserServicesLocator locator = new UserServicesLocator();
UserServicesSoapStub stub = (UserServicesSoapStub) locator.getUserServicesSoap();
response = stub.userList(request);//here the request data values not mapping at external system side
} catch(Exception e) {
e.printStackTrace();
}
return response;
}
SOAP UI Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prim="http://*****/UserServices">
<soapenv:Header/>
<soapenv:Body>
<prim:UserList>
<!--Optional:-->
<prim:XMLRequest>
<!--Optional:-->
<prim:Header>
<!--Optional:-->
<prim:MessageID>1</prim:MessageID>
<!--Optional:-->
<prim:CorrelationID>1</prim:CorrelationID>
<!--Optional:-->
<prim:SystemID>C</prim:SystemID>
<!--Optional:-->
<prim:RequestorID>1</prim:RequestorID>
</prim:Header>
<prim:Reference>Account</prim:Reference>
<!--Optional:-->
<prim:Number>100987600</prim:Number>
</prim:XMLRequest>
</prim:UserList>
</soapenv:Body>
</soapenv:Envelope>
The request is hitting the External Soap server but Soap server getting the all values (both Header & Body data)in the request as null.
I am unable to get why the values are going to null even i am passing the values from SOAP UI.
I am not getting even i am doing anything wrong here.Can anyone please help on this.