cancel
Showing results for 
Search instead for 
Did you mean: 

Message Listener (listener and message creation)

Former Member
0 Kudos

Hi all,

I was hoping for some help regarding XMII's Message Services. I'm relatively new to all this and have searched these forums as well as many other places but could not find anything that has fully answered my questions or solved my problem. I have two related questions:

1) Is it possible to set up a Message Listener that listens for messages coming from a non-SAP system? If so could someone point me towards some information regarding how to set this up? In short, I'd like it if I could set up an XMII message listener that communicates with a custom built MES created by my company via web services.

2) More importantly than the first question, I have been trying to use the default message listener in XMII but cannot get a message to appear in the Message Monitor. I've created an HTTP Post transaction that uses the following URL:

http://<server>:<port>/XMII/Illuminator?service=WSMessageListener&mode=WSMessageListenerServer&NAME=...;

I am certain I've entered my server and port correctly and I am under the impression that <UniqueMessageName> can be anything that can later be used to identify the message so I usually replace it with "test" (without the quotation marks of course). Also, I ask it to post an XML document located in my WEB folder using the following path:

web://Default/WEB/TestXML.xml

When running the transaction and tracing the output. It returns that the post was successful in the console. Similarly, running the same web call from a browser yields a small html table stating "Successfully received webservice message". Needless to say, having nothing appear in the Message Monitor at this point is frustrating.

Any help would be appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Christopher,

please check if you have set the Content-Type to text/html. Otherwise you will find an error in the NetWeaver Log indicating that MII does not find a contents for a specific field.

You should also add "&Session=false" to avoid that the webservice user creates a session.


URL:
http://<server>:<port>/XMII/Illuminator?service=WSMessageListener
&mode=WSMessageListenerServer
&name=<yourname>&Session=false
 
Content-Type: text/html

You should also set the encoding to UTF-8.

Michael

Edited by: Michael Otto on Nov 11, 2009 5:07 PM

Former Member
0 Kudos

Michael,

Thanks a bunch, the problem was with the content type. I could not find any listings of what was valid in that field during any searches so I assumed the default was ok.

That solves the more important question now I just need confirmation on the first one.

Former Member
0 Kudos

Christopher,

if you now have set up the WSMessageListener, this one can also be called by external functions. Alternatively you can call any MII transaction as a webservice.

For example, you can use something like this:

http://<server>:<port>/XMII/WSDLGen/<folder>/<tran>

You can also user the runner service (the example gives a pdf output):

http://<server>:<port>/XMII/Runner?Transaction=<folder>/<Transaction-name>
&<InpuParamName1>=<value1>
&<InpuParamName n>=<value n>
&OutputParameter=pdfOutput
&Content-Type=application/pdf
&isBinary=true
&XacuteLoginName=<username>&XacuteLoginPassword=<password>

Michael

Former Member
0 Kudos

Michael,

Perfect! I think that should work just fine for my needs. You have been very helpful - thanks again!

Former Member
0 Kudos

Regarding the first question the xmii message listener is the entry point for non SAP systems. You do not need to set up another listener. If I remember correctly I dont think you could set up another non SAP listener if you wanted to

former_member4529
Active Contributor
0 Kudos

Hi,

While sending XML message to MII from non-SAP system via the XMIIMESSAGELISTENER you need to use the following URL:

http://<server>:<port>/XMII/Illuminator?service=WSMessageListener&mode=WSMessageListenerServer&NAME=...

(need to specify content-type)

Also you need to provide basic authentication while posting the XML message as HTTP payload to this URL. The MII user you may use should have the security service WSMessageListener assigned to one of its UME roles.

You can create a processing rule using the message name specified in the NAME parameter of the URL. If you don't specify any NAME parameter in the URL then the root node of the XML message will be considered as the message name.

Thanks,

Dipankar

Answers (1)

Answers (1)

Former Member
0 Kudos

Are you posting with a valid user and password? Did you check under 'Messages Without Rules'?

Former Member
0 Kudos

Yes I am - in fact just before I saw this post, I was checking my relavent permissions via Netweaver and inside XMII's System Security. I'm currently using my own account in an attempt to post the message and that account is an administrator account with all the associated permissions.

When i check for messages, I check under the Message Monitor as well as the Messages Without Rules. However, I have created an associated rule with this message for testing purposes as I was afraid the message was getting cleaned up and deleted. If the message did fire the rule i created, it would trigger a transaction that writes to a file but so far no luck with the file.