« Return to Thread: Unable to Specify an Operation in a WS

Unable to Specify an Operation in a WS

by jsexton0 :: Rate this Message:

Reply to Author | View in Thread

Hi -

I'm working with a web service I'd like to call from Java code and from a BPEL.  The WS is implemented as an SA and an SE deployed on the same Glassfish instance I want to call it from.  A found that Netbeans generated tests, from an SA project, could not call the server because they seemed to fail to specify the operation (SOAPAction) in the HTTP header.

I went to some stand alone Java code, and it works fine, when I include like this:

            MimeHeaders header = mySoapRequest.getMimeHeaders();
            header.addHeader("SOAPAction", mySoapOperation);
            Object res = dispatch.invoke(mySoapRequest);

The operation is added to the HTTP header, and everything is fine.  (Java 1.6 on Windows)
Then I moved over to a Ubunti 8.10 box with Java 1.6.0.10.  On this box, not only am I unable to use the service from a BPEL, but no matter what I do, I can't seem to get the right service into the HTTP header from Java code either.  No matter what I do, the HTTP request header includes this:

SOAPAction = ""

Literally, two double quotes.  I can add new, bogus, header elements just fine, like so:

            MimeHeaders header = mySoapRequest.getMimeHeaders();
            header.addHeader("SomeEntry", "NothingSpecial");

But I can not override SOAPAction on the linux setup.  I've tried removing the headers, putting nonsense in (that should cause an error but doesn't), and all sorts of long-hand construction of the message, but the SOAPAction remains "" no matter what, on linux.  Even attempts to remove the SOAPAction item result in the same HTTP mesage.

I can call the operation fine using the SoapUI tool on either Ubuntu or Windows, and I checked the HTTP post on these calls, and they are correct.

Something in the dispatch object must be setting the SOAPAction.  I ran across this:

http://forums.java.net/jive/thread.jspa?threadID=637

It's not directly related, but it sure seems similar.  Even if there is a work around in Java, I'll need to call these operations from a BPEL also.  Any ideas?

Thank you

 « Return to Thread: Unable to Specify an Operation in a WS