Tag: axis

Java客户端使用DIME附件调用WSE 2.0

我需要与使用WSE 2.0 for WS-Security和DIME的传统.NET Web服务集成。 我需要从Java应用程序执行此操作。 我期待Axis2能够与WS-Security一起工作,因为这里的人们之前已经完成了。 这是我关注的DIME。 我在http://ws.apache.org/axis/java/client-side-axis.html上看到对DIME的引用,但我想知道是否有人用Axis和WSE 2.0 Web服务实际完成了这项工作。

Axis Marshaller

我有一组使用wsdl2java(Axis 1.4)创建的类,我正在寻找一种方法来解组和编组来自/到String和Object的数据。 我编写了一个JAXB unmarshaller,它适用于我们的一些较新的内部对象,因为我们使用xjc来创建类但没有时间转换旧的轴类,需要为代码找到一个marshal / unmarshal解决方案。 。 请有人指点我的方向。 谢谢!

强制AXIS客户端使用TLS

如何强制SOAP Axis客户端使用TLS而不是SSL? 我有这个代码: SOAPMessage soapMessage = MessageFactory.newInstance() .createMessage(); SOAPPart soapPart = soapMessage.getSOAPPart(); javax.xml.soap.SOAPEnvelope soapEnvelope = soapPart.getEnvelope(); Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationStyle(org.apache.axis.constants.Style.DOCUMENT); call.setSOAPActionURI(“urn:processDocument”); call.setUsername(user); call.setPassword(password); call.setTimeout(10000); call.invoke(new Message(soapEnvelope.toString())); 执行错误是: javax.net.ssl.SSLException: Received fatal alert: unexpected_message at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) […]

AXIS vs JAX-WS for Web Service Client

我决定用Java实现Web Service Client。 我在Eclipse中生成了Axis客户端,在wsimport中生成了JAS-WS客户端。 这两种解决方案都有效,现在我必须选择一种解决方案。 在选择一个之前我应该​​考虑什么?

在会话中存储Axis原始XML请求/响应(将在JSP中使用)

如果可能,如何获取Axis在我的应用程序中调用/检索的原始XML请求/响应? 我正在使用Axis附带的WSDL2Java来生成Java存根。 编辑: 我目前拥有的是一个使用Axis处理远程API调用的应用程序。 其中一个要求是在会话中“存储”来自这些调用的所有XML请求/响应,以便它在JSP中可用(用于调试目的)。 我怎样才能做到这一点? 我尝试编写一个extends BasicHandler的自定义处理程序,但在该处理程序中,我仍然无法从MessageContext获取HttpServletRequest / HttpServletResponse对

等效于wsimport的org.apache.axis.components.net.SunFakeTrustSocketFactory

当我使用Apache Axis生成webservice客户端存根时,我通过调用以下方法使用客户端存根在我的代码中禁用服务器证书信任检查 AxisProperties.setProperty(“axis.socketSecureFactory”, “org.apache.axis.components.net.SunFakeTrustSocketFactory”); 如何禁用通过运行wsimport生成的客户端存根的信任检查? 我在运行一些测试代码时使用它。

Axis2的wsdl2java在RPC /编码样式的Web服务上失败

Axis2还有其他选择吗? 或者让它工作的方式(例如,不同的数据绑定)? Retrieving document at ‘…’. Exception in thread “main” org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224) … 2 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50) … 3 more Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find type {http://schemas.xmlsoap.org/soap/encoding/}Array […]

使用Axis 1.4设置自定义SOAP标头

我正在尝试使用Axis使用.NET 2.0 Web服务。 我使用Eclipse WST插件生成了Web服务客户端,到目前为止似乎没问题。 这里是预期的SOAP标头: string string 我没有找到任何有关如何从Axis客户端配置此标头的文档。 当我使用Visual Studio C#Express 2008生成客户端时,它会生成一个名为Authentication的类,其中包含两个String属性( User和Password ),并且所有客户端方法都接收此类的对象作为第一个参数,但Axis WS不会发生这种情况。客户。 如何在客户端调用中设置此标头?

使用Axis2附加客户端证书?

是否可以轻松地将客户端证书附加到使用wsdl2java生成的Axis2存根? 我需要在每个请求的基础上动态更改客户端证书,因此只需将其存储在密钥库中就不适用于我们的情况。 我已经找到了非SOAP调用的示例,但找不到与使用Axis客户端存根相关的任何内容。 尝试破解XML for SOAP调用是一个选项,我猜,albiet是一个痛苦的选择! 呻吟!

如何解决SAXException:in中的元素无效

我尝试以下列方式从Web服务获取结果。 List result = new Vector(); LibrarySearchRequest request = new LibrarySearchRequest(queryString); LibrarySearchServicePortTypeProxy proxy = new LibrarySearchServicePortTypeProxy(); LibrarySearchServicePortType port = proxy.getLibrarySearchServicePortType(); LibrarySearchResponse response = port.process(request); librarysearch.soft.Book[] books = response.getBooks(); 当我这样做时,我得到以下exception(stacktrace): org.xml.sax.SAXException: Invalid element in librarysearch.soft.Book – book at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at […]