RE: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service
I found the section of auto generated code causing the problem - /** * An XML TimeCode(@http://www.example.org/AsRun). * * This is a complex type. */ public class TimeCodeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.directv.dtss.itx.client.TimeCode { public TimeCodeImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName TIME$0 = new javax.xml.namespace.QName("http://www.example.org/AsRun";, "Time"); How do I programmatically, at runtime determine the appropriate namespace to set for TIME$0 ? I want to use this as a work around if possible -> public TimeCodeImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); String someNameSpace = schemaTargetNameSpace (WHAT?? How do I determine?) //"http://www.example.org/AsRun"; TIME$0 = new javax.xml.namespace.QName(schemaTargetNameSpace, "Time"); } private static javax.xml.namespace.QName TIME$0 = null; Thanks Srinivas From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 17, 2007 9:49 PM To: axis-user@ws.apache.org Subject: Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service This is a problem with the request. In your schema target namespace is http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServ ices/"> and TimeCode element is like this So that the Time element should be in the http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ namespace. But your request is http://www.example.org/AsRun";>11:10:09:00 So the Time elemnet is in http://www.example.org/AsRun. this is the problem which creates the problem with the ADB service. Any way how this namespace name have come here? I can not see this in the wsdl. But I feel this is a valid jira since xmlbeans client does not generates the request correctly. please log a jira. Does this work properly with the adb client? Amila. On 4/18/07, Ajith Ranabahu <[EMAIL PROTECTED]> wrote: Hi, The failure you are seeing is probably not due to the client but thrown from the server and reported by the client as an exception. The general cause of this error message is the presence of an incompatible element in the XML. However in your case the XMLBeans service works which means there is no probs with the client and hence this could well be a bug in ADB (may restriction handling which was a recent addition) In any case see whether you can use tcpmon to capture a few message. Ajith On 4/17/07, Sampige, Srinivas <[EMAIL PROTECTED]> wrote: > I have implemented 2 versions of the same webservice; one using ADB and > the other using XMLBeans binding. Both services have the same exact > WSDL. I generated a client using xmlbeans binding which works fine > against the service using xmlbeans. But, the same client when pointed > against the service using ADB binding the, client fails with " > Unexpected subelement" > > --- > org.apache.axis2.AxisFault: java.lang.RuntimeException : Unexpected > subelement Time > at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper > ation.java:271) > at > org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisO > peration.java:202) > at > com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S > cheduleServiceStub.java:152) > at > com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po > stSchedule(ScheduleReceiveServiceClientHelper.java:112) > at > com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche > duleServiceClientSample.java:157) > -- > > From my understanding, given a WSDL, when we generate a client it should > work regardless of how the service is implemented correct?(transparent > to the client hence the very purpose of the WSDL right?). > > I am running Axis2-1.1.1 on Tomcat 5.5.23 > > I have attached 2 files= >1) the wsdl itself (scheduleService.wsdl) >2) the request/response output from tcpmon in the 2 cases > (adbxmlbeans.txt) > > I followed steps outlined in > http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub > element-value-t3489089.html but I cannot get to the stage where I can > see the response in the scenario when it fails. > > > Thanks in
RE: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service
I figured how the other namespace has crept. I am generating a single client for 2 WSDLS. The 2 WSDLs expose different functionalities but have most of the types the same. The types are inlined (as you saw in the attached WSDL). So, when the stub against the 2nd WSDL gets generated the same TimeCode element gets generated with the the new namespace. Do I have a workaround without modifying the WSDLs and without altering the way the clients are being generated presently? Thanks Srinivas From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 17, 2007 9:49 PM To: axis-user@ws.apache.org Subject: Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service This is a problem with the request. In your schema target namespace is http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServ ices/"> and TimeCode element is like this So that the Time element should be in the http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ namespace. But your request is http://www.example.org/AsRun";>11:10:09:00 So the Time elemnet is in http://www.example.org/AsRun. this is the problem which creates the problem with the ADB service. Any way how this namespace name have come here? I can not see this in the wsdl. But I feel this is a valid jira since xmlbeans client does not generates the request correctly. please log a jira. Does this work properly with the adb client? Amila. On 4/18/07, Ajith Ranabahu <[EMAIL PROTECTED]> wrote: Hi, The failure you are seeing is probably not due to the client but thrown from the server and reported by the client as an exception. The general cause of this error message is the presence of an incompatible element in the XML. However in your case the XMLBeans service works which means there is no probs with the client and hence this could well be a bug in ADB (may restriction handling which was a recent addition) In any case see whether you can use tcpmon to capture a few message. Ajith On 4/17/07, Sampige, Srinivas <[EMAIL PROTECTED]> wrote: > I have implemented 2 versions of the same webservice; one using ADB and > the other using XMLBeans binding. Both services have the same exact > WSDL. I generated a client using xmlbeans binding which works fine > against the service using xmlbeans. But, the same client when pointed > against the service using ADB binding the, client fails with " > Unexpected subelement" > > --- > org.apache.axis2.AxisFault: java.lang.RuntimeException : Unexpected > subelement Time > at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper > ation.java:271) > at > org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisO > peration.java:202) > at > com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S > cheduleServiceStub.java:152) > at > com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po > stSchedule(ScheduleReceiveServiceClientHelper.java:112) > at > com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche > duleServiceClientSample.java:157) > -- > > From my understanding, given a WSDL, when we generate a client it should > work regardless of how the service is implemented correct?(transparent > to the client hence the very purpose of the WSDL right?). > > I am running Axis2-1.1.1 on Tomcat 5.5.23 > > I have attached 2 files= >1) the wsdl itself (scheduleService.wsdl) >2) the request/response output from tcpmon in the 2 cases > (adbxmlbeans.txt) > > I followed steps outlined in > http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub > element-value-t3489089.html but I cannot get to the stage where I can > see the response in the scenario when it fails. > > > Thanks in advance > Srinivas > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service
Good Morning My question is how is the XML schema definition could be imported without ref'ng a valid XMLSchema from namespace attribute? I would suggest looking at this example from /samples/databinding/stockquote/StockQuote.xsd //remember to import the namespace in your .wsdl via import statement e.g. namespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; location="StockQuote.xsd" /> //In the wsdl we can import our own parameters based on the getStockQuote //Display of Contents of StockQuote.xsd http://www.w3.org/2001/XMLSchema"; targetNamespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; xmlns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; I suggest using a Working (.xsd) example/ modify the xsd elements to suit your own requirements..once defined in the imported xsd / then reference those types in the wsdl Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Sampige, Srinivas" <[EMAIL PROTECTED]> To: ; "Martin Gainty" <[EMAIL PROTECTED]> Sent: Tuesday, April 17, 2007 9:29 PM Subject: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service I have implemented 2 versions of the same webservice; one using ADB and the other using XMLBeans binding. Both services have the same exact WSDL. I generated a client using xmlbeans binding which works fine against the service using xmlbeans. But, the same client when pointed against the service using ADB binding the, client fails with " Unexpected subelement" --- org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected subelement Time at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:271) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:202) at com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S cheduleServiceStub.java:152) at com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po stSchedule(ScheduleReceiveServiceClientHelper.java:112) at com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche duleServiceClientSample.java:157) -- From my understanding, given a WSDL, when we generate a client it should work regardless of how the service is implemented correct?(transparent to the client hence the very purpose of the WSDL right?). I am running Axis2-1.1.1 on Tomcat 5.5.23 I have attached 2 files= 1) the wsdl itself (scheduleService.wsdl) 2) the request/response output from tcpmon in the 2 cases (adbxmlbeans.txt) I followed steps outlined in http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub element-value-t3489089.html but I cannot get to the stage where I can see the response in the scenario when it fails. Thanks in advance Srinivas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service
This is a problem with the request. In your schema target namespace is http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/";> and TimeCode element is like this So that the Time element should be in the http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ namespace. But your request is http://www.example.org/AsRun ">11:10:09:00 So the Time elemnet is in http://www.example.org/AsRun. this is the problem which creates the problem with the ADB service. Any way how this namespace name have come here? I can not see this in the wsdl. But I feel this is a valid jira since xmlbeans client does not generates the request correctly. please log a jira. Does this work properly with the adb client? Amila. On 4/18/07, Ajith Ranabahu <[EMAIL PROTECTED]> wrote: Hi, The failure you are seeing is probably not due to the client but thrown from the server and reported by the client as an exception. The general cause of this error message is the presence of an incompatible element in the XML. However in your case the XMLBeans service works which means there is no probs with the client and hence this could well be a bug in ADB (may restriction handling which was a recent addition) In any case see whether you can use tcpmon to capture a few message. Ajith On 4/17/07, Sampige, Srinivas <[EMAIL PROTECTED]> wrote: > I have implemented 2 versions of the same webservice; one using ADB and > the other using XMLBeans binding. Both services have the same exact > WSDL. I generated a client using xmlbeans binding which works fine > against the service using xmlbeans. But, the same client when pointed > against the service using ADB binding the, client fails with " > Unexpected subelement" > > --- > org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected > subelement Time > at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper > ation.java:271) > at > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO > peration.java:202) > at > com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S > cheduleServiceStub.java:152) > at > com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po > stSchedule(ScheduleReceiveServiceClientHelper.java:112) > at > com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche > duleServiceClientSample.java:157) > -- > > From my understanding, given a WSDL, when we generate a client it should > work regardless of how the service is implemented correct?(transparent > to the client hence the very purpose of the WSDL right?). > > I am running Axis2-1.1.1 on Tomcat 5.5.23 > > I have attached 2 files= >1) the wsdl itself (scheduleService.wsdl) >2) the request/response output from tcpmon in the 2 cases > (adbxmlbeans.txt) > > I followed steps outlined in > http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub > element-value-t3489089.html but I cannot get to the stage where I can > see the response in the scenario when it fails. > > > Thanks in advance > Srinivas > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service
Hi, The failure you are seeing is probably not due to the client but thrown from the server and reported by the client as an exception. The general cause of this error message is the presence of an incompatible element in the XML. However in your case the XMLBeans service works which means there is no probs with the client and hence this could well be a bug in ADB (may restriction handling which was a recent addition) In any case see whether you can use tcpmon to capture a few message. Ajith On 4/17/07, Sampige, Srinivas <[EMAIL PROTECTED]> wrote: I have implemented 2 versions of the same webservice; one using ADB and the other using XMLBeans binding. Both services have the same exact WSDL. I generated a client using xmlbeans binding which works fine against the service using xmlbeans. But, the same client when pointed against the service using ADB binding the, client fails with " Unexpected subelement" --- org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected subelement Time at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:271) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO peration.java:202) at com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S cheduleServiceStub.java:152) at com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po stSchedule(ScheduleReceiveServiceClientHelper.java:112) at com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche duleServiceClientSample.java:157) -- From my understanding, given a WSDL, when we generate a client it should work regardless of how the service is implemented correct?(transparent to the client hence the very purpose of the WSDL right?). I am running Axis2-1.1.1 on Tomcat 5.5.23 I have attached 2 files= 1) the wsdl itself (scheduleService.wsdl) 2) the request/response output from tcpmon in the 2 cases (adbxmlbeans.txt) I followed steps outlined in http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub element-value-t3489089.html but I cannot get to the stage where I can see the response in the scenario when it fails. Thanks in advance Srinivas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]