views:

947

answers:

1

So i have a wsdl that defines a message part like the following

<wsdl:message name="processEnvelopeResponse">
 <wsdl:part name="processEnvelopeReturn" type="xsd:base64Binary"/>
</wsdl:message>

This maps to a xsd, wich then imports other xsds and so on.

I have the following questions:

  1. How can i generate the Message part objects from the xsd

Ignore this one, i have found the answer, you can do this as long as you import the xsd into the wsdl file. Will explain better later on

  1. How can i generate the client side objects in a way that allows me to directly fill the message objects and pass it over the wire
  2. How do i call the webservice, transforming the generated objects in to base64Binary (this one assumes the above is not possible)
A: 

So answering my own question, i was able to generate the artifacts to call the webservice from the list of xsd's, but i was unable to use them when calling the webservice.

So i ended up having to generate the XML by hand, lucky was i that this was a small call.

String input="XML";
byte[] s = port.processEnvelope(input.getBytes());

And since the response came in xsd:base64Binary too i had to map the incoming string into xml objects in order to process the response.

String xmloutput = new String(s,"UTF-8");

I then put xmloutput through jdom i got my data.

all in all a stupid way to implement a webservice.

Nuno Furtado