How to Set hessian's property" isOverloadEnabled = true "In Dubbo - overriding

Thanks in advance.
I try to use the "dubbo" to invoke a method which is override.But the console tell me that "Caused by: com.caucho.hessian.io.HessianProtocolException: '￿' is an unknown code".
Search Engines told me that error may cased by "hessian" is not support override method default.So i try to set this property ,"isOverloadEnabled".But i can not find the way to set. I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
That's xml content :
<dubbo:protocol name="hessian" port="30002" threads="200" />
<dubbo:service ref="ossServiceImpl" interface="com.fragment.dede.apis.OssService" protocol="hessian"/>

the hessian's version is 4.0.7 ,the dubbo's version is 2.5.3 ,JDK1.8 and SPRING4

You have to use HessianProxyFactory. Then call:
factory.setOverloadEnabled(true);

please say something useful
<dubbo:protocol name="hessian" port="${dubbo.protocols.hessian.port:20882}">
<dubbo:parameter key="timeout" value="10000000"/>
<dubbo:parameter key="hessian.overload.method" value="true"/>
</dubbo:protocol>

Related

Get AddressPO from an AddressBo object

I have an instance of an AddressBO in my code and i want to get corresponding AddressPO without using the AddressPOFactory. Is that possible ?
Thanks
In java code try following:
addressBO.getExtension(PersistentObjectBOExtension.class).getPersistentObject()
In pipeline/ISML:
AddressBO:Extension("PersistentObjectBOExtension"):PersistentObject

AutoIt #ComSpec parameters (/c, /k...)

I'm new to AutoIp and wonder what the parameters that often come with the #ComSpec macro mean. I couldn't find an explanation on the web. So any hint regarding /c, /k and maybe others?
Thanks a lot.
#ComSpec is the value of %COMSPEC%; the specified secondary command interpreter.
(For example: C:\Windows\system32\cmd.exe)
A quick search on "cmd.exe arguments" should give you plenty of info.

OSB : Xquery Comparision Failing Intermittently

I have following condition in my OSB proxy.
$body/*[1]/xyzflag eq 'true' and (:some other true conditions:)
The node xyzflag is not even present under node pointed by variable $body.
The condition works as expected (gives false) most of the times. but sometime it gives true.
Anyone has faced this situation? Seems a bug to me. Can some help?
The XQuery expression you are trying is wrong.
e.g. If your XML is looks like below:
<school>
<teacher>
<isClassteacher>Y</isClassteacher>
</teacher>
<teacher>
<isClassteacher>N</isClassteacher>
</teacher>
</school>
Then your expression will be like below:
data($body/teacher[1]/isClassteacher)='Y'
Note: Please make the changes as per your requirement.
Hope this will be helpful.
regards
Asutosh
Try to make it like this:
fn:data($body/[1]/xyzflag)
If you are checking for existence of that node <xyzflag>, I will suggest you to use fn:exists function.
This expression
$body/*[1]/xyzflag = 'true'
will return true if the node <xyzflag> is present. It is not going to bother whether the contents of the node is present or not

IMFMediaSourceTopologyProvider::GetMediaSourceTopology always fails, why?

Under what circumstances the IMFMediaSourceTopologyProvider::GetMediaSourceTopology() does not fail? It always fails with code 0xc00d36e6 (MF_E_ATTRIBUTENOTFOUND).
Please do not answer with a link to MSDN.
Here is the solution after pissing blood for hours.
You have to call QueryInterface() on IMFSequencerSource object to get the IMFMediaSource like this:
hr = pMFSequencerSrc->QueryInterface( __uuidof( IMFMediaSource ), (void**)&pMediaSource );
Now on pMediaSource object call CreatePresentationDescriptor() to get the presentation descriptor required for the GetMediaSourceTopology() call.
voila...
P.S.
That MF_E_ATTRIBUTENOTFOUND error... nice work M$

XForms bind element error

I am changing my code to use binds in XForms (which is better practice than using nodesets everywhere!) but I am getting errors.
The error message I receive is: "Error: XForms Error (8): id (data_criterion) does not refer to a bind element..."
From tutorials/guides I have been using, it seems as though this should work, but clearly I am missing something! (btw, I was modeling my binding code after the examples here: http://en.wikibooks.org/wiki/XForms/Bind)
I originally thought the problem was due to the fact I was using xf:select controls as opposed to xf:input like the examples, but even once I dumbed down my code to the most simplistic code, I still receive errors!
This is the model code I am using:
<xf:model id="select_data">
<xf:instance id="criteria_data" xmlns="">
<file>
<criteria>
<criterion></criterion>
</criteria>
</file>
</xf:instance>
<bind id="data_criterion" nodeset="instance('criteria_data')/criteria/criterion"/>
</xf:model>
As for the ui code, this is what I have:
<xf:input bind="data_criterion">
<xf:label>Enter criteria:</xf:label>
</xf:input>
The error message I receive is: "Error: XForms Error (8): id (data_criterion) does not refer to a bind element..."
Anyone have any insight to what the problem is? Also, is there any special usage of bindings and xf:select (with xf:itemset) controls that I should be aware of? (I am ultimately using a lot of xf:select controls on my form..)
Thanks in advance!
EDIT:
I ran the code through this validator, and I got this message (refers to the bind line):
"Warning: Should the following element have the XForms namespace applied?: bind (line 66)"
A couple of things you might want to change:
Not sure of this is the reason for the error, but the nodeset expression should be instance('criteria_data')/criteria/..., without file. Remember: instance() returns the root element, not the document node. (This one you took care by updating the question; good)
You are missing the xf on the bind. It should be: <xf:bind id="data_criterion" nodeset="instance('criteria_data')/criteria/criterion"/>.
See below a full example with your code, which works fine for me under Orbeon Forms:
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
<xhtml:title>SO Bind</xhtml:title>
<xf:model id="select_data">
<xf:instance id="criteria_data" xmlns="">
<file>
<criteria>
<criterion>Gaga</criterion>
</criteria>
</file>
</xf:instance>
<xf:bind id="data_criterion" nodeset="instance('criteria_data')/criteria/criterion"/>
</xf:model>
</xhtml:head>
<xhtml:body>
<xf:input bind="data_criterion">
<xf:label>Enter criteria:</xf:label>
</xf:input>
</xhtml:body>
</xhtml:html>

Resources