Questions tagged [soaphandler]

56 questions
8
votes
4 answers

Is there a guaranteed way to get operation name in a custom soap handler?

I have a custom SOAP message handler for incoming messages that will run different code based on which operation is being called. My first try to get the operation name looked something liket this: public boolean handleMessage(SOAPMessageContext…
FrustratedWithFormsDesigner
  • 26,726
  • 31
  • 139
  • 202
6
votes
1 answer

Getting "HttpServletRequest" in soapMessageContext - Axis Handler

I am trying to get "HttpServletRequest" in an AxisHandler's "handleMessage" method. My AxisHandler implements "SOAPHandler" as seen below code.. I need to get "HttpServletRequest" in "InBoundDirection", but it returns "null". How can I get…
emrah
  • 71
  • 1
  • 3
6
votes
4 answers

How can I pass data back from a SOAP handler to a webservice client?

(Following up on this question: Getting raw XML response from Java web service client) I've got a SOAP message handler that is able to get the raw XML of a web service response. I need to get this XML into the webservice client so I can perform some…
FrustratedWithFormsDesigner
  • 26,726
  • 31
  • 139
  • 202
5
votes
1 answer

Get the request of a SOAP response using SOAPHandler

I have an SOAPHandler. I need to capture the Request of the Response public class SOAPLoggingHandler implements SOAPHandler { @Override public boolean handleFault(SOAPMessageContext context) { …
andymrg
  • 204
  • 4
  • 14
5
votes
2 answers

getHeaders method from SoapHandler interface

Could you please explain what exactly the method getHeaders from SOAPHandler interface is supposed to do? http://docs.oracle.com/javaee/5/api/javax/xml/ws/handler/soap/SOAPHandler.html#getHeaders%28%29 I'm not sure if it creates additional headers…
danflu
  • 325
  • 8
  • 25
5
votes
3 answers

How to properly format a SOAP message envelope using a custom SOAPHandler

I have a class that implements the SOAPHandler interface. The handleMessage is defined as: public boolean handleMessage(SOAPMessageContext context) { SOAPMessage msg = context.getMessage(); SOAPPart part = msg.getSOAPPart(); SOAPEnvelope…
Tai Squared
  • 12,273
  • 24
  • 72
  • 82
3
votes
1 answer

missing header in soap request java

I have created SOAP client in pure java. Also I have implemented SOAPHandler to trace the SOAP requests and responses. But when I see the sysouts the header part is missing in the request. Note that I am calling an enterprise service and that…
N Patil
  • 71
  • 1
  • 5
3
votes
0 answers

SOAP Handler Fault not called when throwing an exception

I have a SOAP handle class and I added a statement to throw a custom runtime exception (first throwing throw new IntrusionException, then catching it, then throwing MyRuntimeException). According to…
user994165
  • 9,146
  • 30
  • 98
  • 165
3
votes
2 answers

Setting a custom cookie in the HTTP headers inside a SOAP Message handler

I need to create a Cookie with a specific name to be sent across in my web service calls to another network which has a routing logic based on it. When i try to set to the HTTP header in my SOAP handler using headers.put("Cookie",…
Kaleid-o-scope
  • 159
  • 2
  • 7
3
votes
2 answers

How to get the XML response body back from a JAX-WS client?

I've found a read a number of threads on here about how to retrieve the XML response from a JAX-WS client. In my case, the client is generated from the WSDL via Oracle's JDeveloper product and is going to invoke a Document/Literal service endpoint…
user1955401
  • 91
  • 1
  • 2
  • 8
2
votes
1 answer

Using a JAX-WS client, how do you get the SOAP header from a response?

Using a JAX-WS client, how do you get the SOAP header from a response? I'm guessing you can do it using the handleMessage method of a SOAPHandler, but I feel like I'm missing some more obvious, straight-forward way.
Mike M. Lin
  • 9,992
  • 12
  • 53
  • 62
2
votes
1 answer

SoapHandler not called after WS operation is executed

I have a servlet that also consumes SOAP WS (in doGet). I want to see SOAP envelope (or anything else in soap message). I adddd this code to my servlet class: class ClientHandlerResolver implements HandlerResolver { public List
DixieFlatline
  • 7,895
  • 24
  • 95
  • 147
2
votes
0 answers

How can I add namespace to header elements?

How can I add empty xmlns="" tag to header elements? Let's imagine we have same project in two servers. In this project I used the below SOAPHandler. First server send request with empty xmlns="" tagtest
MehmanBashirov
  • 641
  • 1
  • 7
  • 15
2
votes
1 answer

Getting response from java soap handler

I will be extremely grateful if someone share his experience in solving the following problem. I have a SOAP service in the JDK implementation (which is Metro, I believe). For the logging purpose we need to extract the body of both the incoming…
2
votes
0 answers

SOAPHandler handleMessage return custom fault

I have a custom SOAPHandler and the handleMessage() is as follows : public boolean handleMessage(SOAPMessageContext context) { // TODO Auto-generated method stub /* Step-1: Extract credentials from the SOAP header */ Boolean isOutbound =…
Kaliyug Antagonist
  • 3,512
  • 9
  • 51
  • 103
1
2 3 4