InnerGlare Absent Member.
Absent Member.
629 views

HPSM Web Service SOAP - How can I save incoming soap request to file or DB?

Hi,  all!

I created custom extaccess for my object.

This extaccess has some actions. All actions call JS script libraries for processing incoming requests.

I know how I can get action name was called in my Web Service:

 

function _populateCurrentAPIName() {	
	var objName = vars.$L_object;
	var actionName =  vars.$L_extaccess_file.action_names[vars.$L_2lower_index - 1];
	return system.functions.tolower(actionName/* + objName + ""*/);
}

However, I also want to get full incoming SOAP envelope as XML-string and save it to file or DB.

 

How can I do it? 

Does HPSM have any function (system.functions.*....*), script library or variable (e.g. vars.$L_* ... *) for this?

Thanks.

0 Likes
1 Reply
Outstanding Contributor.. AChandler Outstanding Contributor..
Outstanding Contributor..

Re: HPSM Web Service SOAP - How can I save incoming soap request to file or DB?

You may have already thought about this, but you can make a separate servlet with its own log to capture and print these SOAP requests and responses.

 

In your sm.cfg file, you probably have a line that looks like this (at least out-of-box; if it's been tailored it may look a little different):

 

#

# start a Service Manager listener

#

 

sm

 

If you add another line below that, looking something like this, you can direct the SOAP calls to this port instead - and use this port for only SOAP traffic, and your log (after the startup prints) will show the requests and responses:

 

#

# start a Service Manager listener

#

 

sm

sm -httpPort:13090 -debughttp:1 -log:../logs/SOAP.log

 

Anyway, just a thought. I don't know if this is quite what you need, but it may be a place to start.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.