Hi,
I created a simple Java class that has 3 methods
String getString() {
return "Test";
}
String[] getStringArray() {
String[] ret = new String[2];
ret[0] = "Test1";
ret[2] = "Test2";
}
String[] getEmptyStringArray() {
return new String[0];
}
and exported it as a webservice using Axix Beta RC2
The WSDL was created with
java org.apache.axis.wsdl.Java2WSDL -o wsdl.out -l TestService
service.TestService
I installed the complete webapp in Tomcat and deployed the service.
Then I tried to access the Service using VB6 and MS SOAP Toolkit 2 using the
high level API
Private Sub Command1_Click()
Dim client As New MSSOAPLib.SoapClient
On Error GoTo err
client.mssoapinit
"http://localhost:8080/webservice/wsdl/TestService.wsdl"
err:
MsgBox client.faultstring
MsgBox client.detail
End Sub
When trying to initialize the client using the WSDL, I get an error:
"SoapMapper: The schema definition with a targetnamespace of
http://schemas.xmlsoap.org/soap/encoding/ for SoapMapper string could not be
found"
and a fault detail:
WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005 -
WSDLReader:Initialization of service failed HRESULT=0x80004005 -
WSDLService:Initialization of the port for service TestServiceService failed
HRESULT=0x80004005 - WSDLPort:Analyzing the binding information for port
TestService failed HRESULT=0x80004005 - WSDLPort:An operation for port
TestService could not be initialized HRESULT=0x80004005 -
WSDLOperation:Initializing of the output message failed for operation
getString HRESULT=0x80004005 - WSDLOperation:Initialization of a SoapMapper
for operation getString failed HRESULT=0x80004005 - SoapMapper:The
SoapMapper for element string could not be created HRESULT=0x80004005 -
SoapMapper:The schema definition with a targetnamespace of
http://schemas.xmlsoap.org/soap/encoding/ for SoapMapper string could not be
found HRESULT=0x80004005
The same testcase worked fine with Axis Alpha 3.
Any idea if this is my bug, a bug at all or an interop-problem?
I tried to switch to the TypeMapping Version 1.1, but that failed when
invoking
java org.apache.axis.wsdl.Java2WSDL -o wsdl.out -T 1.1 -l TestService
service.TestService
The code in org.apache.axis.wsdl.Java2WSDL should probably be changed to
compare the values and not the option
case TYPEMAPPING_OPT:
String value = option.getArgument();
if (value.equals("1.1")) {
emitter.setDefaultTypeMapping(
DefaultTypeMappingImpl.create());
} else if (value.equals("1.2")) {
emitter.setDefaultTypeMapping(
DefaultSOAP12TypeMappingImpl.create());
} else {
System.out.println(JavaUtils.getMessage("j2wBadTypeMapping00"));
}
break;
Armin