English 中文(简体)
• 翻译旧的Java肥皂。 现代的jar体法
原标题:Want to translate old Java soap.jar style code to something modern

我有大约10年的《 Java法》要求提供一种传统的《SOAP认证服务》。 WSDL是RPC:ENCODED,含有许多类型。 我希望能够轻易地将旧的法典转换成轴1.4或一片,但会 ran。 我所看的是想使用WSDL。 一个人能否帮助将这转化为不需要过错的WSDL的现代法典?

《经济、社会、文化权利国际公约》呼吁部分:

    SOAPMappingRegistry soapmappingregistry = new SOAPMappingRegistry();
    BeanSerializer beanserializer = new BeanSerializer();

    soapmappingregistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName(
            "urn:xml-soap-session-demo", "authenticationresult"),
            AuthenticationResult.class, beanserializer, beanserializer);
    Call call = new Call();
    call.setSOAPMappingRegistry(soapmappingregistry);
    call.setTargetObjectURI("urn:Security");
    call.setMethodName("authenticate");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    Vector<Object> vector = new Vector<Object>();
    vector.addElement(new Parameter("app", String.class, "PHS", null));
    vector.addElement(new Parameter("user", String.class, userName, null));
    vector.addElement(new Parameter("password", String.class, password, null));
    vector.addElement(new Parameter("encryption", Integer.class, new Integer(0), null));
    call.setParams(vector);
    Response response = null;
    URL endpointURL = new URL(endpoint);
    response = call.invoke(endpointURL, "");
    if (!response.generatedFault()) {
        Parameter parameter = response.getReturnValue();
        Object obj = parameter.getValue();
    ...
    }

许多感谢。

最佳回答

大部分肥皂框架完全依靠WSDL标准。 Axis, CXF, Spring WS等。 我认为,你可以尝试春天。 它拯救了我两度,当时你不知道或想要使用整个世界住户调查组(但知道如何编码有效载荷)。

然而,如果服务是完全的类型,为什么你甚至想把这种事情推到来? 旧客户、旧服务——为什么当服务被替换为没有类型服务时,你不会保持这种方式并更新该守则? 我不认为你最后会稍有进展。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签