Michael

I think I found the issue.. most probably the message you have at the time (i.e. with the HTTP 500) is an empty SOAP envelope? or contains no header. You could use the log level "full" to check it. Could you please file a JIRA for this so that we include this as a test before each of our releases? Depending on your urgency, we could provide you with a binary fix for this if required once the issue is sorted out

asankha

Michael Griffin wrote:
Asankha,

I've created a fault sequence as follows:
	<sequence name="defaultFaultSequence">
		<log level="custom">
			<property name="symbol"
value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/>
		</log>
		<makefault>
			<code value="tns:Receiver"
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
			<reason value="Unknown ZipCode"/>
			<detail>Here are the details.</detail>
		</makefault>
		<property name="RESPONSE" value="true"/>
		<header name="To" _expression_="get-property('ReplyTo')"/>
		<send />
	</sequence>

But when it fires (due to a 500 returned from the proxied service) I get a
null pointer exception(below).  Any ideas?

[HttpServerWorker-1] DEBUG MediatorFaultHandler - MediatorFaultHandler ::
handleFault
[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator
<defaultFaultSequence> :: mediate()
[HttpServerWorker-1] DEBUG AbstractListMediator - Implicit Sequence
<SequenceMediator> :: mediate()
[HttpServerWorker-1] DEBUG LogMediator - Log mediator :: mediate()
[HttpServerWorker-1] INFO  LogMediator - symbol =
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[HttpServerWorker-1] DEBUG FaultMediator - Fault mediator mediate()
[HttpServerWorker-1] DEBUG FaultMediator - Creating a SOAP fault using SOAP
1.1
Exception in thread "HttpServerWorker-1" java.lang.NullPointerException
        at
org.apache.synapse.mediators.transform.FaultMediator.makeSOAPFault(FaultMedi
ator.java:132)
        at
org.apache.synapse.mediators.transform.FaultMediator.mediate(FaultMediator.j
ava:97)
        at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediat
or.java:49)
        at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.
java:104)
        at
org.apache.synapse.mediators.MediatorFaultHandler.onFault(MediatorFaultHandl
er.java:65)
        at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:62)
        at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServi
ceMessageReceiver.java:167)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
TPTransportUtils.java:279)
        at
org.apache.axis2.transport.nhttp.ServerWorker.processPost(ServerWorker.java:
207)
        at
org.apache.axis2.transport.nhttp.ServerWorker.run(ServerWorker.java:171)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
75)
        at java.lang.Thread.run(Thread.java:595)



-----Original Message-----
From: Asankha C. Perera [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2007 2:05 PM
To: [email protected]
Subject: Fault Sequence


Michael

I changed the subject so that the mail indexes would be better for other
users who may be looking for the same topic..

The fault sequence of a proxy relates to the default 'fault' sequence of
a Synapse configuration. i.e. the faultSequence is used by Synapse when
it encounters an erroneous situation.

See
http://ws.apache.org/synapse/Synapse_Configuration_Language.html#sequence
"Synapse considers a sequence named "fault", or in its absence a
registry entry with a key "fault" as its general fault handler sequence.
If Synapse encounters an erroneous situation, it executes the defined
error handling sequence for the current context - which may be specified
as the 'onError' sequence for a sequence mediator. If a fault sequence
is not specified or cannot be found through the registry, Synapse will
create a defualt fault sequence that will perform a log of the message
at the log level 'full'."

The backend service returning a SOAP fault is not such a case. To handle
this particular case, you could use a filter mediator on the outSequence
to detect a SOAP fault and then a transformation to your desired
response/fault.

asankha

Michael Griffin wrote:
  
Thanks for the ideas.  I'll give them a try.

Do you know under what conditions the faultSequence is executed for a
    
proxy?
  
What I want to do is intercept faults generated by the proxied service and
generate a fault that is aligned with the published WSDL on the client
    
side
  
of the proxy.
  -----Original Message-----
  From: Asankha C. Perera [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 22, 2007 1:34 PM
  To: [email protected]
  Subject: Re: Dynamic Proxy??


  Hmm.. Just looked at the code, and I must admit, I never tried sending
messages out of Synapse through another proxy.. The default Java settings
"-DproxySet=true -DproxyHost=myhost -DproxyPort=myport" may help when
starting up Synapse - but I am not sure this may work with the low level
    
NIO
  
transport - but you could give it a try. As for logging, why not use
    
Synapse
  
to log the messages? Also TCPMon would be useful..

  asankha

  Michael Griffin wrote:
I'm just looking for some direction on how to configure synapse to send
    
it's
  
outbound requests through a proxy server so that I may watch the
    
traffic...
  
-----Original Message-----
From: Asankha C. Perera [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2007 12:35 PM
To: [email protected]
Subject: Re: Dynamic Proxy??


Michael

Both are possible.. I don't see any specific problems.. however, if you
have a specific concrete scenario for which you require implementation
help, I would be glad to help

asankha

Michael Griffin wrote:
  I'm sorry.  I wasn't clear.  I really want to do both.  Using Synapse as
    
a
  
proxy to an existing web service, I would like to use a dynamic definition
which I can't do but can use dynamic resources for the various things that
make up the definition of the proxy :-)  I would also like to interpose a
proxy server between Synapse and the proxied service's endpoint.
  -----Original Message-----
  From: Asankha C. Perera [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 22, 2007 12:18 PM
  To: [email protected]
  Subject: Re: Dynamic Proxy??


  Michael

  Sorry, your question is not clear to me.. do you want to use Synapse as
    a
  proxy? (i.e. for clients that connect to services through Synapse) or
    
for
  
Synapse to connect to external services (on behalf of its clients) through
    a
  proxy?

  asankha

  Michael Griffin wrote:
Okay thanks.  Do you know of an easy way to get the synapse to use a proxy
server?

-----Original Message-----
From: Asankha C. Perera [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2007 12:01 PM
To: [email protected]
Subject: Re: Dynamic Proxy??


Michael

This is a mistake in our documentation and I apologize for any
inconvenience caused. We currently do not support Dynamic proxies

asankha

Michael Griffin wrote:
  In the documentation for the configuration language there is a reference
    to
  being able to create a dynamic proxy using a key to a remote registry
definition.  Does anyone know how to configure this?  I tried things like
<proxy key="..."/> without any luck.  Ideally I would like to put my
complete proxy definition in an external file, and reference it in the
synapse configuration via key.

Thanks,
Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  --------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  --------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]


    

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to