Yes, you are correct, but the problem is if there is a action in the message the transport header SOAPAction will be overridden by the message serialization to the transport.
Thanks, Ruwan On Thu, Oct 16, 2008 at 9:58 AM, Saliya Ekanayake <[EMAIL PROTECTED]> wrote: > Thank you very much for the info Ruwan. I used the property mediator > approach to overcome a similar issue I faced when working with JMS to HTTP > scenario with ESB. So based on your explanation, it seems that the header > mediator is specifically designed to work with headers where as the property > mediator can be used to set/remove any property in general. Please correct > me if I am wrong here. Anyway I will sure have a look at the code. > > Thanks > Saliya > > Ruwan Linton wrote: > >> Saliya, >> >> I guess what Paul suggested is the correct way of doing this, because even >> though you set the transport header it will be overridden by the message >> context action value. So there is a special header called Action in the >> header mediator which will call the messageContext.setAction() with the >> given value which is the correct approach. >> >> Further there are some more special headers that the header mediator takes >> care of and you could have a look at the header mediator source to find >> them. (For example: To, ReplyTo, From) >> >> Thanks, >> Ruwan >> >> On Thu, Oct 16, 2008 at 9:09 AM, Saliya Ekanayake <[EMAIL PROTECTED]> >> wrote: >> >> >> >>> Hi Joaquin, >>> >>> Use the Property mediator to set the SOAP Action header. See the example >>> below. >>> >>> <syn:property name="SOAPAction" value="echo" scope="transport"/> >>> >>> Note: you have to set the scope to transport. >>> >>> Regards, >>> Saliya >>> >>> >>> Paul Fremantle wrote: >>> >>> >>> >>>> Joaquin >>>> >>>> I think what is happening is that Axis2 is expecting a SOAP Action for >>>> the operation, and that isn't set, because that doesn't exist in JMS. >>>> >>>> Please add a mediator: >>>> <header name="Action" value="urn:echo"/> >>>> >>>> (Assuming that is the right action for your service). >>>> >>>> Paul >>>> >>>> >>>> On Wed, Oct 15, 2008 at 4:24 PM, Joaquin Caraballo >>>> <[EMAIL PROTECTED]> wrote: >>>> >>>> >>>> >>>> >>>>> Hi everybody, >>>>> >>>>> I'm trying to forward a message received from a jms queue to a SOAP >>>>> service, but the message doesn't arrive to the SOAP service. Instead, >>>>> I get a "HTTP/1.1 500 The endpoint reference (EPR) for the Operation >>>>> not found" error. >>>>> >>>>> My synapse.xml looks like this: >>>>> >>>>> <definitions xmlns="http://ws.apache.org/ns/synapse"> >>>>> <proxy name="queueName" transports="jms"> >>>>> <target> >>>>> <inSequence> >>>>> <class name="path.to.DummyMediator" /> >>>>> </inSequence> >>>>> <endpoint> >>>>> <wsdl >>>>> uri="http://localhost:8081/axis2/services/EchoService?wsdl" >>>>> service="EchoService" port="EchoServiceHttpSoap11Endpoint"/> >>>>> </endpoint> >>>>> </target> >>>>> </proxy> >>>>> </definitions> >>>>> >>>>> Do you see any problems in my configuration? Please could you help me? >>>>> >>>>> Thanks a lot! >>>>> >>>>> Best regards, >>>>> >>>>> --Joaquin >>>>> >>>>> >>>>> >>>>> >>>>> I also include the logging lines around the EPR error: >>>>> >>>>> 2008-10-15 15:37:28,393 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> ProxyServiceMessageReceiver Forwarding the message to the anonymous >>>>> endpoint of the proxy service >>>>> 2008-10-15 15:37:28,393 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> WSDLEndpoint Start : WSDL Endpoint >>>>> 2008-10-15 15:37:28,393 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> WSDLEndpoint Sending message to WSDL endpoint : AnonymousEndpoint >>>>> resolves to address = >>>>> >>>>> >>>>> http://192.168.1.100:8081/axis2/services/EchoService.EchoServiceHttpSoap11Endpoint/ >>>>> 2008-10-15 15:37:28,393 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> WSDLEndpoint SOAPAction: null >>>>> 2008-10-15 15:37:28,393 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> WSDLEndpoint WSA-Action: null >>>>> 2008-10-15 15:37:28,396 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> Axis2FlexibleMEPClient Sending [add = false] [sec = false] [rm = >>>>> false] [mtom = false] [swa = false] [format = soap11] [force >>>>> soap11=true] [force soap12=false] [pox=false] [get=false] >>>>> [encoding=null] [to null] >>>>> 2008-10-15 15:37:28,410 [192.168.1.100-bob] [JMSWorker-1] INFO >>>>> TimeoutHandler This engine will expire all callbacks after : 86400 >>>>> seconds, irrespective of the timeout action, after the specified or >>>>> optional timeout >>>>> 2008-10-15 15:37:28,412 [192.168.1.100-bob] [JMSWorker-1] WARN >>>>> JMSConnectionFactory Error looking up destination with JNDI name : >>>>> __NONE__ to map its corresponding provider specific Destination name >>>>> 2008-10-15 15:37:28,412 [192.168.1.100-bob] [JMSWorker-1] WARN >>>>> JMSConnectionFactory JMS Destination with JNDI name : __NONE__ does >>>>> not exist >>>>> 2008-10-15 15:37:28,418 [192.168.1.100-bob] [JMSWorker-1] WARN >>>>> JMSConnectionFactory JMS Destination with JNDI name : __NONE__ created >>>>> 2008-10-15 15:37:28,419 [192.168.1.100-bob] [JMSWorker-1] INFO >>>>> JMSConnectionFactory Mapping JNDI name : __NONE__ and JMS Destination >>>>> name : __NONE__ against service : __NONE__ >>>>> 2008-10-15 15:37:28,419 [192.168.1.100-bob] [JMSWorker-1] WARN >>>>> JMSConnectionFactory Cannot find destination : __NONE__ Creating a >>>>> Queue with this name >>>>> 2008-10-15 15:37:28,421 [192.168.1.100-bob] [JMSWorker-1] INFO >>>>> JMSListener Started listening on destination : __NONE__ for service >>>>> __NONE__ >>>>> 2008-10-15 15:37:28,423 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> SynapseCallbackReceiver Callback added. Total callbacks waiting for : >>>>> 1 >>>>> 2008-10-15 15:37:28,433 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> ConnectionPool No connections available for reuse >>>>> 2008-10-15 15:37:28,435 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> HttpCoreNIOSender A new connection established to : 192.168.1.100:8081 >>>>> 2008-10-15 15:37:28,435 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> Axis2HttpRequest start streaming outgoing http request >>>>> 2008-10-15 15:37:28,462 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Connected >>>>> ([EMAIL PROTECTED]) >>>>> 2008-10-15 15:37:28,462 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler ClientHandler connected : [/192.168.1.100:8081] >>>>> 2008-10-15 15:37:28,465 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> SOAPMessageFormatter contentType from the OMOutputFormat =text/xml >>>>> 2008-10-15 15:37:28,465 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> SOAPMessageFormatter contentType returned =text/xml; charset=UTF-8 >>>>> 2008-10-15 15:37:28,469 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers >> POST >>>>> >>>>> >>>>> http://192.168.1.100:8081/axis2/services/EchoService.EchoServiceHttpSoap11Endpoint/ >>>>> HTTP/1.1 >>>>> 2008-10-15 15:37:28,469 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers >> Content-Type: text/xml; charset=UTF-8 >>>>> 2008-10-15 15:37:28,469 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers >> Transfer-Encoding: chunked >>>>> 2008-10-15 15:37:28,469 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers >> Host: 192.168.1.100:8081 >>>>> 2008-10-15 15:37:28,469 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers >> Connection: Keep-Alive >>>>> 2008-10-15 15:37:28,469 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers >> User-Agent: Synapse-HttpComponents-NIO >>>>> 2008-10-15 15:37:28,470 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> SOAPMessageFormatter start writeTo() >>>>> 2008-10-15 15:37:28,470 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> SOAPMessageFormatter preserve=false >>>>> 2008-10-15 15:37:28,470 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> SOAPMessageFormatter isOptimized=false >>>>> 2008-10-15 15:37:28,470 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> SOAPMessageFormatter isDoingSWA=false >>>>> 2008-10-15 15:37:28,471 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Output ready >>>>> 2008-10-15 15:37:28,471 [192.168.1.100-bob] [JMSWorker-1] DEBUG >>>>> SOAPMessageFormatter end writeTo() >>>>> 2008-10-15 15:37:28,471 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Content encoder >>>>> [chunk-coded; completed: false] >>>>> 2008-10-15 15:37:28,472 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Output ready >>>>> 2008-10-15 15:37:28,472 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Content encoder >>>>> [chunk-coded; completed: true] >>>>> 2008-10-15 15:37:28,472 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Request ready >>>>> 2008-10-15 15:37:28,486 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: HTTP/1.1 500 The >>>>> endpoint reference (EPR) for the Operation not found is >>>>> 192.168.1.100 >>>>> >>>>> http://192.168.1.100:8081/axis2/services/EchoService.EchoServiceHttpSoap11Endpoint/ >>>>> and the WSA Action = null >>>>> 2008-10-15 15:37:28,486 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler Received an internal server error with a SOAP payload >>>>> 2008-10-15 15:37:28,488 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers << HTTP/1.1 500 The endpoint reference (EPR) for the Operation >>>>> not found is 192.168.1.100 >>>>> >>>>> http://192.168.1.100:8081/axis2/services/EchoService.EchoServiceHttpSoap11Endpoint/ >>>>> and the WSA Action = null >>>>> 2008-10-15 15:37:28,488 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers << Date: Wed, 15 Oct 2008 14:37:28 GMT >>>>> 2008-10-15 15:37:28,488 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers << Server: Simple-Server/1.1 >>>>> 2008-10-15 15:37:28,488 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers << Transfer-Encoding: chunked >>>>> 2008-10-15 15:37:28,488 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers << Content-Type: text/xml; charset=UTF-8 >>>>> 2008-10-15 15:37:28,488 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> headers << Connection: Keep-Alive >>>>> 2008-10-15 15:37:28,488 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Input ready >>>>> 2008-10-15 15:37:28,492 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ConnectionPool Released a connection to host: 192.168.1.100 on port : >>>>> 8081 to the connection pool of current size : 1 >>>>> 2008-10-15 15:37:28,492 [192.168.1.100-bob] [I/O dispatcher 1] DEBUG >>>>> ClientHandler HTTP connection [/192.168.1.100:8081]: Content decoder >>>>> [chunk-coded; completed: true] >>>>> 2008-10-15 15:37:28,494 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> TransportUtils createSOAPEnvelope using Builder (class >>>>> org.apache.axis2.builder.SOAPBuilder) selected from type (text/xml) >>>>> 2008-10-15 15:37:28,498 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> SynapseCallbackReceiver Callback removed. Pending callbacks count : 0 >>>>> 2008-10-15 15:37:28,498 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> SynapseCallbackReceiver Synapse received an asynchronous response >>>>> message >>>>> 2008-10-15 15:37:28,498 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> SynapseCallbackReceiver Received To: null >>>>> 2008-10-15 15:37:28,498 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> SynapseCallbackReceiver SOAPAction: >>>>> 2008-10-15 15:37:28,498 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> SynapseCallbackReceiver WSA-Action: >>>>> 2008-10-15 15:37:28,505 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> SynapseCallbackReceiver Body : >>>>> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope >>>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ >>>>> "><soapenv:Body><soapenv:Fault >>>>> xmlns:axis2ns4="http://schemas.xmlsoap.org/soap/envelope/ >>>>> "><faultcode>axis2ns4:Client</faultcode><faultstring>The >>>>> endpoint reference (EPR) for the Operation not found is >>>>> 192.168.1.100 >>>>> >>>>> http://192.168.1.100:8081/axis2/services/EchoService.EchoServiceHttpSoap11Endpoint/ >>>>> and the WSA Action = >>>>> null</faultstring><detail><Exception>org.apache.axis2.AxisFault: The >>>>> endpoint reference (EPR) for the Operation not found is >>>>> 192.168.1.100 >>>>> >>>>> http://192.168.1.100:8081/axis2/services/EchoService.EchoServiceHttpSoap11Endpoint/ >>>>> and the WSA Action = null >>>>> at >>>>> >>>>> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:89) >>>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:333) >>>>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) >>>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163) >>>>> at >>>>> >>>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) >>>>> at >>>>> org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:278) >>>>> at >>>>> >>>>> org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281) >>>>> at >>>>> >>>>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187) >>>>> at >>>>> >>>>> org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82) >>>>> at >>>>> >>>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) >>>>> at >>>>> >>>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) >>>>> at java.lang.Thread.run(Thread.java:613) >>>>> </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> >>>>> 2008-10-15 15:37:28,507 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> Axis2SynapseEnvironment Injecting MessageContext >>>>> 2008-10-15 15:37:28,507 [192.168.1.100-bob] [HttpClientWorker-1] DEBUG >>>>> Axis2SynapseEnvironment Proxy service queueName does not specifies an >>>>> out-sequence - sending the response back >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> >> >> > > -- Ruwan Linton http://wso2.org - "Oxygenating the Web Services Platform" http://ruwansblog.blogspot.com/
