Hi Brian,

On Wed, Jul 28, 2010 at 10:04 PM, Brian Sellden <[email protected]>wrote:

> Hello,
>
> I've searched for hours for an answer to this without success.  I've
> created
> a minimal example that demonstrates the issue.  I'm simply attempting to
> use
> the xslt mediator to transform an incoming SOAP request, logging the before
> and after XML.  I'm getting the 'SynapseConfigUtils Cannot convert null to
> a
> StreamSource' error no matter what I do.


This error usually occurs when you try to load some resource from a
non-existing key. In this case I think the resource is the XSLT definition.


> I read *somewhere* that I may have
> out of date axiom libraries, so I upgraded to 1.2.9 - no change.
>
> Sorry if I should attach this instead of pasting inline:
>
> <definitions xmlns="http://ws.apache.org/ns/synapse";>
>
>
>
>      <!-- These transforms create ESB faults -->
>
>      <localEntry key="CustomerDetailsClientFault_xsl"
>
>
>
> src="file:WEB-INF/repository/transforms/esbProxy/createCustomerDetailsClient
> Fault.xsl" />
>
>      <localEntry key="CustomerPurchaseClientFault_xsl"
>
>
>
> src="file:WEB-INF/repository/transforms/esbProxy/createCustomerPurchaseClien
> tFault.xsl" />
>
>      <localEntry key="CustomerSecurityClientFault_xsl"
>
>
>
> src="file:WEB-INF/repository/transforms/esbProxy/createCustomerSecurityClien
> tFault.xsl" />
>
>      <localEntry key="SubscriptionManagementClientFault_xsl"
>
>
>
> src="file:WEB-INF/repository/transforms/esbProxy/createSubscriptionManagemen
> tClientFault.xsl" />
>
>
>
>      <!-- These transforms convert between ContentDirect and ESB messages
> -->
>
>      <localEntry key="GetCustomerPaymentOptionsRequest_xsl"
>
>
>
> src="file:WEB-INF/repository/transforms/esbProxy/createGetCustomerPaymentOpt
> ionsRequest.xsl" />
>
>      <localEntry key="GetCustomerPaymentOptionsResponse_xsl"
>
>
>
> src="file:WEB-INF/repository/transforms/esbProxy/createGetCustomerPaymentOpt
> ionsResponse.xsl" />
>
>
>
>      <!-- Sequences for support of the alpha flight -->
>
>      <sequence name="in_GetCustomerPaymentOptionsAlpha">
>
>            <log level="full" />
>
>            <xslt key="createGetCustomerPaymentOptionsRequest_xsl" />
>
>            <log level="full" />
>
>      </sequence>
>
>
>
>      <sequence name="out_GetCustomerPaymentOptionsAlpha">
>
>            <log level="full" />
>
>            <xslt key="createGetCustomerPaymentOptionsResponse_xsl" />
>
>            <log level="full" />
>
>      </sequence>
>
>
>
>      <sequence name="fault_GetCustomerPaymentOptionsAlpha">
>
>            <log level="full" />
>
>            <xslt key="CustomerPurchaseClientFault_xsl">
>
>                  <property name="CODE"
> expression="get-property('ERROR_CODE')" />
>
>                  <property name="MESSAGE"
> expression="get-property('ERROR_MESSAGE')" />
>
>            </xslt>
>
>            <log level="full" />
>
>      </sequence>
>
>
>
>      <proxy name="CustomerPurchase" transports="http | https">
>
>            <target inSequence="in_GetCustomerPaymentOptionsAlpha"
>
>                  outSequence="out_GetCustomerPaymentOptionsAlpha"
> onError="fault_GetCustomerPaymentOptionsAlpha" />
>
>            >
>
>      </proxy>
>
> </definitions>
>
>
>
>
>
> Pretty simple, right?  Here's the error:
>
> 2010-07-28 16:02:31,745 INFO  [STDOUT] 2010-07-28 16:02:31,745
> [192.168.200.51-bluefish] [HttpServerWorker-1]  INFO LogMediator To:
> /esb/services/CustomerPurchase, WSAction:
>
> /WebServices/CustomerPurchase/CustomerPurchaseService.serviceagent/CustomerP
> urchasePortTypeEndpoint/GetCustomerPaymentOptions, SOAPAction:
>
> /WebServices/CustomerPurchase/CustomerPurchaseService.serviceagent/CustomerP
> urchasePortTypeEndpoint/GetCustomerPaymentOptions, MessageID:
> urn:uuid:68761647C39C5F4D6D1280332951656, Direction: request, Envelope:
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> "><soapenv:Body><GetCust
> omerPaymentOptions
> xmlns="http://aircell.com/ws/broadband/customerpurchase
> "><Requester>GOGO_VID
> EO</Requester><UserName>vidtest1000</UserName><Tracking><TransactionId
>
> xmlns="">transaction_id</TransactionId></Tracking></GetCustomerPaymentOption
> s></soapenv:Body></soapenv:Envelope>
>
> 2010-07-28 16:02:31,775 INFO  [STDOUT] 2010-07-28 16:02:31,775
> [192.168.200.51-bluefish] [HttpServerWorker-1]  WARN SynapseConfigUtils
> Cannot convert null to a StreamSource
>
> 2010-07-28 16:02:31,775 INFO  [STDOUT] 2010-07-28 16:02:31,775
> [192.168.200.51-bluefish] [HttpServerWorker-1] ERROR XSLTMediator Error
> creating XSLT transformer using :
> createGetCustomerPaymentOptionsRequest_xsl
>

