You configure a client handler in the client-config.wsdd. Anne
On 5/27/05, Manuel Nicolas Ortuño <[EMAIL PROTECTED]> wrote: > I don't know how can i do it. In web service I can implement a handler, I > can say the handler to the web service in deploy.wsdd, but this is a client > and I don't have a .wsdd for the client. Resuming I don't know how I can > implement a handler for a client. > > Thanks Anne. > > -----Mensaje original----- > De: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Enviado el: viernes, 27 de mayo de 2005 15:02 > Para: [email protected]; [EMAIL PROTECTED] > Asunto: Re: AxisFault: Did not understand "MustUnderstand" header(s) > > You need to configure a handler to process the SAP SOAP headers. > > Anne > > On 5/27/05, Manuel Nicolas Ortuño <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello, > > > > > > > > This is the client java code. > > > > > > > > package es.carm.ctyc.wc.CSigepal; > > > > > > > > import org.apache.axis.client.Call; > > > > import org.apache.axis.client.Service; > > > > import javax.xml.namespace.QName; > > > > > > > > import javax.xml.soap.MessageFactory; > > > > import javax.xml.soap.MimeHeaders; > > > > import javax.xml.soap.SOAPEnvelope; > > > > import javax.xml.soap.SOAPMessage; > > > > import javax.xml.soap.SOAPPart; > > > > import java.io.ByteArrayInputStream; > > > > > > > > public class m1 { > > > > public static void main(String[] args) { > > > > try { > > > > String endpoint = > > > "http://clustertxi.carm.es:50000/XISOAPAdapter/MessageServlet?channel=:SN_Ob > tenerEC:MandarFicheroSOAP&version=3.0&Sender.Service=SN_ObtenerEC&am > p;Interface=http%3A%2F%2Fcarm.es%2Fws%2Fec%5EIM_ObtenerEC"; > > > > String > > xml="<SOAP-ENV:Envelope > > xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" > > xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" > > xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" > > > xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><SOAP-ENV:Body><m:IM_OBTENERE > C > > > xmlns:m=\"http://carm.es/ws/ec\"><ID_EXP><EJER>2005</EJER><NUMEXP>000285</NU > MEXP></ID_EXP><CEN_GES>190200</CEN_GES></m:IM_OBTENEREC></SOAP-ENV:Body></SO > AP-ENV:Envelope>"; > > > > > > > > MessageFactory mf = > > MessageFactory.newInstance(); > > > > SOAPMessage smsg = > > > > mf.createMessage(new MimeHeaders(), new > > ByteArrayInputStream(xml.getBytes())); > > > > SOAPPart sp = smsg.getSOAPPart(); > > > > SOAPEnvelope se = > > (SOAPEnvelope)sp.getEnvelope(); > > > > > > > > Service service = new > > Service(); > > > > Call call = > > (org.apache.axis.client.Call) service.createCall(); > > > > call.setUsername("***"); > > > > call.setPassword("***"); > > > > > > > > > > call.setTargetEndpointAddress(new java.net.URL(endpoint)); > > > > > > call.setOperationName(new QName("","IM_OBTENEREC")); > > > > > > > > > > org.apache.axis.message.SOAPEnvelope > > soape=call.invoke((org.apache.axis.message.SOAPEnvelope)se); > > > > } catch (Exception e) { > > > > e.printStackTrace(); > > > > } > > > > } > > > > } > > > > > > > > > > > > The response is > > > > > > > > <SOAP:Envelope > > xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> > > > > <SOAP:Header> > > > > <sap:HopList > > xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1"> > > > > <sap:Hop > > timeStamp="2005-05-27T07:48:16Z" wasRead="false"> > > > > <sap:Engine > > type="AE">af.txi.clustertxi</sap:Engine> > > > > <sap:Adapter > > namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter> > > > > > > <sap:MessageId>afb0d6a0-ce83-11d9-9464-00110aea5b0c</sap:MessageId> > > > > <sap:Info/> > > > > </sap:Hop> > > > > <sap:Hop > > timeStamp="2005-05-27T07:48:17Z" wasRead="false"> > > > > <sap:Engine > > type="AE">af.txi.clustertxi</sap:Engine> > > > > <sap:Adapter > > namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter> > > > > > > <sap:MessageId>afb0d6a0-ce83-11d9-9464-00110aea5b0c</sap:MessageId> > > > > </sap:Hop> > > > > </sap:HopList> > > > > <sap:ReliableMessaging > > xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1"> > > > > > > <sap:QualityOfService>BestEffort</sap:QualityOfService> > > > > </sap:ReliableMessaging> > > > > <sap:Diagnostic > > xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1"> > > > > > > <sap:TraceLevel>Fatal</sap:TraceLevel> > > > > > > <sap:Logging>Off</sap:Logging> > > > > </sap:Diagnostic> > > > > <sap:Main > > xmlns:sap="http://sap.com/xi/XI/Message/30" versionMajor="3" > > versionMinor="0" SOAP:mustUnderstand="1"> > > > > > > <sap:MessageClass>ApplicationResponse</sap:MessageClass> > > > > > > <sap:ProcessingMode>synchronous</sap:ProcessingMode> > > > > > > <sap:MessageId>afb0d6a0-ce83-11d9-9464-00110aea5b0c</sap:MessageId> > > > > > > > <sap:RefToMessageId>aecd7b80-ce83-11d9-b5e9-00110aea5b0c</sap:RefToMessageId > > > > > > > > <sap:TimeSent>2005-05-27T07:48:16Z</sap:TimeSent> > > > > <sap:Sender> > > > > <sap:Party > > agency="http://sap.com/xi/XI" scheme="XIParty">CON</sap:Party> > > > > > > <sap:Service>CON</sap:Service> > > > > </sap:Sender> > > > > <sap:Receiver> > > > > <sap:Party > > agency="http://sap.com/xi/XI" scheme="XIParty"/> > > > > > > <sap:Service>SN_ObtenerEC</sap:Service> > > > > </sap:Receiver> > > > > <sap:Interface > > namespace="http://carm.es/ws/ec">IM_ObtenerEC</sap:Interface> > > > > </sap:Main> > > > > </SOAP:Header> > > > > <SOAP:Body> > > > > <n:EX_OBTENEREC xmlns:n="http://carm.es/ws/ec"> > > > > <LISTA_EXP_CONTABLE> > > > > > > <EXPEDIENTE_CONTABLE> > > > > > > <CAB> > > > > > > <ID_CAB> > > > > > > <CIRCUITO>CONTABLE</CIRCUITO> > > > > > > <COD_TERRI>000000</COD_TERRI> > > > > > > <EJER>2005</EJER> > > > > > > <NUMEXP>000285</NUMEXP> > > > > > > </ID_CAB> > > > > > > <DESC_CAB>MANIFESTACIONES POPULARES DE CARACTER > > TU</DESC_CAB> > > > > > > <DOC_PRE>1100019706</DOC_PRE> > > > > > > <SOCIEDAD>CARM</SOCIEDAD> > > > > > > <FASE_DOC>R</FASE_DOC> > > > > > > <CLASE_DOC>RC</CLASE_DOC> > > > > > > <TIPO_EXP>RSR</TIPO_EXP> > > > > > > <INTERVENCION> > > > > > > <INTERV/> > > > > > > <TIPO_INTERV>N</TIPO_INTERV> > > > > > > <FASE_INTERV>0000</FASE_INTERV> > > > > > > </INTERVENCION> > > > > > > <FECHA_CONT>00000000</FECHA_CONT> > > > > > > <FECHA_ALTA>20050113</FECHA_ALTA> > > > > > > <FECHA_REAL_ALTA>20050113</FECHA_REAL_ALTA> > > > > > > <ID_DOC_REF> > > > > > > <CIRCUITO/> > > > > > > <COD_TERRI/> > > > > > > <EJER>0000</EJER> > > > > > > <NUMEXP>000000</NUMEXP> > > > > > > </ID_DOC_REF> > > > > > > <DOC_PRE_REF/> > > > > > > </CAB> > > > > > > <LINEAS> > > > > > > <NUM_LIN>1</NUM_LIN> > > > > > > <LINEA_CONTABLE> > > > > > > <POS_EXP>000001</POS_EXP> > > > > > > <CEN_GES>190200</CEN_GES> > > > > > > <POS_PRE>G/751A/48400</POS_PRE> > > > > > > <ACREEDOR/> > > > > > > <NIF/> > > > > > > <IMPORTE>419994.00</IMPORTE> > > > > > > <DISPONIBLE>0.00</DISPONIBLE> > > > > > > <MONEDA>EUR</MONEDA> > > > > > > <FECHA_PAGO>00000000</FECHA_PAGO> > > > > > > <DOC_FI/> > > > > > > <PROYECTO>30856</PROYECTO> > > > > > > <ACTIVO_FIJO/> > > > > > > <DESC_LIN/> > > > > > > <POS_EXP_REF>000000</POS_EXP_REF> > > > > > > </LINEA_CONTABLE> > > > > > > </LINEAS> > > > > > > </EXPEDIENTE_CONTABLE> > > > > </LISTA_EXP_CONTABLE> > > > > <RESULTADO> > > > > > > <TEXTO_ERROR>Expedientes Visualizados:000001</TEXTO_ERROR> > > > > > > <CODIGO_ERROR>e000</CODIGO_ERROR> > > > > </RESULTADO> > > > > </n:EX_OBTENEREC> > > > > </SOAP:Body> > > > > </SOAP:Envelope> > > > > > > > > And the exception is: > > > > > > > > AxisFault > > > > faultCode: > > {http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand > > > > faultSubcode: > > > > faultString: Did not understand "MustUnderstand" header(s): > > > > faultActor: > > > > faultNode: > > > > faultDetail: > > > > {http://xml.apache.org/axis/}stackTrace: > > > > at > > > org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChe > cker.java:96) > > > > at > > org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) > > > > at > > org.apache.axis.client.Call.invokeEngine(Call.java:2765) > > > > at org.apache.axis.client.Call.invoke(Call.java:2748) > > > > at org.apache.axis.client.Call.invoke(Call.java:1902) > > > > at es.carm.ctyc.wc.CSigepal.m1.main(m1.java:50) > > > > > > > > {http://xml.apache.org/axis/}hostname:r114pc269 > > > > > > > > Did not understand "MustUnderstand" header(s): > > > > at > > > org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChe > cker.java:96) > > > > at > > org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) > > > > at > > org.apache.axis.client.Call.invokeEngine(Call.java:2765) > > > > at org.apache.axis.client.Call.invoke(Call.java:2748) > > > > at org.apache.axis.client.Call.invoke(Call.java:1902) > > > > at es.carm.ctyc.wc.CSigepal.m1.main(m1.java:50) > > > > > > > > > > > > If I use wsdl2java to generate the java class from send and recive object, > > and implement a java client: > > > > > > > > public class prueba { > > > > > > > > public static void main(String[] args) { > > > > > > > > IM_ObtenerECBindingStub servicio = null; > > > > IM_ObtenerECServiceLocator locator = new > > IM_ObtenerECServiceLocator(); > > > > _IM_OBTENEREC im = new _IM_OBTENEREC(); > > > > try { > > > > servicio = (IM_ObtenerECBindingStub) > > locator.getIM_ObtenerECPort(); > > > > servicio.setUsername("***"); > > > > servicio.setPassword("***"); > > > > im=… > > > > _EX_OBTENEREC ex = servicio.IM_ObtenerEC(im); > > > > } catch (Exception e) { > > > > e.printStackTrace(); > > > > } > > > > } > > > > } > > > > > > > > This code throw the same exception: Did not understand "MustUnderstand" > > header(s): > > > > I read that if the exception throw in web service can solve implement a > > Handler, but in client I don't now how I can solve this problem. > > > > > > > > Thanks. > > > > > > > > > > > > ________________________________ > > > > > > De: Anand, Rajesh [mailto:[EMAIL PROTECTED] > > Enviado el: jueves, 26 de mayo de 2005 15:12 > > Para: [email protected]; [EMAIL PROTECTED] > > Asunto: RE: AxisFault: Did not understand "MustUnderstand" header(s) > > > > > > > > > > > > Can you paste your full soap msg which goes out to the wire and your > > java pgm which builds this soap msg. > > > > > > > > > > > > rgds, > > > > Rajesh Anand > > Email:[EMAIL PROTECTED] > > > > > > -----Original Message----- > > From: Manuel Nicolas Ortuño [mailto:[EMAIL PROTECTED] > > Sent: 26 May 2005 14:07 > > To: [email protected] > > Subject: AxisFault: Did not understand "MustUnderstand" header(s) > > > > I have a client of web service that use axis api. When I call the service > I > > get the exception > > > > > > > > AxisFault > > > > faultCode: > > {http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand > > > > faultSubcode: > > > > faultString: Did not understand "MustUnderstand" header(s): > > > > faultActor: > > > > faultNode: > > > > faultDetail: > > > > {http://xml.apache.org/axis/}stackTrace: > > > > ... > > > > [Message clipped] > >
