Tag: ws addressing

如何在Axis2客户端中正确使用WS-Addressing?

总而言之,我正在尝试编写一个在Axis2.1.5中调用Web服务客户端的Junit测试,并且我对如何将其设置为使用WS-Addressing感到困惑。 我使用wsdl2java生成了一个客户端存根,我正在使用来自axis2二进制分发的axis2.xml和modules存储库。 我知道我需要使用WS-Addressing的MemberSubmission版本,我想我已经正确设置了(使用Options),但是标题似乎没有正确生成。 (我说’似乎’因为我无法弄清楚如何使用SOAPMonitor模块 – 我也欢迎任何提示!)。 然而,我的主要困惑在于“参与”寻址模块究竟需要什么。 是否足以使用具有对寻址模块的引用的axis2.xml文件来设置ConfigurationContext? 像这样? : //standard out of the box axis2 configs ConfigurationContext myConfigContext = ConfigurationContextFactory .createConfigurationContextFromFileSystem(“C:/devapps/axis2-1.5.1/repository”,”C:/devapps/axis2-1.5.1/conf/axis2.xml”); Options options = new Options(); EndpointReference targetEPR = new EndpointReference( “https://host:port/service.asmx”); options.setTo(targetEPR); //I believe this is what I’m supposed to do to specify the //MemberSubmission version of WS-Addressing options.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, AddressingConstants.Submission.WSA_NAMESPACE); //No idea of […]