小编Adi*_*tzu的帖子

Soap服务在本地工作,但在另一台服务器上引发ClassCast异常

有人可以帮我解决一个奇怪的问题吗?

我有一个服务:

@WebMethod
@WebResult(name = "sendCustomerCommunicationResponse", targetNamespace = "......something/Underwriting/Correspondance/V1", partName = "Body")
public SendCustomerCommunicationResponse sendCustomerCommunication(
    @WebParam(name = "sendCustomerCommunicationRequest", targetNamespace = "........something/Underwriting/Correspondance/V1", partName = "Body")
    SendCustomerCommunicationRequest body)
    throws ServiceException_Exception, SystemException_Exception
;
Run Code Online (Sandbox Code Playgroud)

在本地我称之为:

SendCustomerCommunicationResponse response = correspondanceServicePort.sendCustomerCommunication(sendCustomerCommunicationRequest);
Run Code Online (Sandbox Code Playgroud)

这很好用.但是当我在另一台服务器上部署应用程序时,我收到了:

"java.lang.ClassCastException: 
    it.usi.xframe.ub1.batch.services.esb.SendCustomerCommunicationRequest incompatible with 
    it.usi.xframe.ub1.batch.services.esb.SendCustomerCommunicationResponse"
Run Code Online (Sandbox Code Playgroud)

PS应用程序在WebSphere服务器上运行

请求是:

<soapenv:Envelope ...someSchema...>
   <soapenv:Header>
      <v1:TechnicalHeader>
         <v1:correlationId>12742</v1:correlationId>
         <v1:sender>userName</v1:sender>
         <v1:countryCode/>
         <v1:channelId/>
         <v1:userID>userName</v1:userID>
         <v1:operationId>CHANGE_STATUS</v1:operationId>
      </v1:TechnicalHeader>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                                    <wsse:UsernameToken>
                                                <wsse:Username>someUser</wsse:Username>
                                                <wsse:Password>somePassoword</wsse:Password>
                                    </wsse:UsernameToken>
                        </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <v11:sendCustomerCommunicationRequest>
         <v11:eventCode>{"header":{"publishingDate":1474016634749,"eventId":"DEL-NEG","applicationCode":"UB3","correlationId":"9999","language":"IT","channelId":"MOB"},"body":{"ndg":"5106215","additionalInfo":{}}}</v11:eventCode>
      </v11:sendCustomerCommunicationRequest>
   </soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)

java websphere soap web-services

5
推荐指数
1
解决办法
197
查看次数

在javascript中获取primefaces widgetVar并更新它

我有一个像这样的primefaces组件:

<p:panel styleClass="errorsPanelClass" id="errorsPanel" header="Messages" toggleable="true" effect="drop" toggleSpeed="0" closeSpeed="0" widgetVar="errorsPanelWidget">
Run Code Online (Sandbox Code Playgroud)

我试图在javascript上下文中获取组件并更新它.

我已经尝试过:

function getWidgetVarById(id) {
   for (var propertyName in PrimeFaces.widgets) {
     if (PrimeFaces.widgets[propertyName].id === id) {
       return PrimeFaces.widgets[propertyName];
     }
   }
}
Run Code Online (Sandbox Code Playgroud)

要么

如何找到widgetVar?

要么

使用JavaScript获取widgetVar或选中/取消选中所有其他PrimeFaces复选框

如果我找到一个按类来获取widgetVar的解决方案,那将会很棒,但欢迎任何其他解决方案.

我也尝试过:

function getWidgetVarById() {
    for ( var propertyName in PrimeFaces.widgets) {
        alert(PrimeFaces.widgets[propertyName].id);
    }
}
Run Code Online (Sandbox Code Playgroud)

但我得到一个javascript错误"'PrimeFaces.widgets.length'为null或不是对象"

有任何想法吗?

javascript jsf primefaces

4
推荐指数
1
解决办法
3万
查看次数

使用partialSubmit触发actionListener

我有以下代码:

<h:panelGrid columns="2" styleClass="labelValueContainer" columnClasses="one,two">
    <p:outputLabel value="Value" />
    <p:inputText id="englishValue" styleClass="englishValue" value="#{labelsManager.addLabelsBean.engValue}" />
</h:panelGrid>
<p:commandButton value="COPY" styleClass="copyButton" process="englishValue" partialSubmit="true" actionListener="#{labelsManager.setValueForCopy}">
Run Code Online (Sandbox Code Playgroud)

我正在尝试做的是仅提交一个inputText并使用ajax触发一个actionLister(或一个动作)。如果我删除partialSubmit="true" 方法“ setValueForCopy”,则会触发,但当我再次添加时,不会再触发actionListener,我也不知道。如果有人有更好的解决方案来提交输入并触发方法,我就准备好听了。

谢谢!

jsf primefaces

2
推荐指数
1
解决办法
3402
查看次数

通过RowEditEvent获取rowIndex

我有一个简单的问题,但我无法找到正确的答案.

我渲染一个非常复杂的数据表:

<p:dataTable var="label" value="#{labelsManager.labelsList}" rowKey="#{label.cod}" editable="true"
                                rowsPerPageTemplate="5,10,15,30" paginator="true" paginatorPosition="bottom" rows="30"
                                paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                rendered="#{not empty labelsManager.labelsList}" scrollable="true" scrollHeight="300" id="labelsList" sortMode="multiple"
                                selection="#{labelsManager.selectedLabelsForDelete}">
<p:ajax event="rowEdit" listener="#{labelsManager.onRowEdit}" />
...some code...
</dataTable>
Run Code Online (Sandbox Code Playgroud)

和方法

public void onRowEdit(RowEditEvent event) {
 ... here I want to get the index on the current row...
}
Run Code Online (Sandbox Code Playgroud)

当我想编辑一行时,我还想获得将被编辑的当前行的索引.我搜索了很多,但我看不出如何从RowEditEvent中提取id.

我还尝试将行的索引作为属性发送但没有成功.有任何想法吗?谢谢!

datatable jsf primefaces

1
推荐指数
1
解决办法
2114
查看次数

OCJP的误解

我准备参加OCJP考试,我有一个棘手的问题.我不知道为什么正确的答案是下一个:"B.300-300-100-100-100"问题听起来像这样:

1.    class Foo {

2.        private int x;

3.        public Foo(int x) {
4.            this.x = x;
5.        }

6.        public void setX(int x) {
7.            this.x = x;
8.        }

9.        public int getX() {
10.            return x;
11.        }
12.    }

13.    public class Gamma {

14.       static Foo fooBar(Foo foo) {
15.            foo = new Foo(100);
16.            return foo;
17.        }

18.        public static void main(String[] args) {
19.            Foo foo = new Foo(300);
20.            System.out.println(foo.getX() …
Run Code Online (Sandbox Code Playgroud)

java

1
推荐指数
1
解决办法
361
查看次数

标签 统计

jsf ×3

primefaces ×3

java ×2

datatable ×1

javascript ×1

soap ×1

web-services ×1

websphere ×1