RelayUtils Error while building Passthrough stream-error in wso2esb - wso2

I'm using wso2esb 4.7.0 and wso2dss 3.0.0..I have written a query in wso2dss.It's working fine in dss. also but when i wish to work with wso2esb in sequence mediator it shows error as above
ERROR - RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:55)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:118)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:116)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:91)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:62)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:232)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2116)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2022)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1114)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 20 more
.
.
My proxy service is :
<inSequence>
<property name="messageType" value="application/json" scope="axis2"/>
<property name="username"
expression="//username/text()"
scope="default"
type="STRING"/>
<property name="userid"
expression="//userid/text()"
scope="default"
type="STRING"/>
<log>
<property name="username" expression="get-property('username')"/>
<property name="userid" expression="get-property('userid')"/>
</log>
<payloadFactory media-type="xml">
<format>
<p:trail_op xmlns:p="http://ws.wso2.org/dataservice">
<p:username>$1</p:username>
<p:userid>$2</p:userid>
</p:trail_op>
</format>
<args>
<arg evaluator="xml" expression="get-property('username')"/>
<arg evaluator="xml" expression="get-property('userid')"/>
</args>
</payloadFactory>
<header name="Action" value=""/>
<property name="SOAPAction" value="" scope="transport"/>
<send receive="Capp_Login_seq1">
<endpoint>
<address uri="http://192.168.1.23:9764/services/Capp_muser_dataservice/"
format="soap12"/>
</endpoint>
</send>
<log level="full"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
and sequence is:
<sequence xmlns="http://ws.apache.org/ns/synapse" name="Capp_Login_seq1">
<property name="messageType" value="application/json" scope="axis2"/>
<property xmlns:ns="http://org.apache.synapse/xsd" xmlns:s="http://ws.wso2.org/dataservice" name="userid" expression="get-property('userid')" scope="default" type="STRING"/>
<log>
<property xmlns:ns="http://org.apache.synapse/xsd" name="userid" expression="get-property('userid')"/>
</log>
<send/>
</sequence>
I'm sending request like:
curl -v -H "Accept:application/json" -H "Content-Type:application/json" -d '{"username":"Harry","userid":"347367127872701992"}' http://youtility-desktop:8282/services/Capp_LoginProxy
How should i fix the error? Please let me know..

I got the same issue in ESB 5 and DAS 3. It could get fixed by adding relevant messageFormatters and messageBuilders in axis2.xml located in esb/repository/conf/axis2.xml
In my scenario, these two entries were added to axis2.xml
messageFormatter contentType="text/html"
class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
messageBuilder contentType="text/html" class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
 

Related

SOAPProcessingException occurred when execute the artifact in WSO2 ESB

I used WSO2 ESB 5.0. I used two soap endpoints to get the response. Below mention the proxy service code.
<?xml version="1.0" encoding="UTF-8"?>
<inSequence xmlns="http://ws.apache.org/ns/synapse">
<log/>
<property expression="//sam:getCertificateID/sam:vehicleNumber"
name="getVehicleNo" scope="default" type="STRING" xmlns:sam="http://sample.esb.org"/>
<log>
<property expression="get-property('default','getVehicleNo')" name="VehicleNo"/>
</log>
<call>
<endpoint>
<wsdl port="EmissionTestServiceHttpSoap11Endpoint"
service="EmissionTestService" uri="http://172.17.0.1:9763/services/EmissionTestService?wsdl"/>
</endpoint>
</call>
<property expression="//ns:getCertificateIDResponse/ns:return"
name="getCertificateIDResponse" scope="default" type="STRING" xmlns:ns="http://sample.esb.org"/>
<log>
<property
expression="get-property('default','getCertificateIDResponse')" name="CertificateID"/>
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:sam="http://sample.esb.org" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<sam:getPolicyID>
<sam:vehicleNumber>$1</sam:vehicleNumber>
</sam:getPolicyID>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="get-property('default','getVehicleNo')"/>
</args>
</payloadFactory>
<log/>
<property name="messageType" scope="axis2" type="STRING" value="application/soap+xml"/>
<call>
<endpoint>
<wsdl port="InsuranceServiceHttpSoap11Endpoint"
service="InsuranceService" uri="http://172.17.0.1:9763/services/InsuranceService?wsdl"/>
</endpoint>
</call>
<property expression="//ns:getPolicyIDResponse/ns:return"
name="getPolicyIDResponse" scope="default" type="STRING" xmlns:ns="http://sample.esb.org"/>
<log>
<property
expression="get-property('default','getPolicyIDResponse')" name="PolicyID"/>
</log>
</inSequence>
First endpoint is working fine and gave the specific log messages. But when going to call second endpoint, below error message is occurred.
Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found faultstring
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:305)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:252)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:234)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:65)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:148)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:137)
... 14 more
Can you help me to solve this issue. Any help or workarounds are really appreciated.
Your endpoint is not returning an soap Envelope. You can see what's happening if you set 'configure->logging->apache.synapse.tranport.http.wire' to 'debug'.
Because the endpoint is not returning SOAP, but likely plain old XML you can try setting
<property name="messageType" value="application/xml" scope="axis2"/>
<property name="ContentType" value="application/xml" scope="axis2"/>
before sending the message.

