I am trying to run the wsdl2java command on a WSDL file that was given to me from another group in my company. I know wsdl2java works because I can run the examples but when I try it on the wsdl given to me it fails. The one big difference is that the WSDL given to me uses SSL.
I’m using Java 1.4 (checked it a few time) and made sure all the correct jars are in my class path, jsse.jar is there.
COMMAND: java org.apache.axis.wsdl.WSDL2Java –server-side GenericWebService.wsdl
ERROR:
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle). log4j:WARN Please initialize the log4j system properly. **java.io.IOException: Emitter failure. Invalid endpoint address in port AC_x0020_Generic_x0020_Web_0020_ServiceSoap in service AC_x0020_Generic_x0020_Web_x0020_ServiceLocator: ** at org.apache.axis.wsdl.toJava.JavaServiceImplWriter.writeFileBody(JavaServiceImplWriter.ja a:242) at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:127) at org.apache.axis.wsdl.toJava.JavaServiceWriter.generate(JavaServiceWriter.java:112) at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.j va:421) at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:476) at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362) at java.lang.Thread.run(Thread.java:534)
asdf
<wsdl:portType name='AC_x0020_Generic_x0020_Web_x0020_ServiceSoap'> <wsdl:operation name='Provision'> <wsdl:input message='tns:ProvisionSoapIn' /> <wsdl:output message='tns:ProvisionSoapOut' /> </wsdl:operation> </wsdl:portType> <wsdl:binding name='AC_x0020_Generic_x0020_Web_x0020_ServiceSoap' type='tns:AC_x0020_Generic_x0020_Web_x0020_ServiceSoap'> <soap:binding transport='http://schemas.xmlsoap.org/soap/http' /> <wsdl:operation name='Provision'> <soap:operation soapAction='http://xmlns.fmr.com/systems/dev/aar/2008/05/GenericWebService/Provision' style='document' /> <wsdl:input> <soap:body use='literal' /> <soap:header message='tns:ProvisionServiceProcessingDirectives' part='ServiceProcessingDirectives' use='literal' /> <soap:header message='tns:ProvisionServiceCallContext' part='ServiceCallContext' use='literal' /> </wsdl:input> <wsdl:output> <soap:body use='literal' /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name='AC_x0020_Generic_x0020_Web_x0020_Service'> <wsdl:documentation xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'>Generic web service definition for provisioning requests callable by AccessCENTRAL</wsdl:documentation> <wsdl:port name='AC_x0020_Generic_x0020_Web_x0020_ServiceSoap' binding='tns:AC_x0020_Generic_x0020_Web_x0020_ServiceSoap'> <soap:address location='' /> </wsdl:port> </wsdl:service>
UPDATED SOLUTION: The problem was that the parser needed a value in the <soap:address location=” /> for it to complete. I added the URL of my service and it worked.
New Lines looked like:
<soap:address location='' http://localhost:8080/axis/services/AC_x0020_Generic_x0020_Web_x0020_Service' />
The location specified by the soap:address is blank. It should be the URI of the SOAP service. See soap:address.
Looking at soapAction, http://xmlns.fmr.com/systems/dev/aar/2008/05/GenericWebService might be the correct value for location.