开发者

Calling .net Webservice from Java using WSDL

开发者 https://www.devze.com 2023-01-11 09:17 出处:网络
I am trying to call webservice in .net using it\'s wsdl from Java. I am trying to create Client stub using Apache开发者_运维知识库 Axis 2 in eclipse Galileo SR2.

I am trying to call webservice in .net using it's wsdl from Java. I am trying to create Client stub using Apache开发者_运维知识库 Axis 2 in eclipse Galileo SR2. Same exception with Netbean 6.9.

I have "AddOrgService" method overloaded in webservice. Looks like it is creating a problem.

What could be the solution?

But I am getting following exception :

IWAB0399E Error in generating Java from WSDL:  java.lang.IllegalArgumentException: Duplicate 

operation with name=AddOrgService, found in portType 

'{http://ensim.com/unifyws/Exchange2K7WS}ExchangeManagerSoap'.
    java.lang.IllegalArgumentException: Duplicate operation with name=AddOrgService, found 

in portType '{http://ensim.com/unifyws/Exchange2K7WS}ExchangeManagerSoap'.
    at com.ibm.wsdl.PortTypeImpl.getOperation(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseBindingOperation(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseBinding(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
    at java.lang.Thread.run(Unknown Source)


I don't think SOAP allows for multiple operations with the same name (which would be the result of overloading methods in a .NET webservice). Either give the methods different names, or use attributes to make .NET create different operation names on the SOAP side without changing the method name itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消