[JBossWS] - Problem with inheritance - JbossWS
by fghj5678
I have problem to get inheritance in a WS to work.
I've tried a small example on these env:
Windows XP SP2
Jboss AS 4.2.2 GA , 4.2.3 (and also JBoss eap 4.3)
I'm trying to do a request to server with a parameter that contains a inherited class. Class testEnv contains class testAAA, and class testBBB inherits testAAA. So when I put testBBB in testEnv and sends it to the WS I'm supposed to get testBBB from testEnv on the server - but I only get a testAAA!
Classes used in my example:
| @WebService
| public interface TestWS {
|
| public String test(TestEnv testEnv);
| }
|
|
| @Stateless
| @WebService(name = "TestWSService", serviceName = "TestWSService")
| @Remote(TestWS.class)
| public class TestWSImpl implements TestWS {
|
| public String test(TestEnv testEnv) {
| if (testEnv.getTestAAA() instanceof TestAAA) {
| return "WRONG, should not end up here";
| } else if (testEnv.getTestAAA() instanceof TestBBB) {
| return "CORRECT";
| }
| return "ERROR..";
| }
|
|
| public class TestEnv implements Serializable {
|
| private static final long serialVersionUID = 1L;
|
| TestAAA testAAA;
|
| public TestAAA getTestAAA() {
| return testAAA;
| }
|
| public void setTestAAA(TestAAA testAAA) {
| this.testAAA = testAAA;
| }
| }
|
| @XmlSeeAlso({TestBBB.class})
| public class TestAAA implements Serializable {
|
| private static final long serialVersionUID = 1L;
|
| int a = 1;
| }
|
| public class TestBBB extends TestAAA implements Serializable {
|
| private static final long serialVersionUID = 1L;
|
| int b = 2;
| }
|
|
Then I've tried both with SoupUI and a generated ws-client - but I always get a testAAA instead of testBBB. example from ws-client:
| ...
| TestWSService testWS = ts.getTestWSServicePort();
| TestBBB testBBB = new TestBBB();
| TestEnv testEnv = new TestEnv();
| testEnv.setTestAAA(testBBB);
| String s = testWS.test(testEnv);
| ...
|
I also have logged the http soap request and it looks ok (with xsi:type for the inherited class), here is the parameter:
| <testAAA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:testBBB"/>
|
This is from the generated wsdl: (which have a correct "extension base=..")
| <xs:complexType name="test">
| <xs:sequence>
| <xs:element minOccurs="0" name="arg0" type="tns:testEnv"/>
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="testEnv">
| <xs:sequence>
| <xs:element minOccurs="0" name="testAAA" type="tns:testAAA"/>
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="testAAA">
| <xs:sequence/>
| </xs:complexType>
| <xs:complexType name="testBBB">
| <xs:complexContent>
| <xs:extension base="tns:testAAA">
| <xs:sequence/>
| </xs:extension>
| </xs:complexContent>
| </xs:complexType>
|
Any help would be appreciated!
Mats.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209119#4209119
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209119
17 years, 5 months
[JBoss Portal] - Re: Dashboard configuration - drag and drop
by vivek_saini07
We have achieved something similar in our project.
"diparc" wrote : Thanks for a quick response.
|
| I modified the jboss-portal.sar/conf/config.xml to change the following property to "dashboard"
|
| dashboard
|
| Also, i noticed that the "template" portal is defined in "/jboss-portal.sar/conf/data/default-object.xml"
|
| but it seems that it copies only the "template" portal defined here
|
On dashboard, they always copy "template" for every user. It is hard coded in CustomizationManagerService(check getDashboard() method)). It is a MBean so it is plugable. You can modify it according to your need.
"diparc" wrote :
| I have a separate war file for my application and that has all xml files specific to the portal I am building - i.e., it has its own portal-object.xml which is loaded correctly and i can access the pages in this portal -
|
| I renamed my portal defined in the portal-object.xml to "template" but when I access the dashboard it has the one defined in default-object.xml.
|
| I am going to try to remove the "template" portal from default-object.xml
| so that it has only one template portal and see if that will work -
|
|
| I had another question -
|
| it seems like there can be many portals running under a portal server but there can only be one dashboard. can there be more than one dashboard ?
|
Yes you can modify this mbean as you want. In our project we copied the different portal to Dashboard according to group association of user. Every user see's different dashboard according to their group.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209107#4209107
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209107
17 years, 5 months
[JBoss Portal] - Re: error while doing performBlockingInteraction between sha
by jan.hoeve
This is the soap going from the jboss portal towards sharepoint: (of course the unusefull information stripped out here).
beware: i put spaces between the ampersand sign and 'amp' and 'quot' etc.
This soap looks exact like the one which i intercept (no fiddling by this bb forum)
| <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
| <env:Header/>
| <env:Body>
| <ns1:getMarkupResponse xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <ns1:markupContext>
| <ns1:useCachedMarkup xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">false</ns1:useCachedMarkup>
| <ns1:mimeType xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">text/html</ns1:mimeType>
| <ns1:markupString xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">& lt;!DOCTYPE div PUBLIC & quot;-//W3C//DTD XHTML 1.0 Strict//EN& quot; & quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd& quot;& gt;& lt;div xmlns=& quot;http://www.w3.org/1999/xhtml& quot; class=& quot;bi& quot;& gt;.................CUT.............
| & lt;form enctype=& quot;multipart/form-data& quot; id=& quot;cmfform& quot; method=& quot;POST& quot; action=& quot;wsrp_rewrite?wsrp-urlType=blockingAction& amp;wsrp-interactionState=JBPNS_rO0ABXc_AAliaS1hY3Rpb24AAAABACVwb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyAAdfX0VPRl9f& amp;wsrp-navigationalState=JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**& amp;/wsrp_rewrite& quot;& gt;& lt;div& gt;& lt;input value=& quot;& quot; name=& quot;focusfield& quot; id=& quot;f...................CUT......................</ns1:markupString>
| <ns1:locale xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">en-us</ns1:locale>
| <ns1:requiresUrlRewriting xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">true</ns1:requiresUrlRewriting>
| <ns1:preferredTitle xmlns:ns1="urn:oasis:names:tc:wsrp:v1:types">xx Web Appplication Portlet</ns1:preferredTitle>
| </ns1:markupContext>
| </ns1:getMarkupResponse>
| </env:Body>
| </env:Envelope>
|
When the user fills in data in sharepoint and post it back towards jboss portal, the soap looks like:
| <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <soap:Body>
| <performBlockingInteraction xmlns="urn:oasis:names:tc:wsrp:v1:types">
| <registrationContext>
| <registrationHandle>10</registrationHandle>
| </registrationContext>
| <portletContext>
| <portletHandle>/xxx.yy</portletHandle>
| </portletContext>
| <runtimeContext>
| <userAuthentication>wsrp:password</userAuthentication>
| <templates>
| <defaultTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</defaultTemplate>
| <blockingActionTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</blockingActionTemplate>
| <renderTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</renderTemplate>
| <resourceTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</resourceTemplate>
| <secureDefaultTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureDefaultTemplate>
| <secureBlockingActionTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureBlockingActionTemplate>
| <secureRenderTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureRenderTemplate>
| <secureResourceTemplate>wsrp_rewrite?wsrp-urlType={wsrp-urlType}& amp;wsrp-url={wsrp-url}& amp;wsrp-requiresRewrite={wsrp-requiresRewrite}& amp;wsrp-navigationalState={wsrp-navigationalState}& amp;wsrp-interactionState={wsrp-interactionState}& amp;wsrp-mode={wsrp-mode}& amp;wsrp-windowState={wsrp-windowState}& amp;wsrp-fragmentID={wsrp-fragmentID}& amp;wsrp-secureURL={wsrp-secureURL}/wsrp_rewrite</secureResourceTemplate>
| </templates>
| </runtimeContext>
| <userContext>
| <userContextKey>xx\Administrator</userContextKey>
| </userContext>
| <markupParams>
| <secureClientCommunication>false</secureClientCommunication>
| <locales>en-us</locales>
| <mimeTypes>text/html</mimeTypes>
| <mimeTypes>text/xml</mimeTypes>
| <mode>wsrp:view</mode>
| <windowState>wsrp:normal</windowState>
| <navigationalState>JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**</navigationalState>
| </markupParams>
| <interactionParams>
| <portletStateChange>cloneBeforeWrite</portletStateChange>
| <interactionState>JBPNS_rO0ABXc_AAliaS1hY3Rpb24AAAABACVwb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyAAdfX0VPRl9f& amp;[2]=JBPNS_rO0ABXdPAA5iaS1yZWRpcmVjdC10bwAAAAEAMC9wb3J0bGV0L0NsaWVudGRvc3NpZXIvQWFubWFrZW5kb3NzaWVyP2luaXQ9dHJ1ZQAHX19FT0ZfXw**</interactionState>
| <formParameters name="focusfield">
| <value/>
| </formParameters>
| </interactionParams>
| </performBlockingInteraction>
| </soap:Body>
| </soap:Envelope>
|
then there is an error:
2009-02-11 15:56:27,268 ERROR [STDERR] Bad Base64 input character at 92: 38(decimal)
2009-02-11 15:56:31,873 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@19e1e9
2009-02-11 15:56:33,253 DEBUG [org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC] Begin response processing
2009-02-11 15:56:33,253 ERROR [org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC] SOAP request exception
2009-02-11 15:56:33,253 ERROR [org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC] SOAP request exception
javax.xml.rpc.soap.SOAPFaultException: Could not perform action on portlet '/xx.yyPortlet'. javax.servlet.ServletException
at org.jboss.portal.wsrp.WSRPExceptionFactory.createSOAPFaultException(WSRPExceptionFactory.java:126)
at org.jboss.portal.wsrp.WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.java:88)
at org.jboss.portal.wsrp.producer.MarkupHandler.performBlockingInteraction(MarkupHandler.java:136)
at org.jboss.portal.wsrp.producer.WSRPProducerImpl.performBlockingInteraction(WSRPProducerImpl.java:189)
Have a look at that strange interactionState string... [2]....that's not valid base64, is that why the error is there?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209097#4209097
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209097
17 years, 5 months