views:

61

answers:

1

I'm trying to generate a web service client with eclipse (I also tried with jdeveloper and netbeans). The WSDL is behind a https server with client certificate request.

I can connect and generate the classes with this command:

java -Djavax.net.ssl.trustStore=testes.keystore -Djavax.net.ssl.keyStore=testes.keystore -Djavax.net.ssl.trustStorePassword=123 -Djavax.net.ssl.keyStorePassword=123 -Dsun.security.ssl.allowUnsafeRenegotiation=true -jar D:\Java\jdevstudio10134\webservices\lib\wsa.jar -genProxy -wsdl https://urlxpto?wsdl

But then I get an error about a ActionMismatch. Probably this error comes from the library I'm using so I want to try with axis. If I use the wizard in eclipse it gives an error when trying to connect. The same happens with jdeveloper or netbeans.

So the question is: How do I do it? How to generate a web service proxy with an IDE?

Or the question can be: how do I change the message part to match the action part in a soap request?

Thanks!

A: 

I guess I can't use the classic wizard to generate a web service client that is behind https with client certificate request.

The only way I can think of and that worked for me was:

  • install the needed certificates in a browser;
  • manually download the WSDL xml document;
  • manually download every xml documents that the WSDL refers to, that are in the same domain;
  • alter the WSDL to point to the xml files on disk instead of pointing to urls where those documents are;
  • build the client with genproxy or WSDL2Java or with a wizard against the WSDL on disk
  • alter the code to point to the original URLs;
  • finally add the keystore details to the generated client;

I still have some problems but I can now connect and "talk" with the server.

daigorocub