cancel
Showing results for 
Search instead for 
Did you mean: 

Error while executing third party wsdl.

Former Member
0 Kudos

Hi All,

In our project, there is a need to execute the WSDL available in this url

 

http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

While executing , its throwing an error message as shown below:

Web service returned error. Fault Code: "(http://schemas.xmlsoap.org/soap/envelope/)Server" Fault String: "javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: com.lexmark/home~mdm_vat_ear) Exception raised from invocation of public java.lang.String com.lexmark.VAT_Validate.VatNumberValidate(java.lang.String,java.lang.String) method on bean instance com.lexmark.VAT_Validate@19f70f97 for bean com.lexmark/home~mdm_vat_ear*annotation|com.lexmark~home~mdm_vat_ejb.jar*annotation|VAT_Validate in application com.lexmark/home~mdm_vat_ear.; nested exception is: javax.xml.ws.WebServiceException: Connection IO Exception. Check nested exception for details. (Unable to connect to ec.europa.eu:80 - Connection timed out: connect)."

Note: After generating clients noticed that under the generated package( eu.europa.ec.taxud.vies.services.checkvat) the class (CheckVatPortType) is having  parameters different from that of WSDL. I don’t know whether this is the cause.

Steps implemented:

1.       Added the ec.europa.eu in the nwa--> soa --> soa middleware settings--> WS Navigator white list.

2.       Created a ejb project and import wsdl.

3.       Right click on the WSDL and choose options WSDLà Generate Client.

4.       Java classes are generated.

5.       Create a session bean and implement the code for executing the wsdl as follows:

@WebServiceRef (name="checkVatPortType")

                 CheckVatService service;

public String VatNumberValidate(String Country,String VATNumber)

{

/**Till test 3 there is no issues.*/

                String test="1";

               

                CheckVatPortType portType=service.getPort(CheckVatPortType.class);

                test="2";

                Holder<String> address=new Holder<String>();

                Holder<String> name=new Holder<String>();

                Holder<XMLGregorianCalendar> requestDate=new Holder<XMLGregorianCalendar>();

                Holder<Boolean> valid=new Holder<Boolean>();

                Holder<String> country=new Holder<String>(Country);

                Holder<String> VatNumber=new Holder<String>(VATNumber);

               

                test ="3";

                portType.checkVat( country, VatNumber, requestDate, valid, name, address);

               

                test ="4";

                 return test;

}

Awaiting replies.

Best Wishes,

Idhaya R

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

The error "Unable to connect to ec.europa.eu:80 - Connection timed out: connect" clearly indicates it cannot connect to the targeted environment.

Have you checked if your NetWeaver environment is able to connect to the remote party?

Best,

Robin

Former Member
0 Kudos

Hi Robin,

I tried to access the wsdl url directly from the portal server, it is not accessible.Can you please tell me how to check the connectivity if this is not correct?

Best Wishes

Idhaya R

Qualiture
Active Contributor
0 Kudos

Most likely your portal server is behind DMZ, and as such is blocking requests to the outside world.

If I were you I would liaise with your Basis and/or infrastructure team on allowing requests from your server to the WSDL domain

Former Member
0 Kudos

Hi Robin,

After setting values in Proxy host and port in SOA --> soa middleware settings --> http proxy.

The issue got resolved.

Thanks for your help.

Best Wishes

Idhaya R

carlos_valentini3
Participant
0 Kudos

I need help with a question, I'm building a Web Dynpro application, and created a model for connecting to WebService (http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl) in order to validate the Vat number of European countries.

I'm not using EJB but creating a model "Adaptive Service Model"
When instantiating the classes created served web: CheckVat.java, CheckVatResponse.java, etc.
But when checking the created methods, I realized that was not created the method to send the VAT number and the country.
The problem is that I have to pass two parameters to run the query: VAT number and parents right?
In checkVat class, mapping the Web Dynpro not created the method with the name of CheckVat, I looked at all the ".java", the most that have are the "sets" and "stay."
Has anyone used this WSDL, as it did to send the parameters?


Many Thanks.

Answers (0)