Bonjour à tous,

En liaison avec mon soucis de transfert de fichier j'ai remarqué une chose bizare :
si je génère les artéfacts client depuis la wsdl exposé par le web service déployé ma méthode getFile à une valeur de retour en String alors que si je génère les artéfacts depuis la wsdl locale (générée avec wsgen) j'obtiens une valeur de retour en byte[].....

Vous avez déjà eu ça?

Cordialement

Nicolas

PS :

la wsdl récupérée en faisant : http://localhost:8080/wsmtom/service?wsdl :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
 
<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. --><definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://endpoint.mtom.ws.*****.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://endpoint.mtom.ws..*****..com/" name="MtomEndpointService">
<types>
<xsd:schema>
<xsd:import namespace="http://endpoint.mtom.ws..*****..com/" schemaLocation="http://localhost:8080/wsmtom/service?xsd=1"></xsd:import>
</xsd:schema>
</types>
<message name="getFile">
<part name="parameters" element="tns:getFile"></part>
</message>
<message name="getFileResponse">
<part name="parameters" element="tns:getFileResponse"></part>
</message>
<portType name="Service">
<operation name="getFile">
<input message="tns:getFile"></input>
<output message="tns:getFileResponse"></output>
</operation>
 
</portType>
<binding name="ServicePortBinding" type="tns:Service">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<operation name="getFile">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="MtomEndpointService">
<port name="ServicePort" binding="tns:ServicePortBinding">
<soap:address location="http://localhost:8080/wsmtom/service"></soap:address>
</port>
 
</service>
</definitions>
Et la locale :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-b03-. -->
<definitions targetNamespace="http://endpoint.mtom.ws..*****..com/" name="MtomEndpointService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint.mtom.ws..*****..com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <types>
    <xsd:schema>
      <xsd:import namespace="http://endpoint.mtom.ws..*****..com/" schemaLocation="MtomEndpointService_schema1.xsd"/>
    </xsd:schema>
  </types>
  <message name="getFile">
    <part name="parameters" element="tns:getFile"/>
  </message>
  <message name="getFileResponse">
    <part name="parameters" element="tns:getFileResponse"/>
  </message>
  <portType name="Service">
    <operation name="getFile">
      <input message="tns:getFile"/>
      <output message="tns:getFileResponse"/>
    </operation>
  </portType>
  <binding name="ServicePortBinding" type="tns:Service">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="getFile">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal"/>
      </input>
      <output>
        <soap:body use="literal"/>
      </output>
    </operation>
  </binding>
  <service name="MtomEndpointService">
    <port name="ServicePort" binding="tns:ServicePortBinding">
      <soap:address location="http://localhost:8080/wstom/service"/>
    </port>
  </service>
</definitions>