WSO2 EI:第一个元素必须包含本地名称,信封,但找到了HTML
我正在使用SELECT查询从DSS中检索一些数据之后,我使用有效载荷工厂进行一些转换,然后将其发送到端点,但是当我这样做时,第一个元素必须包含本地名称,但是找到了html 错误,请帮助我解决这个问题。
<sequence name="ValidateRecordExistanceInDB" xmlns="http://ws.apache.org/ns/synapse">
<payloadFactory media-type="xml">
<format>
<p:select_with_key_novum_extension_operation xmlns:p="novum.service">
<xs:Id xmlns:xs="novum.service">$1</xs:Id>
</p:select_with_key_novum_extension_operation>
</format>
<args>
<arg evaluator="xml" expression="get-property('Extension')"
literal="false" xmlns:ns="http://org.apache.synapse/xsd"/>
</args>
</payloadFactory>
<property name="REST_URL_POSTFIX" scope="axis2" type="STRING" value=""/>
<property name="HTTP_METHOD" scope="axis2" type="STRING" value="POST"/>
<property name="ContentType" scope="axis2" type="STRING" value="text/xml"/>
<property name="Accept" scope="transport" type="STRING" value="text/xml"/>
<property expression="$ctx:config//*[local-name()='localHost']"
name="localHost" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<header
expression="concat($ctx:localHost, '/services/NovumAudioValidationDataRetrievalService')"
name="To" scope="default" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="SOAPAction" scope="transport" type="STRING" value="select_with_key_novum_extension"/>
<call>
<endpoint>
<default format="soap11">
</default>
</endpoint>
</call>
<filter xmlns:ds="novum.service"
xmlns:ns="http://org.apache.synapse/xsd" xpath="boolean(//ds:novum_extensionCollection/ds:novum_extension)">
<then>
<property expression="//*[local-name()='Department']" name="department"/>
<property expression="//*[local-name()='Username']" name="username"/>
<property expression="//*[local-name()='Extension']" name="extension"/>
<property expression="//*[local-name()='Novum_Extension']" name="novumExtension"/>
<property expression="//*[local-name()='email']" name="email"/>
<property expression="//*[local-name()='location']" name="location"/>
<property expression="//*[local-name()='selling_dealer__c']" name="selling_dealer__c"/>
<log level="custom">
<property
expression="concat('successfully retrieved record with extension ', $ctx:Rec_Id, ' from the db')" name="novum-api-status"/>
<property expression="$ctx:department" name="department"/>
<property expression="$ctx:location" name="location"/>
<property expression="$ctx:username" name="username"/>
<property expression="$ctx:email" name="notifierEmail"/>
<property expression="$ctx:selling_dealer__c" name="selling_dealer__c"/>
</log>
</then>
<else>
<log level="custom">
<property
expression="concat('record with extension ', $ctx:Rec_Id, ' not found in the db, sending out error email notification')" name="novum-api-status"/>
</log>
<property
expression="concat('Record with Novum Extension ', $ctx:Rec_Id, ' can not be found in the database.')" name="errorMsg"/>
<sequence key="NotifyErrorSubscribers"/>
<drop/>
</else>
</filter>
谢谢!
I'm retrieving some data's from the DSS using select query after that, I do some transformation using payload factory and then send it to an endpoint but when I do that First Element must contain the local name, Envelope , but found html error please help me to sort this out.
<sequence name="ValidateRecordExistanceInDB" xmlns="http://ws.apache.org/ns/synapse">
<payloadFactory media-type="xml">
<format>
<p:select_with_key_novum_extension_operation xmlns:p="novum.service">
<xs:Id xmlns:xs="novum.service">$1</xs:Id>
</p:select_with_key_novum_extension_operation>
</format>
<args>
<arg evaluator="xml" expression="get-property('Extension')"
literal="false" xmlns:ns="http://org.apache.synapse/xsd"/>
</args>
</payloadFactory>
<property name="REST_URL_POSTFIX" scope="axis2" type="STRING" value=""/>
<property name="HTTP_METHOD" scope="axis2" type="STRING" value="POST"/>
<property name="ContentType" scope="axis2" type="STRING" value="text/xml"/>
<property name="Accept" scope="transport" type="STRING" value="text/xml"/>
<property expression="$ctx:config//*[local-name()='localHost']"
name="localHost" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<header
expression="concat($ctx:localHost, '/services/NovumAudioValidationDataRetrievalService')"
name="To" scope="default" xmlns:ns="http://org.apache.synapse/xsd"/>
<property name="SOAPAction" scope="transport" type="STRING" value="select_with_key_novum_extension"/>
<call>
<endpoint>
<default format="soap11">
</default>
</endpoint>
</call>
<filter xmlns:ds="novum.service"
xmlns:ns="http://org.apache.synapse/xsd" xpath="boolean(//ds:novum_extensionCollection/ds:novum_extension)">
<then>
<property expression="//*[local-name()='Department']" name="department"/>
<property expression="//*[local-name()='Username']" name="username"/>
<property expression="//*[local-name()='Extension']" name="extension"/>
<property expression="//*[local-name()='Novum_Extension']" name="novumExtension"/>
<property expression="//*[local-name()='email']" name="email"/>
<property expression="//*[local-name()='location']" name="location"/>
<property expression="//*[local-name()='selling_dealer__c']" name="selling_dealer__c"/>
<log level="custom">
<property
expression="concat('successfully retrieved record with extension ', $ctx:Rec_Id, ' from the db')" name="novum-api-status"/>
<property expression="$ctx:department" name="department"/>
<property expression="$ctx:location" name="location"/>
<property expression="$ctx:username" name="username"/>
<property expression="$ctx:email" name="notifierEmail"/>
<property expression="$ctx:selling_dealer__c" name="selling_dealer__c"/>
</log>
</then>
<else>
<log level="custom">
<property
expression="concat('record with extension ', $ctx:Rec_Id, ' not found in the db, sending out error email notification')" name="novum-api-status"/>
</log>
<property
expression="concat('Record with Novum Extension ', $ctx:Rec_Id, ' can not be found in the database.')" name="errorMsg"/>
<sequence key="NotifyErrorSubscribers"/>
<drop/>
</else>
</filter>
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这很可能是您在最后定义的Laravel端点返回的HTTP页面。我建议您通过碳控制台中的“配置”选项卡打开电线记录,以查看端点的确切返回的内容。
This is most likely an HTTP page being returned by the laravel endpoint you've defined at the end. I recommend you turn on Wire logging via the config tab in the carbon console to see what exactly is being returned by the endpoint.
我也有类似的问题,并且我从端点而不是JSON响应中获得了HTML响应,但是我看不到HTML响应,因此我在&lt; ei_home&gt;/conf/log4j2.properties 并重新启动WSO2
启用记录后,我能够看到响应HTML,这是负载平衡器
参考的支持ID是:
noreferrer“> https://docs.wso2.com/display/ei660/logs+In+wse2+e2+eii+6.0#logsinwso2ei6.6.0-wirelogs(fortheesbprofile deployment.toml 中的消息构建者
I had similar issue, and I was getting html response from the endpoint instead of JSON response, but I couldn't see the html response so I enabled the following in <EI_HOME>/conf/log4j2.properties and restarted WSO2
After enabling logging I was able to see the response HTML which was a Support ID by Load Balancer
reference is : https://docs.wso2.com/display/EI660/Logs+in+WSO2+EI+6.6.0#LogsinWSO2EI6.6.0-Wirelogs(fortheESBprofile)
Also It's better If you enabled message formatters and message builders in deployment.toml