axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Axis2 wsdl2java client: How to add processing instructions
Date Thu, 23 Oct 2008 11:16:54 GMT

I am trying to implement a client with axis2 1.4.1 (REST) for a "legacy
webservice". This webservice is defined as just sending XML per HTTP
POST (x-www-form-urlencoded) and getting the answer message as a
supplement of the http response. 
I generated a WSDL file according to the specification provided by the
webservice provider and created a client with wsdl2java (ADB). This is
working pretty fine, but i have two problems, i couldn't solve so far:

a) My requests are answered with an error message hinting towards two
missing processing instructions, at the beginnning of the request like

<?xml version="1.0" encoding="ISO-8859-1"?>
<?provider version="1.0"?>

I found a mailthread(Need for Child API in OMDocument:
%22 ) that suggests a possibility, to add such instructions before the
transport, but i did not find a way to use this. Can anybody give me a
hint, how to do this or where to look further? Or is it possible to
declare such processing instructions already inside the WSDL?

b) the received http response of the webservice (containing the error
message in the XML supplement) is not recognized by axis2, though it
looks quite correct. The error message is 
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement EngineAnswer
I have not finally analyzed the exact reason by debugging through the
code, but I am affraid i will have to manipulate the http response in a
similar manner like the request, before it is handed over to the axis2
parsing. So, if anybody has a way to achieve this at his fingertips, his
help is appreciated very much!

I'm pretty new to axis ( and java as well ) so please forgive me, if
this is a BRTFM.

Thanks in advance for any hint and best regards
Martin Berns

P.S.: My actual configuration is:

  AxisConfiguration axisConfig = new AxisConfiguration();
  ConfigurationContext myConfigContext;
  try {
  	myConfigContext =
l , null);
  } catch (AxisFault e1) {
  	// TODO Auto-generated catch block
  myConfigContext.setProperty(Constants.Configuration.HTTP_METHOD ,
  myConfigContext.setProperty(Constants.Configuration.CONTENT_TYPE ,
s.CHUNKED, Boolean.FALSE);
proxy = new
  myConfigContext.setProperty(HTTPConstants.PROXY , proxy);
  myConfigContext.setProperty(HTTPConstants.PROTOCOL_VERSION ,
  try {
	myServiceStub myStub = new myServiceStub(myConfigContext,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message