Sending XML over http using java program

First question I have is Why, Why are you not using the built-in http flow service?

Secondly you seem to be setting the authentication scheme to ‘webmethods’ instead of ‘basic’ (for username/password authentication).

First of all thanks for the reply

To answer your first question :

It is a java program that is calling a service in my Integration Service
over http. So the starting point of my application is not an integration server…(Wasn’t my idea)

Secondly cause the warning states that there is no credentials available for the ‘webMethods’ authentication realm at host, it seems to me that it is logic to put ‘webMethods’ as realm.

(i tried to put ‘basic’ but the result stays the same…)

greetz,

Wout

Wout,

This java command line app was built to send soap messages (also XML docs) to an Integration Server for some simple load testing.

This app was built based on widely available sample code. Use at your own risk, no warranties given or implied, don’t call me for support, blah, blah, blah.

Mark

SendSoapMsgHTTP.java
SendSoapMsgHTTP.java (5.0 k)

Wout,

Have you tried with “Basic” instead of “basic”?Since it might be casesensitive.

thanks guys for the replies…

So with the help of Mark’s example i manage to invoke the service i want… But i get this strange thing.

When i do a save pipeline the XML that i receive is in the ‘name’ part of the result. The value is set to null…

How is this possible???

greetz,

Wout

allright…

got it

Just forgot to put the Content-Type to text/xml

Thanks for the help

Wout

So I was able to transmit the XML over Http, and receive it … But the customer wants the following:

What i do now is :
PostMethod post = new PostMethod("http://host/invoke/service");

But what the client wants is to post the XML without the Invoke/service after the URL of the Integration Server.
It is possible to create a certain handler that will listen to a dedicated port and will invoke the service if an XML is received on this port?

Kind regards,

Wout

Wout,

I haven’t looked at Mark’s code that he sent, but if you are using TContext class then you should be able to set some parameters.

There is no generic receive service per se, but trading networks uses tn receive service.

If you are using a standard flow service, then you can create a content handler that invokes that specific flow service. You will need to create a custom content type like text/my-message-type that IS will key off of. Also, you will need to register the content handler.

There is an article written by Igor Androsov that addresses this problem here on wmusers.

Also, I believe through some prior correspondence, that you work for a webMethods Implmentation partner and you have access to Advantage. There is some info there as well.

If you have the eLearning passport, there is a short course there on Custom Content Handlers by one of the webm gurus.

HTH,

Ray

Wout,

Can you shed a little light on why your client wants to use a different URL? That might help us come up with some ideas.

There is a way to change the invoke directive to something else, but I’m not sure that is what your client wants?

You could always create a web page hosted in some other server that would accept an XML string and then immediately invoke the webMethods service. Seems like needless complexity to simply use a different URL.

Mark