问题描述
大家看看这个问题。SOAP信息中有个命名空间xmlns:m="http://www.huawei.com/SPG下面的子节点都是m:开头。我用的工具是AXIS1.4。该怎么实现?代码如下SOAP信息样例:<SOAP-ENV:Envelopexmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:m="http://www.huawei.com/SPG"><SOAP-ENV:Header><m:Authentication><m:Username>BSS</m:Username><m:Password>EA7F7D05D782E60AFD1BE17775A3CE62</m:Password></m:Authentication><m:MessageID>1</m:MessageID></SOAP-ENV:Header><SOAP-ENV:Body><m:ADD_UCCORP><m:CORPID>1234567890</m:CORPID><m:CORPNAME>北讯</m:CORPNAME><m:CHARGINGID>111</m:CHARGINGID><m:LINKMANNAME>112</m:LINKMANNAME><m:LINKMANPHONE>113</m:LINKMANPHONE><m:LINKMANEMAIL>114</m:LINKMANEMAIL><m:ADDR>115</m:ADDR><m:HEADPHONE>116</m:HEADPHONE><m:FAX>117</m:FAX><m:ZIP>118</m:ZIP><m:WEBSITE>119</m:WEBSITE><m:CXG>120</m:CXG><m:CONFORGID>121</m:CONFORGID><m:ONCHGNUMMOD>122</m:ONCHGNUMMOD><m:MAXM>123</m:MAXM><m:ISACTIVE>0</m:ISACTIVE></m:ADD_UCCORP></SOAP-ENV:Body></SOAP-ENV:Envelope>
AXIS客户端代码:SPG2800ServiceLocatorserviceLocator=newSPG2800ServiceLocator();serviceLocator.setSPG2800PortEndpointAddress("http://localhost:8080/SPG");SPG2800BindingStubbindingStub=(SPG2800BindingStub)serviceLocator.getSPG2800Port();bindingStub.setHeader(soapHeaderTool.createHeader(super.getUserName(),super.getUserPassword()));//调用方法
解决方案
解决方案二:
有没有人知道吗帮帮忙啊
解决方案三:
对方的命名空间和你怎么去实现我认为没啥联系的,是不是走总线?
解决方案四:
引用2楼venchr的回复:
对方的命名空间和你怎么去实现我认为没啥联系的,是不是走总线?
不加命名空间我发的包,他们识别不了