小编Ale*_*lak的帖子

Aurelia customAttribute无法正常工作

我有customAttribute的问题.我想用它来插入jquery-ui datepicker.从这里获取的想法:http://www.danyow.net/jquery-ui-datepicker-with-aurelia/

然而,看起来它根本不起作用.我试图调试应用程序,看起来像attach@datePicker.js根本没有被解雇.但是,正在从服务器请求文件本身.最糟糕的是我昨天晚上工作了,但今天早上......

我在我的骨架应用程序分支中创建了一个简单的示例:https://github.com/Exsilium122/skeleton-navigation, 因此可以克隆并运行以进行故障排除.

最重要的两个文件:


welcome.html

<template>
  <require from="./resources/datepicker"></require>
  <input id="myDate" datepicker="datepicker" value.bind="timestamp | dateFormat"/>
</template>
Run Code Online (Sandbox Code Playgroud)

datepicker.js

import {inject, customAttribute} from 'aurelia-framework';
import 'jquery-ui';
import 'jquery-ui/themes/cupertino/jquery-ui.css!';

@customAttribute('datepicker')
@inject(Element)
export class Datepicker {
    constructor(element) {
        this.element = element;
    }

    attached = () => {
        console.log("attached Datepicker");
        $(this.element).datepicker({
            dateFormat: 'mm/dd/yy'
        }).on('change', e => fireEvent(e.target, 'input'));

    }

    detached = () => {
        console.log("detached Datepicker");
        $(this.element).datepicker('destroy').off('change');
    }
}

function createEvent(name) {
    var event = document.createEvent('Event');
    event.initEvent(name, true, …
Run Code Online (Sandbox Code Playgroud)

javascript integration jquery-ui aurelia

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

使用CXF在WSDL中使用soapaction

我正在使用CXF开发webservice.我使用HTTP绑定,因此根据http://www.w3.org/TR/wsdl#_soap:operation soapaction对于这种类型的传输是强制性的.

问题是我想为测试和生产服务器部署相同的应用程序.我想这样做而无需重建应用程序或保留外部WSDL文件,这将在维护列表上添加一个东西.

我在位置上遇到了同样的问题,但是这个问题很难解决.我在端点配置中使用了publishedEndpointUrl来设置正确的值.在从外部属性文件初始化应用程序期间检索该值,我将其放在classpath tomcat/common/classes上.

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:soap="http://cxf.apache.org/bindings/soap" xsi:schemaLocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
  <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
      <list>
        <value>classpath:ws.properties</value>
      </list>
    </property>
  </bean>
  <jaxws:endpoint xmlns:tns="http://example.org/ds" id="ds" implementor="org.example.Ds" wsdlLocation="wsdl/ds.wsdl" endpointName="tns:dsSOAP" serviceName="tns:Ds" address="/dsSOAP" publishedEndpointUrl="${publishedEndpointUrl}">
    <jaxws:features>
      <bean class="org.apache.cxf.feature.LoggingFeature" />
    </jaxws:features>
  </jaxws:endpoint>
</beans>
Run Code Online (Sandbox Code Playgroud)

我想为soapaction实现相同的功能.此属性的值不应该是相对URI.因此,测试应该是:

<soap:operation soapAction="https://test.example.org/dsSOAP/operation1" />
Run Code Online (Sandbox Code Playgroud)

并用于生产

<soap:operation soapAction="https://example.org/dsSOAP/operation1" />
Run Code Online (Sandbox Code Playgroud)

任何想法如何实现这一目标?

soap action web-services cxf operation

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