JAVA Logger service

Hi guys
I have a service (virtualized service created from WSDL means no provider/ consumer descriptor)
Calling this service,the additional JAVA logger service has to be called too to log the http status code.
I could not get the status parameter from MessageContext . Can you give me a hint please.

Peter-- What all services did you use ? If possible any snapshots of your flow if possible ?


1)I have virtualized a WSDL. The service routes (Routing Protocols) the request as usual to a service which sends data back to caller if was successfull call, if not, nothing commes back.
2) I created a JAVA service( that should analyze the MessageContext for http response code (200 Ok, etc ).
Ths service is called from the virtual Service:
CS-> Response processing step -> add Step -> "webMethods IS Service"
(added UtilPackage.Util:CheckCode service )
When I trigger the VS service, I can call this JAVA and I get the MessageContext too. but there are everything else than the status code.
It seems in the MessageContext the status code is not available. Ok, but how do I access this status code inside my above object (

If it is not possible to get the parameter at all, is there any other Server environment parameter indicates the status of service call too?

I hope it is more clear


Peter, I understood your need but I am not quite sure why status code is not exist in your response. I could not comment on this untill I can see your code,is it possible to give snapshot of your code to suggest you further.


Here is my JAVA code snipt which displays all data from the MessageContex:

public static final void inspectMessageContext (IData pipeline)
throws ServiceException
// — <<IS-START(inspectMessageContext)>> —
// @sigtype java 3.5
IDataCursor cursor = pipeline.getCursor();

	//Get the Message Context Object
		Object obj = cursor.getValue();
		if(obj instanceof MessageContext){
			MessageContext msgContext = (MessageContext)obj;
			//Get the properties and iterate
			System.out.println(&quot;Inspecting the Message Context Properties>>>>>&quot;);
			for (Iterator iterator = msgContext.getPropertyNames(); iterator
					.hasNext();) {
				String prop = (String);
				System.out.println(&quot;Property:&quot; + prop + &quot; Value:&quot; + msgContext.getProperty(prop));
	// --- <<IS-END>> ---



Peter – Code is looking okay to me. Are you sure that ‘status code’ is coming as part of MessageContext. Can you please cross check your webService ?


check your web service
There is no Web service code! the only code is the JAVA code I sent you. The web service is only a virtualization, a proxy created from WSDL in CS.
In meanwhile I think the messageContext is not the right place to search for this code!
This is exactlly my question, how to get the code in my scenario! It seems form MessagesContext, not possible, but from what or how ?

INFO | jvm 1 | 2016/02/04 15:14:03 | Property:HTTP_METHOD Value:POST
INFO | jvm 1 | 2016/02/04 15:14:03 | Property:CREDENTIALS_PASSED Value:true
INFO | jvm 1 | 2016/02/04 15:14:03 | Property:use Value:literal
INFO | jvm 1 | 2016/02/04 15:14:03 | Property:OutTransportInfo
INFO | jvm 1 | 2016/02/04 15:14:03 | Property:HTTP_RESPONSE_CODE_CALLBACK

Above in output found this data:

Have you tried calling that webservice from soap client?
Whether you are getting any output while ruunnig the java service which you have created?
Please share the WSDL file just to verify/check if there is any tags are missing.

Seee my prvious messages (the output, the JAVA code) the WSDL is valid and simple
But which soapClient you mean and what does help if I call it in “soapclient” or not? I already said I call successfully and I get valid output(but not that stauts parameter)

Peter, if statusCode variable exist as part of MessageContext object then you should definitely get. Are you getting NULL or empty value ?