WSO2 EI 6.3.0 Log Error while loading the registry resource

I have a proxy in WSO2 Enterprise Integrator 6.3.0 with endpoint configured in conf registry. Sometimes I receive errors in this proxy with message in LOG:
[2018-09-12 09:33:22,542] [-1234] [] [SynapseWorker-11] ERROR {org.apache.synapse.config.xml.endpoints.LoadbalanceEndpointFactory} - Invalid endpoint configuration.
[2018-09-12 09:33:22,542] [-1234] [] [SynapseWorker-11] WARN {org.apache.synapse.config.SynapseConfiguration} - Error while loading the resource conf:services/corp/servicev1/endpoint/ERPEndpoint.xml from the remote registry. Previously cached value will be used. Check the registry accessibility.
[2018-09-12 09:33:22,545] [-1234] [] [SynapseWorker-11] INFO {org.apache.axis2.transport.http.HTTPSender} - Unable to sendViaPost to url[http://...address ommited...]
java.net.SocketException: Connection reset
It seems to me it doesn't catch the endpoint of registry or cache.
PS: In my registry the address endpoint is with dns name and when this error occurs the address endpoint appears with IP address.
How to fix this?
Below the sequence and endpoint:
<sequence name="PessoaService_inserirPessoaFisicaNacionalV1_MessageProcessorSequence" onError="PessoaService_GenericFaultHandlerSequence" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<property name="PROXY_NAME" scope="default" type="STRING" value="PessoaService_inserirPessoaFisicaNacionalV1_LocalProxy"/>
<property name="SERVICE_VERSION" scope="default" type="STRING" value="1.0"/>
<property expression="$header/wsa:MessageID" name="MessageIdConsumidor" scope="default" type="STRING" xmlns:wsa="http://www.w3.org/2005/08/addressing"/>
<property expression="$header/ns:ApplicationName" name="applicationName" scope="default" type="STRING" xmlns:ns="https://ws.apache.org/axis2"/>
<log level="custom">
<property name="PessoaService_inserirPessoaFisicaNacionalV1_MessageProcessorSequence" value="Started"/>
</log>
<enrich>
<source clone="true" type="envelope"/>
<target property="BODY_ORIGINAL" type="property"/>
</enrich>
<dblookup>
<connection>
<pool>
<dsName>ESB</dsName>
</pool>
</connection>
<statement>
<sql>
<![CDATA[select codigo_configuracao, cnpj_empresa from esb.codigo_configuracao where aplicacao = ? and tipo_pessoa = 'fisica']]>
</sql>
<parameter expression="get-property('applicationName')" type="CHAR"/>
<result column="codigo_configuracao" name="codigo_configuracao"/>
<result column="cnpj_empresa" name="cnpj_empresa"/>
</statement>
</dblookup>
<log level="custom">
<property expression="$ctx:codigo_configuracao" name="PessoaService_inserirPessoaFisicaNacionalV1 [codigo_configuracao]"/>
<property expression="$ctx:cnpj_empresa" name="PessoaService_inserirPessoaFisicaNacionalV1 [cnpj_empresa]"/>
<property expression="get-property('applicationName')" name="PessoaService_inserirPessoaFisicaNacionalV1 [applicationName]"/>
</log>
<call-template target="PessoaService_LoginTemplate">
<with-param name="username" value="username"/>
<with-param name="password" value="pass"/>
<with-param name="companyHandle" value="-1"/>
<with-param name="branchHandle" value="-1"/>
</call-template>
<xslt key="conf:services/corp/pessoaservicev1/transformation/InserirPessoaFisicaNacionalRequest_IntegrarRequestTransformation.xslt">
<property expression="$ctx:AuthenticationTokenId" name="AuthenticationTokenId"/>
<property expression="$ctx:cnpj_empresa" name="cnpjEmpresa"/>
<property expression="$ctx:codigo_configuracao" name="codigoConfiguracao"/>
</xslt>
<log level="custom">
<property expression="$body" name="PessoaService_inserirPessoaFisicaNacionalV1_MessageProcessorSequence [request ERP]"/>
</log>
<enrich>
<source clone="true" type="body"/>
<target property="RequestERP" type="property"/>
</enrich>
<header action="remove" name="Action" scope="default"/>
<header name="Action" scope="default" value="http://.com.br/corporativo/PessoaService/Pessoa/Integrar"/>
<property expression="get-property('registry', 'conf:services/corp/pessoaservicev1/parameters/endpointCallback.properties')" name="endpointCallback" scope="default" type="STRING"/>
<payloadFactory media-type="xml">
<format>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>$1</wsa:Action>
<wsa:ReplyTo>
<wsa:Address>$2</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>$3</wsa:MessageID>
</soap:Header>
<soap:Body>$4</soap:Body>
</soap:Envelope>
</format>
<args>
<arg value="http://.com.br/corporativo/PessoaService/Pessoa/Integrar"/>
<arg evaluator="xml" expression="$ctx:endpointCallback"/>
<arg evaluator="xml" expression="get-property('MessageID')"/>
<arg evaluator="xml" expression="$body/pes:Integrar" xmlns:pes="http://.com.br/corporativo/PessoaService"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="conf:services/corp/pessoaservicev1/endpoint/ERPEndpoint.xml"/>
</call>
<log level="custom">
<property expression="$body" name="PessoaService_inserirPessoaFisicaNacionalV1_MessageProcessorSequence [ERP Response]"/>
</log>
<filter xmlns:ns="http://.com.br/corporativo/PessoaService" xpath="$body//ns:CodigoRetorno = 'ProcessamentoOK'">
<then>
<call-template target="PessoaService_LogoutTemplate">
<with-param name="AuthenticationTokenId" value="{$ctx:AuthenticationTokenId}"/>
</call-template>
</then>
<else>
<call-template target="PessoaService_LogoutTemplate">
<with-param name="AuthenticationTokenId" value="{$ctx:AuthenticationTokenId}"/>
</call-template>
<property expression="get-property('ReplyTo')" name="uri.var.full" scope="default" type="STRING"/>
<log level="custom">
<property expression="get-property('ReplyTo')" name="PessoaService_inserirPessoaFisicaNacionalV1_MessageProcessorSequence [Processamento NOK - callback endpoint]"/>
</log>
<call>
<endpoint key="conf:services/corp/pessoaservicev1/endpoint/CallbackDynamicEndpoint.xml"/>
</call>
</else>
</filter>
<payloadFactory media-type="xml">
<format>
<p:insert_smart_proxy_operation xmlns:p="http://ws.wso2.org/dataservice">
<p:message_id>$1</p:message_id>
<p:correlation_id>$2</p:correlation_id>
<p:to_address/>
<p:reply_address>$3</p:reply_address>
<p:message>$4</p:message>
<p:status>OK</p:status>
<p:data_processamento>$5</p:data_processamento>
<p:relates_to>$2</p:relates_to>
</p:insert_smart_proxy_operation>
</format>
<args>
<arg evaluator="xml" expression="get-property('MessageID')"/>
<arg evaluator="xml" expression="get-property('MessageIdConsumidor')"/>
<arg evaluator="xml" expression="get-property('endpointCallback')"/>
<arg evaluator="xml" expression="$ctx:RequestERP/*"/>
<arg evaluator="xml" expression="get-property('SYSTEM_DATE')"/>
</args>
</payloadFactory>
<log level="custom">
<property expression="$body" name="PessoaService_inserirPessoaFisicaNacionalV1 [SmartProxy Request]"/>
</log>
<header name="Action" scope="default" value="urn:insert_smart_proxy_operation"/>
<send>
<endpoint key="conf:services/corp/pessoaservicev1/endpoint/SmartProxyDSSEndpoint.xml"/>
</send>
</sequence>
Content of endpoint ERPEndpoint.xml in sequence above:
<endpoint name="BennerERPEndpoint" xmlns="http://ws.apache.org/ns/synapse">
<address uri="http://host/App_Services/PESSOAS/Service.svc/ws">
<enableAddressing/>
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
</address>
</endpoint>

Error while calling sequence in send mediator in wso2esb

I'm using wso2esb 4.7.0 and wso2dss 3.0.0.I have created a dataservice to update table in wso2dss and it's working fine.Now i have called this service in wso2esb via send mediator as:
<inSequence>
<property name="messageType" value="application/json" scope="axis2"/>
<property name="username"
expression="//username/text()"
scope="default"
type="STRING"/>
<property name="userid"
expression="//userid/text()"
scope="default"
type="STRING"/>
<log>
<property name="username" expression="get-property('username')"/>
<property name="userid" expression="get-property('userid')"/>
</log>
<payloadFactory media-type="xml">
<format>
<p:trail_op xmlns:p="http://ws.wso2.org/dataservice">
<p:username>$1</p:username>
<p:userid>$2</p:userid>
</p:trail_op>
</format>
<args>
<arg evaluator="xml" expression="get-property('username')"/>
<arg evaluator="xml" expression="get-property('userid')"/>
</args>
</payloadFactory>
<header name="Action" value=""/>
<property name="SOAPAction" value="" scope="transport"/>
<send>
<endpoint>
<address uri="http://192.168.1.23:9764/services/Capp_muser_dataservice/"
format="soap12"/>
</endpoint>
</send>
<log level="full"/>
</inSequence>
<outSequence>
<send/>
</outSequence>
This is also working fine..The issue occurred when i'm calling a sequence in send mediator like :
<send receive="Capp_Login_seq1">
<endpoint>
<address uri="http://192.168.1.23:9764/services/Capp_muser_dataservice/"
format="soap11"/>
</endpoint>
</send>
My request is :
curl -v -H "Accept:application/json" -H "Content-Type:application/json" -d '{"username":"sps","userid":"337217709387286044"}' http://youtility-desktop:8282/services/Capp_LoginProxy
It shows error in esb :
ERROR - RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
at org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
at org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:55)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:118)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:116)
at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:91)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:62)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:232)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:222)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2116)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2022)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1114)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 20 more
Is it issue of soap request or anything else?
please let me know..
Remove the endpoint format and check.

