Hello,
First of all, I'd like to apologize in case of this question is a
classic about CXF and/or JaxB, but my research did not give me a good
answer, that's why I come to this mailing-list.
I have a Service that I expose from a Java class with a "normal" CXF
ServerFactoryBean with default databinding and co... (I attached the
WSDL generated by CXF).
The only method in my class is
public String[][] TestJob() throws Exception
I now access this service in a JUnit test with a DynamicClientFactory.
But the result of client.invoke("TestJob") is actually a
net.java.dev.jaxb.array.StringArray[] whereas I wish to have a String[][].
I imagine that there is a way to get the String[][] I expect, and I also
imagine (according to the wsdl that contains the StringArray type
definition) that such a customization may occur at server side, but I
did not succeed to find how to specify it.
Does anyone have a clue to help me?
Regards,
Mickael
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="TestService" targetNamespace="http://DefaultNamespace" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://DefaultNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://jaxb.dev.java.net/array" xmlns="http://jaxb.dev.java.net/array" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType final="#all" name="stringArray">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://DefaultNamespace" xmlns:ns0="http://jaxb.dev.java.net/array" xmlns:tns="http://DefaultNamespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://jaxb.dev.java.net/array"/>
<xsd:element name="TestJob" type="tns:TestJob"/>
<xsd:complexType name="TestJob">
<xsd:sequence/>
</xsd:complexType>
<xsd:element name="TestJobResponse" type="tns:TestJobResponse"/>
<xsd:complexType name="TestJobResponse">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="return" type="ns0:stringArray"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="TestJob">
<wsdl:part element="tns:TestJob" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="TestJobResponse">
<wsdl:part element="tns:TestJobResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="TestServicePortType">
<wsdl:operation name="TestJob">
<wsdl:input message="tns:TestJob" name="TestJob">
</wsdl:input>
<wsdl:output message="tns:TestJobResponse" name="TestJobResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestServiceSoapBinding" type="tns:TestServicePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="TestJob">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="TestJob">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="TestJobResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestService">
<wsdl:port binding="tns:TestServiceSoapBinding" name="TestServicePort">
<soap:address location="http://localhost:8080/talendServices/services/TestService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>