Problem upgrading from Axis2/Java 1.4.1 to 1.5.1 (wsdl2java)

View: New views
2 Messages — Rating Filter:   Alert me  

Problem upgrading from Axis2/Java 1.4.1 to 1.5.1 (wsdl2java)

by SGE0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

we upgrade from Axis2 1.4.1 to 1.5.1.

We have successfully upgraded the server side, now we try to upgrade the client.

We use wsdl2java to generate the java code.

The code to generate the java is as follows:

..org.apache.axis2.wsdl.WSDL2Java -t -p test.services.client.upload     -uri http://localhost:8080/test/services/Upload?wsdl



We use following code to call the generated code:

      // Get the service binding
      ...client.upload.UploadStub stub = new ....upload.UploadStub();

      // Get a handle to the Upload stub - Prepare operation
      ....client.upload.UploadStub.Upload operation = (....client.upload.UploadStub.Upload) demo_getADBBean(....client.upload.UploadStub.Upload.class);

      // Get document
     ...

      // Call the webservice

      // Note: datdataHandler automatically seritalies the content in Base64 String
      DataSource dataSource = new ByteArrayDataSource( uploadedfile.toByteArray(), "application/octet-stream");
      DataHandler dataHandler = new DataHandler(dataSource);

      operation.setPdfdocument(dataHandler);
     ...

We noticed that the generated soap is missing its headers:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns1:upload xmlns:ns1="http://services.test.be">
      ...<ns1:pdfdocument>JV...Qo=</ns1:pdfdocument>
    </ns1:upload>
  </soapenv:Body>
</soapenv:Envelope>


Does something more needs to be done compared with version 1.4.1 ?

Regards,

S.

Re: Problem upgrading from Axis2/Java 1.4.1 to 1.5.1 (wsdl2java)

by SGE0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is the same (I guess) as the post: '  Upgrading from Axis2/Java 1.4.1 to 1.5.1 (missing SOAP header
'

SGE0 wrote:
Hi,

we upgrade from Axis2 1.4.1 to 1.5.1.

We have successfully upgraded the server side, now we try to upgrade the client.

We use wsdl2java to generate the java code.

The code to generate the java is as follows:

..org.apache.axis2.wsdl.WSDL2Java -t -p test.services.client.upload     -uri http://localhost:8080/test/services/Upload?wsdl



We use following code to call the generated code:

      // Get the service binding
      ...client.upload.UploadStub stub = new ....upload.UploadStub();

      // Get a handle to the Upload stub - Prepare operation
      ....client.upload.UploadStub.Upload operation = (....client.upload.UploadStub.Upload) demo_getADBBean(....client.upload.UploadStub.Upload.class);

      // Get document
     ...

      // Call the webservice

      // Note: datdataHandler automatically seritalies the content in Base64 String
      DataSource dataSource = new ByteArrayDataSource( uploadedfile.toByteArray(), "application/octet-stream");
      DataHandler dataHandler = new DataHandler(dataSource);

      operation.setPdfdocument(dataHandler);
     ...

We noticed that the generated soap is missing its headers:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns1:upload xmlns:ns1="http://services.test.be">
      ...<ns1:pdfdocument>JV...Qo=</ns1:pdfdocument>
    </ns1:upload>
  </soapenv:Body>
</soapenv:Envelope>


Does something more needs to be done compared with version 1.4.1 ?

Regards,

S.