Error when uploading pdf using vfs:ftps (missing FileURI). Possible bug?

We have a proxy service that downloads a pdf file from a JasperReports Server and then do a vfs:ftps to upload the pdf to a FTP server. The download part works just fine but we are struggling with the upload part. Here is our problem:
When starting the proxy service, we got the following WARN message (Note we do have a parameter FileURI in the config):
WARN PollTableEntry transport.vfs.FileURI parameter is missing in the proxy service configuration
and when running a request, we got an exception as follows:
[PassThroughMessageProcessor-2] ERROR Axis2Sender Unexpected error during sending message out
java.lang.NullPointerException
at java.util.StringTokenizer.<init>(StringTokenizer.java:182)
at java.util.StringTokenizer.<init>(StringTokenizer.java:204)
at org.apache.commons.vfs2.provider.ftps.FtpsFileProvider.doCreateFileSystem(FtpsFileProvider.java:67)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:104)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:82)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:66)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:694)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:650)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:606)
at org.apache.synapse.transport.vfs.VFSTransportSender.sendMessage(VFSTransportSender.java:134)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:456)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:269)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:329)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:95)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:230)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:443)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:166)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:217)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
I wonder if it is a potential bug or anything wrong in the proxy configuration.
PLEASE help, thanks!
Here is the proxy config xml:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="GenerateSecurityReport"
transports="https http vfs"
startOnLoad="true"
trace="enable"
statistics="enable">
<description/>
<parameter name="transport.vfs.FileURI">vfs:ftps://ftpUser:ftpPassword#ftp.host/path?vfs.passive=true</parameter>
<parameter name="transport.vfs.ContentType">application/pdf</parameter>
<target>
<endpoint>
<address uri="http://jasperServerHost/path/to/report.pdf"/>
</endpoint>
<inSequence>
<log/>
<property name="Authorization"
expression="fn:concat('Basic ', base64Encode('jasperUser:jasperPassword'))"
scope="transport"
type="STRING"/>
<property name="product"
expression="fn:substring-after(get-property('To'), 'product=')"
scope="default"
type="STRING"/>
</inSequence>
<outSequence>
<log/>
<property name="CONTENT_TYPE"
value="application/pdf"
scope="axis2"
type="STRING"/>
<property name="transport.vfs.ReplyFileName"
expression="fn:concat(get-property('product'), '_vendor_patches.pdf')"
scope="transport"/>
<property name="OUT_ONLY" value="true"/>
<property name="HTTP_SC" value="200" scope="axis2"/>
<send>
<endpoint>
<address uri="vfs:ftps://ftpUser:ftpPassword#ftp.host/path?vfs.passive=true"/>
</endpoint>
</send>
<payloadFactory>
<format>
<html xmlns="">
<body>success</body>
</html>
</format>
</payloadFactory>
<property name="Content-Type"
value="text/html"
scope="transport"
type="STRING"/>
<send/>
</outSequence>
</target>
</proxy>
Did you define the transport.vfs.FileNamePattern parameter?
Follow this sample

