Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to generate client classes based on WSDL file in java  RSS feed

 
jami siva
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our Java project, We are accessing some other third party WSDL, which contains another wsdl file inside Main wsdl file.

Main wsdl file i was able to access and included WSDL file they are referring with hostname.

If i try to open included WSDL file, it is not opening, but if i changed included wsdl file host name to IP address, the included WSDL file also able to access.

Even if i try to generate client classes by using wsimport it is giving me below error.
Failed to parse the WSDL.

For sample, this is the Main WSDL. <import location> is the sub url which contains hostname instead of IP address, if i try to open sub url, it is opening, and if i changed that sub url host name to ip address i was able to login.

 
Mike Degteariov
Ranch Hand
Posts: 145
8
Java Mac MySQL Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider including a mapping of a hostname from the wsdl to the IP address in /etc/hosts system file.

http://en.wikipedia.org/wiki/Hosts_(file)

After you have included it, the domain name resolving will be done by your machine locally, and the correct IP address will be used.

This should help.
 
jami siva
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mike.

After i added hostname to IP address mapping in host file, I got another error.

ERROR [org.jboss.ws.core.CommonClient] Exception caught while (preparing for) performing the invocation:
javax.xml.ws.soap.SOAPFaultException: Cannot get target bean instance

Can you help me what is the root cause of this and How to get rid of this.


 
Mike Degteariov
Ranch Hand
Posts: 145
8
Java Mac MySQL Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOAPFaultException is a wrapper over a SOAPFault, which, in turn, is an element of a SOAPBody,
Which means that the error was delivered to you in SOAP message from remote server that runs the service you are trying to call.
SOAPFault can technically happen on a client side too, but in your case some bean instance cannot be resolved, and your client code generated just today, so I think this is a server problem.

I think that either the WSDL is out of sync with e server implementation, or something is not deployed properly, or the server is screwed up in some other way. I would recommend to contact those responsible for the server part, get the logs, and see what is going on.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!