Your XSLT mediator is trying to load its configuration from a key named
"createGetCustomerPaymentOptionsRequest_xsl". But you don't have a local
entry defined with this key. Please define your local entries correctly.

Thanks,
Hiranya


>
> org.apache.synapse.SynapseException: Cannot convert null to a StreamSource
>
>                at
>
> org.apache.synapse.config.SynapseConfigUtils.handleException(SynapseConfigUt
> ils.java:315)
>
>                at
>
> org.apache.synapse.config.SynapseConfigUtils.getStreamSource(SynapseConfigUt
> ils.java:53)
>
>                at
>
> org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator
> .java:269)
>
>                at
>
> org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.jav
> a:177)
>
>                at
>
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediat
> or.java:58)
>
>                at
>
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.
> java:125)
>
>                at
>
> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServi
> ceMessageReceiver.java:149)
>
>                at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
>
>                at
>
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
> TPTransportUtils.java:275)
>
>                at
>
> org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.jav
> a:253)
>
>                at
> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
>
>                at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
> va:886)
>
>                at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
> 08)
>
>                at java.lang.Thread.run(Thread.java:619)
>
> 2010-07-28 16:02:31,785 INFO  [STDOUT] 2010-07-28 16:02:31,785
> [192.168.200.51-bluefish] [HttpServerWorker-1] ERROR XSLTMediator Unable to
> perform XSLT transformation using :
> createGetCustomerPaymentOptionsRequest_xsl against source XPath :
> s11:Body/child::*[position()=1] | s12:Body/child::*[position()=1]
>
> org.apache.synapse.SynapseException: Error creating XSLT transformer using
> :
> createGetCustomerPaymentOptionsRequest_xsl
>
>                at
>
> org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediat
> or.java:220)
>
>                at
>
> org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator
> .java:275)
>
>                at
>
> org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.jav
> a:177)
>
>                at
>
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediat
> or.java:58)
>
>                at
>
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.
> java:125)
>
>                at
>
> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServi
> ceMessageReceiver.java:149)
>
>                at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
>
>                at
>
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
> TPTransportUtils.java:275)
>
>                at
>
> org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.jav
> a:253)
>
>                at
> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
>
>                at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
> va:886)
>
>                at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
> 08)
>
>                at java.lang.Thread.run(Thread.java:619)
>
> Caused by: org.apache.synapse.SynapseException: Cannot convert null to a
> StreamSource
>
>                at
>
> org.apache.synapse.config.SynapseConfigUtils.handleException(SynapseConfigUt
> ils.java:315)
>
>                at
>
> org.apache.synapse.config.SynapseConfigUtils.getStreamSource(SynapseConfigUt
> ils.java:53)
>
>                at
>
> org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator
> .java:269)
>
>                ... 11 more
>
>
>
> Thanks very much for any help -
>
>
>
> Brian.
>
>
>
>


-- 
Hiranya Jayathilaka
Senior Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: [email protected];  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Reply via email to