How can i handle this in Wso2ESB which is not passing Respone to Client

i am inserting in multiple table some of those is directly insertion and some more is we need split it means use iterate mediator i have done using two proxy and add fault sequence also insertion is ok if my DSS is down it is passing proper fault to client .the problem is when error occuers in dss like ..primarykey voilation like this i added this property <property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/> in every sequence even though its throwing like this error
ERROR - NativeWorkerPool Uncaught exception
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
at [row,col {unknown-source}]: [1,167]
and its giving ESB side error like above i am attaching my fault sequence ..
<sequence xmlns="http://ws.apache.org/ns/synapse" name="fault">
<property xmlns:ns="http://org.apache.synapse/xsd" name="actionid" expression="get-property('actionid')"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="actiondetailid" expression="get-property('actiondetailid')"/>
<dbreport>
<connection>
<pool>
<password>Youtility11</password>
<user>youtilitydba</user>
<url>jdbc:postgresql://localhost:5432/USCProduction</url>
<driver>org.postgresql.Driver</driver>
</pool>
</connection>
<statement>
<sql>
<![CDATA[ delete from tactiondetail where actiondetailid=?]]></sql>
<parameter xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('actiondetailid')" type="BIGINT"/>
</statement>
</dbreport>
<log level="full"/>
<dbreport>
<connection>
<pool>
<password>Youtility11</password>
<user>youtilitydba</user>
<url>jdbc:postgresql://localhost:5432/USCProduction</url>
<driver>org.postgresql.Driver</driver>
</pool>
</connection>
<statement>
<sql>
<![CDATA[ delete from tactiondetail where actionid=?]]></sql>
<parameter xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('actionid')" type="BIGINT"/>
</statement>
</dbreport>
<log>
<property name="MESSAGE" value="Executing default 'fault' sequence"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
</log>
<switch xmlns:ns="http://org.apache.synapse/xsd" source="get-property('ERROR_CODE')">
<case regex="500000">
<property name="ERROR_MESSAGE" value="duplicate key value violates or The system is attempting to access an inactive service " scope="default" type="STRING"/>
</case>
<case regex="101503">
<property name="ERROR_MESSAGE" value="Error connecting to the back end" scope="default" type="STRING"/>
</case>
</switch>
<payloadFactory>
<format>
<ResponseJSON xmlns="">
<Exception>$1</Exception>
<Status>$2</Status>
<Total>0</Total>
</ResponseJSON>
</format>
<args>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('ERROR_MESSAGE')"/>
<arg xmlns:ns="http://org.apache.synapse/xsd" expression="get-property('ERROR_CODE')"/>
</args>
</payloadFactory>
<header name="To" action="remove"/>
<property name="RESPONSE" value="true" scope="default" type="STRING"/>
<property name="NO_ENTITY_BODY" action="remove" scope="axis2"/>
<log level="full"/>
<send/>
</sequence>
its passing fault message whenever dss is off but not passing when dss is running mode giving error like this
Caused by: com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs.
at [row,col {unknown-source}]: [1,167]
As the error says: "Illegal processing instruction target ("xml"); xml (case insensitive) is reserved by the specs." it seems that you are using a reserved word "xml" in the response that you return from DSS. Please double check the XML response from DSS, and run the response trough an XML validator (may be use Eclipse XML validator) to see if the response is all OK.