on 08-24-2012 11:26 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.