You need to sign in to do that
Don't have an account?
Anant Agarwal 15
Issue in SOAP Header while making WebService Call
Hi All,
The WSDL I am generating through WSDL2Apex does not include the necessary SOAP Headers. Is there anyway to modify the generated apex code to include the SOAP Header properties? If so, how do I do that? I see the inputHttpHeaders__x but I am looking for the equivalent for SOAP Headers (if they exist)?
If I am making a callout without header then I am getting the Error : "Wrong UserSessionID : ORA-20103: no such user session id; ORA-06512: at -GCONF_NGE.CHECK_USER_SESSION_ID-" which is obvious as i am not authenticating first.
I need to set header in the given fromat:
<soapenv:Header>
<wlm:Security xmlns:wlm= " http://schemas.xmlsoap.org/ws/2002/04/secext " >
<wlm:Authentication wlm:login= " test” wlm:password= " test”/>
</wlm:Security>
</soapenv:Header>
Don't know how to set this header in the SOAP Request.
Here is my generated code that i need to call:
The WSDL I am generating through WSDL2Apex does not include the necessary SOAP Headers. Is there anyway to modify the generated apex code to include the SOAP Header properties? If so, how do I do that? I see the inputHttpHeaders__x but I am looking for the equivalent for SOAP Headers (if they exist)?
If I am making a callout without header then I am getting the Error : "Wrong UserSessionID : ORA-20103: no such user session id; ORA-06512: at -GCONF_NGE.CHECK_USER_SESSION_ID-" which is obvious as i am not authenticating first.
I need to set header in the given fromat:
<soapenv:Header>
<wlm:Security xmlns:wlm= " http://schemas.xmlsoap.org/ws/2002/04/secext " >
<wlm:Authentication wlm:login= " test” wlm:password= " test”/>
</wlm:Security>
</soapenv:Header>
Don't know how to set this header in the SOAP Request.
Here is my generated code that i need to call:
public String WSExpCreateHousehold(String param0) { wsMmFr.WSExpCreateHousehold_element request_x = new wsMmFr.WSExpCreateHousehold_element(); request_x.param0 = param0; wsMmFr.WSExpCreateHouseholdResponse_element response_x; Map<String, wsMmFr.WSExpCreateHouseholdResponse_element> response_map_x = new Map<String, wsMmFr.WSExpCreateHouseholdResponse_element>(); response_map_x.put('response_x', response_x); WebServiceCallout.invoke( this, request_x, response_map_x, new String[]{endpoint_x, 'urn:WSExpCreateHousehold', 'http://ws.mm.fr', 'WSExpCreateHousehold', 'http://ws.mm.fr', 'WSExpCreateHouseholdResponse', 'wsMmFr.WSExpCreateHouseholdResponse_element'} ); response_x = response_map_x.get('response_x'); return response_x.return_x; }
WebServiceCallout.invoke
.