Dejell
Dejell

Reputation: 14337

wsdl2java Invalid endpoint address in port when the address exists

I would like to connect to eBay API. I downloaded the WSDL from their site

I can see that the address exists:

<wsdl:service name="FindingService">
        <wsdl:documentation>
            <Version>1.12.0</Version>
        </wsdl:documentation>
        <wsdl:port name="FindingServiceSOAPPort"
            binding="tns:FindingServiceSOAPBinding">
            <soap12:address
                xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
                location="https://svcs.ebay.com/services/search/FindingService/v1"/>
        </wsdl:port>
    </wsdl:service>

However, when I try to create a new Web Service Client project in Eclipse I get:

IWAB0399E Error in generating Java from WSDL:  java.io.IOException: 
Emitter failure.  Cannot find endpoint address in port FindingServiceSOAPPort 
in service FindingServiceLocator

What could be the problem?

Upvotes: 1

Views: 3069

Answers (2)

StoopidDonut
StoopidDonut

Reputation: 8617

I faced the same problem while using Axis instead of Axis2 for wsdl2java generation. You would have to try it with Axis2 instead of Axis - earlier as well I had run into similar timeout and emitter exceptions which were to be sorted by switching to Axis2.

In the below example screenshots, I used your example WSDL and was able to generate the client classes, below:

  1. Set your Axis2 up - download from here
  2. Associate the Axis2 runtime to the downloaded directory enter image description here

  3. Create a Dynamic Web Project in eclipse enter image description here

  4. Make sure to select a lower Dynamic Web Module version (like: 2.5 as 3.0 causes conflicts with Axis2) enter image description here

  5. Select the Web Service Client within the created project enter image description here

  6. Ensure to pick Web service Runtime as Apache Axis2 enter image description here

  7. Voila, you are a step away from generating your client classes! enter image description here

Upvotes: 3

user1339772
user1339772

Reputation: 803

I believe there is some issue with the URL, I see that their sandbox service is up and running at http://svcs.sandbox.ebay.com/services/search/FindingService/v1. May be you can you try creating project with sandbox and see if it works, and then contact the webservice provider for actual issue.

You can try import the project in SOAP-UI, am sure the production end point URL will fail, and the sandbox will work. Looks like there is no issue with WSDL2Java tool.

Upvotes: 1

Related Questions