xsd is assigned with -xsdconfig option of wsdl2java (in combination with -d xmlbeans style)
wsdl2java | grep xsd -xsdconfig <file path> Use XMLBeans .xsdconfig file. Valid only with -d xmlbeans. but if you are using -nsp ns1=Wsdl_package the package is identified for each namespace in wsdl schema wsdl2java | grep wsdl -ns2p ns1=pkg1,ns2=pkg2 Specify a custom package name for each namespace specified in the wsdls schema. does this not conform the the behaviour you are seeing? Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 25 Feb 2011 00:57:34 +0530 Subject: Axis2 - Issue with RPCServiceClient - default namespace From: [email protected] To: [email protected] Hi , I am using axis2-1.5.4 for web service development in my project and i have encoutered below 2 issues, request you to address these. 1. I have generated both service side and client-code using eclipse axis2 plugins , the static client stub works absolutely fine. Since my project has more than 25 webservices to maintain , i tried to come up with a dynamic client using 'RPCServiceClient' but unfortunately the client is erroring out with the following error : (attached the entire statck trace in stacktrace.txt) org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement PlacementRequest at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371) i found that this is due to namespace mismatch problem related to the 'PlacementRequest' element , wsdl namespace : http://www.scte.org/wsdl/130-3/2010/ads xsd types : xmlns:adm="http://www.scte.org/schemas/130-3/2008a/adm" its considering the wsdl's namespace for 'PlacementRequest' which is leading to the exception, below is the snippet of the code responsible for the exception: if(reader.isStartElement() && new javax.xml.namespace.QName("http://www.scte.org/schemas/130-3/2008a/adm","PlacementRequest").equals(reader.getName())){ object.setPlacementRequest(org.scte.www.schemas._130_3._2008a.adm.PlacementRequestType.Factory.parse(reader)); } // End of if for expected property start element else{ // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName()); } 2. Another problem i noted is server & client code generated from wsdl is giving some errors related to if-else blocks, would be great if you can also look at this. I have enclosed all the files(wsdl,static client stub,dynamic client code,sample input xml). Thanking you for your wonderful support and time. M.Prasad Rao --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
