我是否可以在WSDL中相对于WSDL位置具有soap:address位置,或者至少相对于服务器?比如我想写:
<soap:address location="https://exampleserver.com/axis2/services/ExampleService" />
Run Code Online (Sandbox Code Playgroud)
如:
<soap:address location="/axis2/services/ExampleService" />
Run Code Online (Sandbox Code Playgroud)
这样可以更快地部署到多个服务器,例如测试服务器.此外,在axis2c的情况下,如果我希望从HTTP或HTTPS使用我的服务,使用我的服务的开发人员的生活变得更加困难,因为他们不能简单地从它的默认位置"?WSDL"导入WSDL.
我在utf-8 char *缓冲区中有SAML 1.1和SAML 1.0响应,我想将它们转换为Rampart/C saml_response_t *对象.我的问题是:
saml_response_t从字符串创建a的正确方法是什么?
理想情况下,我想在C中使用代码示例来执行此操作,然后以正确的顺序处理各种解析器工具,因为Axis2/C对于如何释放内存有一些奇怪的想法.
我这样做的努力遇到了失败,主要是因为内存故障,但这就是我所拥有的.请记住,该deserialize_buffer()方法正如它所说的那样 - 将缓冲区转换为a axiom_node_t *,但我也愿意替换它.
/* : get the raw XML from the SAML assertion */
xml_data = Tcl_GetStringFromObj (objv[2], &xml_length);
/* : parse the response XML for processing */
stream = gstream_mem_create (xml_data, xml_length);
node = Axis2_axiom_deserialize_buffer (env, stream);
/* : build a SAML response from the parsed XML */
saml_response = saml_response_create (env);
saml_response_build (saml_response, node, env);
arraylist = saml_response_get_assertions (saml_response, env);
/* …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用AXIS2/C(c ++)使用以下命令创建wsdl http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl的存根:
./WSDL2CPP.sh -uri http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl
我得到以下答案:
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2CPP.main(WSDL2CPP.java:19)
Caused by: org.apache.axis2.AxisFault: **`No service was not found in the WSDL at http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl with targetnamespace http://www.onvif.org/ver10/device/wsdl`**
at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:115)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
... 2 more
Run Code Online (Sandbox Code Playgroud) 尝试从客户端应用程序中获取服务时,我收到以下错误.有人能告诉我这个例外的原因吗?
提前致谢
org.apache.axis2.AxisFault:Conexiónrehusada
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:197)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.tissat.echo.wsdl.EchoServiceStub.suscribe(EchoServiceStub.java:772)
at com.tissat.echo.servicios.ServicioLisa.cliSuscribirse(ServicioLisa.java:122)
at com.tissat.echo.servicios.ClienteLisa.Conectar(ClienteLisa.java:23)
at com.tissat.echo.rmi.ServidorLisaTomcat.connectSuscription(ServidorLisaTomcat.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Run Code Online (Sandbox Code Playgroud)
引起:java.net.ConnectException:Conexiónrehusada
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) …Run Code Online (Sandbox Code Playgroud)