From: bri Date: Wed, 14 Nov 2012 13:39:12 +0000 (+0000) Subject: Siman-Stub eclipse project is added X-Git-Tag: Root_Delivery1_2012_12_06~71 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=974d42a8bae7c24533f16cc46119f7dc40f93a3f;p=tools%2Fsiman.git Siman-Stub eclipse project is added --- diff --git a/Workspace/Siman-Stub/.classpath b/Workspace/Siman-Stub/.classpath new file mode 100644 index 0000000..db2142c --- /dev/null +++ b/Workspace/Siman-Stub/.classpath @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Workspace/Siman-Stub/.externalToolBuilders/Ant_Siman-Stub_Builder.launch b/Workspace/Siman-Stub/.externalToolBuilders/Ant_Siman-Stub_Builder.launch new file mode 100644 index 0000000..59c7dc2 --- /dev/null +++ b/Workspace/Siman-Stub/.externalToolBuilders/Ant_Siman-Stub_Builder.launch @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Workspace/Siman-Stub/.pmd b/Workspace/Siman-Stub/.pmd new file mode 100644 index 0000000..0a9e99c --- /dev/null +++ b/Workspace/Siman-Stub/.pmd @@ -0,0 +1,957 @@ + + + false + .ruleset + + + AvoidDecimalLiteralsInBigDecimalConstructor + Basic Rules + + + AvoidMultipleUnaryOperators + Basic Rules + + + AvoidThreadGroup + Basic Rules + + + AvoidUsingHardCodedIP + Basic Rules + + + AvoidUsingOctalValues + Basic Rules + + + BigIntegerInstantiation + Basic Rules + + + BooleanInstantiation + Basic Rules + + + BrokenNullCheck + Basic Rules + + + CheckResultSet + Basic Rules + + + ClassCastExceptionWithToArray + Basic Rules + + + CollapsibleIfStatements + Basic Rules + + + DoubleCheckedLocking + Basic Rules + + + EmptyCatchBlock + Basic Rules + + + EmptyFinallyBlock + Basic Rules + + + EmptyIfStmt + Basic Rules + + + EmptyInitializer + Basic Rules + + + EmptyStatementNotInLoop + Basic Rules + + + EmptyStaticInitializer + Basic Rules + + + EmptySwitchStatements + Basic Rules + + + EmptySynchronizedBlock + Basic Rules + + + EmptyTryBlock + Basic Rules + + + EmptyWhileStmt + Basic Rules + + + ForLoopShouldBeWhileLoop + Basic Rules + + + JumbledIncrementer + Basic Rules + + + MisplacedNullCheck + Basic Rules + + + OverrideBothEqualsAndHashcode + Basic Rules + + + ReturnFromFinallyBlock + Basic Rules + + + UnconditionalIfStatement + Basic Rules + + + UnnecessaryConversionTemporary + Basic Rules + + + UnnecessaryFinalModifier + Basic Rules + + + UnnecessaryReturn + Basic Rules + + + UnusedNullCheckInEquals + Basic Rules + + + UselessOperationOnImmutable + Basic Rules + + + UselessOverridingMethod + Basic Rules + + + ForLoopsMustUseBraces + Braces Rules + + + IfElseStmtsMustUseBraces + Braces Rules + + + IfStmtsMustUseBraces + Braces Rules + + + WhileLoopsMustUseBraces + Braces Rules + + + CloneMethodMustImplementCloneable + Clone Implementation Rules + + + CloneThrowsCloneNotSupportedException + Clone Implementation Rules + + + ProperCloneImplementation + Clone Implementation Rules + + + CyclomaticComplexity + Code Size Rules + + + ExcessiveClassLength + Code Size Rules + + + ExcessiveMethodLength + Code Size Rules + + + ExcessiveParameterList + Code Size Rules + + + ExcessivePublicCount + Code Size Rules + + + NcssConstructorCount + Code Size Rules + + + NcssMethodCount + Code Size Rules + + + NcssTypeCount + Code Size Rules + + + NPathComplexity + Code Size Rules + + + TooManyFields + Code Size Rules + + + TooManyMethods + Code Size Rules + + + AssignmentInOperand + Controversial Rules + + + AtLeastOneConstructor + Controversial Rules + + + AvoidAccessibilityAlteration + Controversial Rules + + + AvoidFinalLocalVariable + Controversial Rules + + + AvoidUsingNativeCode + Controversial Rules + + + AvoidUsingShortType + Controversial Rules + + + AvoidUsingVolatile + Controversial Rules + + + BooleanInversion + Controversial Rules + + + CallSuperInConstructor + Controversial Rules + + + DataflowAnomalyAnalysis + Controversial Rules + + + DefaultPackage + Controversial Rules + + + DoNotCallGarbageCollectionExplicitly + Controversial Rules + + + DontImportSun + Controversial Rules + + + NullAssignment + Controversial Rules + + + OnlyOneReturn + Controversial Rules + + + SuspiciousOctalEscape + Controversial Rules + + + UnnecessaryConstructor + Controversial Rules + + + UnnecessaryParentheses + Controversial Rules + + + UnusedModifier + Controversial Rules + + + CouplingBetweenObjects + Coupling Rules + + + ExcessiveImports + Coupling Rules + + + LooseCoupling + Coupling Rules + + + AbstractClassWithoutAbstractMethod + Design Rules + + + AbstractClassWithoutAnyMethod + Design Rules + + + AccessorClassGeneration + Design Rules + + + AssignmentToNonFinalStatic + Design Rules + + + AvoidConstantsInterface + Design Rules + + + AvoidDeeplyNestedIfStmts + Design Rules + + + AvoidInstanceofChecksInCatchClause + Design Rules + + + AvoidProtectedFieldInFinalClass + Design Rules + + + AvoidReassigningParameters + Design Rules + + + AvoidSynchronizedAtMethodLevel + Design Rules + + + BadComparison + Design Rules + + + ClassWithOnlyPrivateConstructorsShouldBeFinal + Design Rules + + + CloseResource + Design Rules + + + CompareObjectsWithEquals + Design Rules + + + ConfusingTernary + Design Rules + + + ConstructorCallsOverridableMethod + Design Rules + + + DefaultLabelNotLastInSwitchStmt + Design Rules + + + EmptyMethodInAbstractClassShouldBeAbstract + Design Rules + + + EqualsNull + Design Rules + + + FinalFieldCouldBeStatic + Design Rules + + + IdempotentOperations + Design Rules + + + ImmutableField + Design Rules + + + InstantiationToGetClass + Design Rules + + + MissingBreakInSwitch + Design Rules + + + MissingStaticMethodInNonInstantiatableClass + Design Rules + + + NonCaseLabelInSwitchStatement + Design Rules + + + NonStaticInitializer + Design Rules + + + NonThreadSafeSingleton + Design Rules + + + OptimizableToArrayCall + Design Rules + + + PositionLiteralsFirstInComparisons + Design Rules + + + PreserveStackTrace + Design Rules + + + ReturnEmptyArrayRatherThanNull + Design Rules + + + SimpleDateFormatNeedsLocale + Design Rules + + + SimplifyBooleanExpressions + Design Rules + + + SimplifyBooleanReturns + Design Rules + + + SimplifyConditional + Design Rules + + + SingularField + Design Rules + + + SwitchDensity + Design Rules + + + SwitchStmtsShouldHaveDefault + Design Rules + + + TooFewBranchesForASwitchStatement + Design Rules + + + UncommentedEmptyConstructor + Design Rules + + + UncommentedEmptyMethod + Design Rules + + + UnnecessaryLocalBeforeReturn + Design Rules + + + UnsynchronizedStaticDateFormatter + Design Rules + + + UseCollectionIsEmpty + Design Rules + + + UseLocaleWithCaseConversions + Design Rules + + + UseNotifyAllInsteadOfNotify + Design Rules + + + UseSingleton + Design Rules + + + AvoidCallingFinalize + Finalizer Rules + + + EmptyFinalizer + Finalizer Rules + + + FinalizeDoesNotCallSuperFinalize + Finalizer Rules + + + FinalizeOnlyCallsSuperFinalize + Finalizer Rules + + + FinalizeOverloaded + Finalizer Rules + + + FinalizeShouldBeProtected + Finalizer Rules + + + DontImportJavaLang + Import Statement Rules + + + DuplicateImports + Import Statement Rules + + + ImportFromSamePackage + Import Statement Rules + + + TooManyStaticImports + Import Statement Rules + + + UnusedImports + Import Statement Rules + + + DoNotCallSystemExit + J2EE Rules + + + DoNotUseThreads + J2EE Rules + + + LocalHomeNamingConvention + J2EE Rules + + + LocalInterfaceSessionNamingConvention + J2EE Rules + + + MDBAndSessionBeanNamingConvention + J2EE Rules + + + RemoteInterfaceNamingConvention + J2EE Rules + + + RemoteSessionInterfaceNamingConvention + J2EE Rules + + + StaticEJBFieldShouldBeFinal + J2EE Rules + + + UseProperClassLoader + J2EE Rules + + + ProperLogger + Jakarta Commons Logging Rules + + + UseCorrectExceptionLogging + Jakarta Commons Logging Rules + + + AvoidPrintStackTrace + Java Logging Rules + + + LoggerIsNotStaticFinal + Java Logging Rules + + + MoreThanOneLogger + Java Logging Rules + + + SystemPrintln + Java Logging Rules + + + BeanMembersShouldSerialize + JavaBean Rules + + + MissingSerialVersionUID + JavaBean Rules + + + JUnitAssertionsShouldIncludeMessage + JUnit Rules + + + JUnitSpelling + JUnit Rules + + + JUnitStaticSuite + JUnit Rules + + + JUnitTestsShouldIncludeAssert + JUnit Rules + + + SimplifyBooleanAssertion + JUnit Rules + + + TestClassWithoutTestCases + JUnit Rules + + + UnnecessaryBooleanAssertion + JUnit Rules + + + UseAssertEqualsInsteadOfAssertTrue + JUnit Rules + + + UseAssertNullInsteadOfAssertTrue + JUnit Rules + + + UseAssertSameInsteadOfAssertTrue + JUnit Rules + + + AvoidAssertAsIdentifier + Migration Rules + + + AvoidEnumAsIdentifier + Migration Rules + + + ByteInstantiation + Migration Rules + + + IntegerInstantiation + Migration Rules + + + JUnit4SuitesShouldUseSuiteAnnotation + Migration Rules + + + JUnit4TestShouldUseAfterAnnotation + Migration Rules + + + JUnit4TestShouldUseBeforeAnnotation + Migration Rules + + + JUnit4TestShouldUseTestAnnotation + Migration Rules + + + JUnitUseExpected + Migration Rules + + + LongInstantiation + Migration Rules + + + ReplaceEnumerationWithIterator + Migration Rules + + + ReplaceHashtableWithMap + Migration Rules + + + ReplaceVectorWithList + Migration Rules + + + ShortInstantiation + Migration Rules + + + AbstractNaming + Naming Rules + + + AvoidDollarSigns + Naming Rules + + + AvoidFieldNameMatchingMethodName + Naming Rules + + + AvoidFieldNameMatchingTypeName + Naming Rules + + + BooleanGetMethodName + Naming Rules + + + ClassNamingConventions + Naming Rules + + + LongVariable + Naming Rules + + + MethodNamingConventions + Naming Rules + + + MethodWithSameNameAsEnclosingClass + Naming Rules + + + MisleadingVariableName + Naming Rules + + + NoPackage + Naming Rules + + + PackageCase + Naming Rules + + + ShortMethodName + Naming Rules + + + ShortVariable + Naming Rules + + + SuspiciousConstantFieldName + Naming Rules + + + SuspiciousEqualsMethodName + Naming Rules + + + SuspiciousHashcodeMethodName + Naming Rules + + + VariableNamingConventions + Naming Rules + + + AddEmptyString + Optimization Rules + + + AvoidArrayLoops + Optimization Rules + + + AvoidInstantiatingObjectsInLoops + Optimization Rules + + + LocalVariableCouldBeFinal + Optimization Rules + + + MethodArgumentCouldBeFinal + Optimization Rules + + + SimplifyStartsWith + Optimization Rules + + + UnnecessaryWrapperObjectCreation + Optimization Rules + + + UseArrayListInsteadOfVector + Optimization Rules + + + UseArraysAsList + Optimization Rules + + + UseStringBufferForStringAppends + Optimization Rules + + + ArrayIsStoredDirectly + Security Code Guidelines + + + MethodReturnsInternalArray + Security Code Guidelines + + + AvoidCatchingNPE + Strict Exception Rules + + + AvoidCatchingThrowable + Strict Exception Rules + + + AvoidRethrowingException + Strict Exception Rules + + + AvoidThrowingNewInstanceOfSameException + Strict Exception Rules + + + AvoidThrowingNullPointerException + Strict Exception Rules + + + AvoidThrowingRawExceptionTypes + Strict Exception Rules + + + DoNotExtendJavaLangError + Strict Exception Rules + + + DoNotThrowExceptionInFinally + Strict Exception Rules + + + ExceptionAsFlowControl + Strict Exception Rules + + + SignatureDeclareThrowsException + Strict Exception Rules + + + AppendCharacterWithChar + String and StringBuffer Rules + + + AvoidDuplicateLiterals + String and StringBuffer Rules + + + AvoidStringBufferField + String and StringBuffer Rules + + + ConsecutiveLiteralAppends + String and StringBuffer Rules + + + InefficientEmptyStringCheck + String and StringBuffer Rules + + + InefficientStringBuffering + String and StringBuffer Rules + + + InsufficientStringBufferDeclaration + String and StringBuffer Rules + + + StringBufferInstantiationWithChar + String and StringBuffer Rules + + + StringInstantiation + String and StringBuffer Rules + + + StringToString + String and StringBuffer Rules + + + UnnecessaryCaseChange + String and StringBuffer Rules + + + UseEqualsToCompareStrings + String and StringBuffer Rules + + + UseIndexOfChar + String and StringBuffer Rules + + + UselessStringValueOf + String and StringBuffer Rules + + + UseStringBufferLength + String and StringBuffer Rules + + + CloneMethodMustImplementCloneable + Type Resolution Rules + + + LooseCoupling + Type Resolution Rules + + + SignatureDeclareThrowsException + Type Resolution Rules + + + UnusedImports + Type Resolution Rules + + + UnusedFormalParameter + Unused Code Rules + + + UnusedLocalVariable + Unused Code Rules + + + UnusedPrivateField + Unused Code Rules + + + UnusedPrivateMethod + Unused Code Rules + + + false + true + diff --git a/Workspace/Siman-Stub/.project b/Workspace/Siman-Stub/.project new file mode 100644 index 0000000..825fa9a --- /dev/null +++ b/Workspace/Siman-Stub/.project @@ -0,0 +1,40 @@ + + + Siman-Stub + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.ui.externaltools.ExternalToolBuilder + clean,full,incremental, + + + LaunchConfigHandle + <project>/.externalToolBuilders/Ant_Siman-Stub_Builder.launch + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + net.sourceforge.pmd.eclipse.plugin.pmdBuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.jdt.core.javanature + net.sf.eclipsecs.core.CheckstyleNature + net.sourceforge.pmd.eclipse.plugin.pmdNature + + diff --git a/Workspace/Siman-Stub/build.properties b/Workspace/Siman-Stub/build.properties new file mode 100644 index 0000000..4fb78ab --- /dev/null +++ b/Workspace/Siman-Stub/build.properties @@ -0,0 +1,8 @@ +siman-stub.src.dir=src +siman-stub.lib.dir=lib +siman-stub.bin.dir=bin +siman-stub.dist.dir=dist +siman-stub.jarname=siman-stub.jar +siman-stub.project.name=Siman-Stub +siman-stub.ws=siman-ws +axis2.home.dir=D:/DevTools/axis2-1.6.2/axis2-1.6.2 diff --git a/Workspace/Siman-Stub/build.xml b/Workspace/Siman-Stub/build.xml new file mode 100644 index 0000000..fb01c79 --- /dev/null +++ b/Workspace/Siman-Stub/build.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Workspace/Siman-Stub/service_wsdl/service/salome/SimanSalomeService.wsdl b/Workspace/Siman-Stub/service_wsdl/service/salome/SimanSalomeService.wsdl new file mode 100644 index 0000000..3b9f14b --- /dev/null +++ b/Workspace/Siman-Stub/service_wsdl/service/salome/SimanSalomeService.wsdl @@ -0,0 +1,106 @@ + + + SimanSalomeService + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Workspace/Siman-Stub/service_wsdl/test/HelloSimanWS.wsdl b/Workspace/Siman-Stub/service_wsdl/test/HelloSimanWS.wsdl new file mode 100644 index 0000000..a58c708 --- /dev/null +++ b/Workspace/Siman-Stub/service_wsdl/test/HelloSimanWS.wsdl @@ -0,0 +1,83 @@ + + + + Please Type your service description here + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceCallbackHandler.java b/Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceCallbackHandler.java new file mode 100644 index 0000000..4cab724 --- /dev/null +++ b/Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceCallbackHandler.java @@ -0,0 +1,66 @@ + +/** + * SimanSalomeServiceCallbackHandler.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: 1.6.2 Built on : Apr 17, 2012 (05:33:49 IST) + */ + + package org.splat.ws_client.service.salome; + + /** + * SimanSalomeServiceCallbackHandler Callback class, Users can extend this class and implement + * their own receiveResult and receiveError methods. + */ + public abstract class SimanSalomeServiceCallbackHandler{ + + + + protected Object clientData; + + /** + * User can pass in any object that needs to be accessed once the NonBlocking + * Web service call is finished and appropriate method of this CallBack is called. + * @param clientData Object mechanism by which the user can pass in user data + * that will be avilable at the time this callback is called. + */ + public SimanSalomeServiceCallbackHandler(Object clientData){ + this.clientData = clientData; + } + + /** + * Please use this constructor if you don't want to set any clientData + */ + public SimanSalomeServiceCallbackHandler(){ + this.clientData = null; + } + + /** + * Get the client data + */ + + public Object getClientData() { + return clientData; + } + + + /** + * auto generated Axis2 call back method for createConfigFile method + * override this method for handling normal response from createConfigFile operation + */ + public void receiveResultcreateConfigFile( + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse result + ) { + } + + /** + * auto generated Axis2 Error handler + * override this method for handling error response from createConfigFile operation + */ + public void receiveErrorcreateConfigFile(java.lang.Exception e) { + } + + + + } + \ No newline at end of file diff --git a/Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceStub.java b/Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceStub.java new file mode 100644 index 0000000..63f8a8f --- /dev/null +++ b/Workspace/Siman-Stub/src/org/splat/ws_client/service/salome/SimanSalomeServiceStub.java @@ -0,0 +1,3399 @@ + +/** + * SimanSalomeServiceStub.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: 1.6.2 Built on : Apr 17, 2012 (05:33:49 IST) + */ + package org.splat.ws_client.service.salome; + + + + /* + * SimanSalomeServiceStub java implementation + */ + + + public class SimanSalomeServiceStub extends org.apache.axis2.client.Stub + { + protected org.apache.axis2.description.AxisOperation[] _operations; + + //hashmaps to keep the fault mapping + private java.util.HashMap faultExceptionNameMap = new java.util.HashMap(); + private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap(); + private java.util.HashMap faultMessageMap = new java.util.HashMap(); + + private static int counter = 0; + + private static synchronized java.lang.String getUniqueSuffix(){ + // reset the counter if it is greater than 99999 + if (counter > 99999){ + counter = 0; + } + counter = counter + 1; + return java.lang.Long.toString(java.lang.System.currentTimeMillis()) + "_" + counter; + } + + + private void populateAxisService() throws org.apache.axis2.AxisFault { + + //creating the Service with a unique name + _service = new org.apache.axis2.description.AxisService("SimanSalomeService" + getUniqueSuffix()); + addAnonymousOperations(); + + //creating the operations + org.apache.axis2.description.AxisOperation __operation; + + _operations = new org.apache.axis2.description.AxisOperation[1]; + + __operation = new org.apache.axis2.description.OutInAxisOperation(); + + + __operation.setName(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", "createConfigFile")); + _service.addOperation(__operation); + + + + + _operations[0]=__operation; + + + } + + //populates the faults + private void populateFaults(){ + + + + } + + /** + *Constructor that takes in a configContext + */ + + public SimanSalomeServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext, + java.lang.String targetEndpoint) + throws org.apache.axis2.AxisFault { + this(configurationContext,targetEndpoint,false); + } + + + /** + * Constructor that takes in a configContext and useseperate listner + */ + public SimanSalomeServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext, + java.lang.String targetEndpoint, boolean useSeparateListener) + throws org.apache.axis2.AxisFault { + //To populate AxisService + populateAxisService(); + populateFaults(); + + _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service); + + + _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference( + targetEndpoint)); + _serviceClient.getOptions().setUseSeparateListener(useSeparateListener); + + //Set the soap version + _serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); + + + } + + /** + * Default Constructor + */ + public SimanSalomeServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault { + + this(configurationContext,"http://localhost:8080/Siman-WS/services/SimanSalomeService.SimanSalomeServiceHttpSoap12Endpoint/" ); + + } + + /** + * Default Constructor + */ + public SimanSalomeServiceStub() throws org.apache.axis2.AxisFault { + + this("http://localhost:8080/Siman-WS/services/SimanSalomeService.SimanSalomeServiceHttpSoap12Endpoint/" ); + + } + + /** + * Constructor taking the target endpoint + */ + public SimanSalomeServiceStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault { + this(null,targetEndpoint); + } + + + + + /** + * Auto generated method signature + * + * @see org.splat.ws_client.service.salome.SimanSalomeService#createConfigFile + * @param createConfigFile0 + + */ + + + + public org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse createConfigFile( + + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile0) + + + throws java.rmi.RemoteException + + { + org.apache.axis2.context.MessageContext _messageContext = null; + try{ + org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); + _operationClient.getOptions().setAction("urn:createConfigFile"); + _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true); + + + + addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&"); + + + // create a message context + _messageContext = new org.apache.axis2.context.MessageContext(); + + + + // create SOAP envelope with that payload + org.apache.axiom.soap.SOAPEnvelope env = null; + + + env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), + createConfigFile0, + optimizeContent(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "createConfigFile")), new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "createConfigFile")); + + //adding SOAP soap_headers + _serviceClient.addHeadersToEnvelope(env); + // set the message context with that soap envelope + _messageContext.setEnvelope(env); + + // add the message contxt to the operation client + _operationClient.addMessageContext(_messageContext); + + //execute the operation client + _operationClient.execute(true); + + + org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext( + org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE); + org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope(); + + + java.lang.Object object = fromOM( + _returnEnv.getBody().getFirstElement() , + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse.class, + getEnvelopeNamespaces(_returnEnv)); + + + return (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse)object; + + }catch(org.apache.axis2.AxisFault f){ + + org.apache.axiom.om.OMElement faultElt = f.getDetail(); + if (faultElt!=null){ + if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"createConfigFile"))){ + //make the fault by reflection + try{ + java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"createConfigFile")); + java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName); + java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class); + java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage()); + //message class + java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"createConfigFile")); + java.lang.Class messageClass = java.lang.Class.forName(messageClassName); + java.lang.Object messageObject = fromOM(faultElt,messageClass,null); + java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage", + new java.lang.Class[]{messageClass}); + m.invoke(ex,new java.lang.Object[]{messageObject}); + + + throw new java.rmi.RemoteException(ex.getMessage(), ex); + }catch(java.lang.ClassCastException e){ + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.ClassNotFoundException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + }catch (java.lang.NoSuchMethodException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.reflect.InvocationTargetException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.IllegalAccessException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.InstantiationException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } + }else{ + throw f; + } + }else{ + throw f; + } + } finally { + if (_messageContext.getTransportOut() != null) { + _messageContext.getTransportOut().getSender().cleanup(_messageContext); + } + } + } + + /** + * Auto generated method signature for Asynchronous Invocations + * + * @see org.splat.ws_client.service.salome.SimanSalomeService#startcreateConfigFile + * @param createConfigFile0 + + */ + public void startcreateConfigFile( + + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile0, + + final org.splat.ws_client.service.salome.SimanSalomeServiceCallbackHandler callback) + + throws java.rmi.RemoteException{ + + org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); + _operationClient.getOptions().setAction("urn:createConfigFile"); + _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true); + + + + addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&"); + + + + // create SOAP envelope with that payload + org.apache.axiom.soap.SOAPEnvelope env=null; + final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext(); + + + //Style is Doc. + + + env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), + createConfigFile0, + optimizeContent(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "createConfigFile")), new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "createConfigFile")); + + // adding SOAP soap_headers + _serviceClient.addHeadersToEnvelope(env); + // create message context with that soap envelope + _messageContext.setEnvelope(env); + + // add the message context to the operation client + _operationClient.addMessageContext(_messageContext); + + + + _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() { + public void onMessage(org.apache.axis2.context.MessageContext resultContext) { + try { + org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope(); + + java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(), + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse.class, + getEnvelopeNamespaces(resultEnv)); + callback.receiveResultcreateConfigFile( + (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse)object); + + } catch (org.apache.axis2.AxisFault e) { + callback.receiveErrorcreateConfigFile(e); + } + } + + public void onError(java.lang.Exception error) { + if (error instanceof org.apache.axis2.AxisFault) { + org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error; + org.apache.axiom.om.OMElement faultElt = f.getDetail(); + if (faultElt!=null){ + if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"createConfigFile"))){ + //make the fault by reflection + try{ + java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"createConfigFile")); + java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName); + java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class); + java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage()); + //message class + java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"createConfigFile")); + java.lang.Class messageClass = java.lang.Class.forName(messageClassName); + java.lang.Object messageObject = fromOM(faultElt,messageClass,null); + java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage", + new java.lang.Class[]{messageClass}); + m.invoke(ex,new java.lang.Object[]{messageObject}); + + + callback.receiveErrorcreateConfigFile(new java.rmi.RemoteException(ex.getMessage(), ex)); + } catch(java.lang.ClassCastException e){ + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorcreateConfigFile(f); + } catch (java.lang.ClassNotFoundException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorcreateConfigFile(f); + } catch (java.lang.NoSuchMethodException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorcreateConfigFile(f); + } catch (java.lang.reflect.InvocationTargetException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorcreateConfigFile(f); + } catch (java.lang.IllegalAccessException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorcreateConfigFile(f); + } catch (java.lang.InstantiationException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorcreateConfigFile(f); + } catch (org.apache.axis2.AxisFault e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorcreateConfigFile(f); + } + } else { + callback.receiveErrorcreateConfigFile(f); + } + } else { + callback.receiveErrorcreateConfigFile(f); + } + } else { + callback.receiveErrorcreateConfigFile(error); + } + } + + public void onFault(org.apache.axis2.context.MessageContext faultContext) { + org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext); + onError(fault); + } + + public void onComplete() { + try { + _messageContext.getTransportOut().getSender().cleanup(_messageContext); + } catch (org.apache.axis2.AxisFault axisFault) { + callback.receiveErrorcreateConfigFile(axisFault); + } + } + }); + + + org.apache.axis2.util.CallbackReceiver _callbackReceiver = null; + if ( _operations[0].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) { + _callbackReceiver = new org.apache.axis2.util.CallbackReceiver(); + _operations[0].setMessageReceiver( + _callbackReceiver); + } + + //execute the operation client + _operationClient.execute(false); + + } + + + + /** + * A utility method that copies the namepaces from the SOAPEnvelope + */ + private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){ + java.util.Map returnMap = new java.util.HashMap(); + java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces(); + while (namespaceIterator.hasNext()) { + org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next(); + returnMap.put(ns.getPrefix(),ns.getNamespaceURI()); + } + return returnMap; + } + + + + private javax.xml.namespace.QName[] opNameArray = null; + private boolean optimizeContent(javax.xml.namespace.QName opName) { + + + if (opNameArray == null) { + return false; + } + for (int i = 0; i < opNameArray.length; i++) { + if (opName.equals(opNameArray[i])) { + return true; + } + } + return false; + } + //http://localhost:8080/Siman-WS/services/SimanSalomeService.SimanSalomeServiceHttpSoap12Endpoint/ + public static class File + implements org.apache.axis2.databinding.ADBBean{ + /* This type was generated from the piece of schema that had + name = File + Namespace URI = http://io.java/xsd + Namespace Prefix = ns1 + */ + + + /** + * field for Absolute + */ + + + protected boolean localAbsolute ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localAbsoluteTracker = false ; + + public boolean isAbsoluteSpecified(){ + return localAbsoluteTracker; + } + + + + /** + * Auto generated getter method + * @return boolean + */ + public boolean getAbsolute(){ + return localAbsolute; + } + + + + /** + * Auto generated setter method + * @param param Absolute + */ + public void setAbsolute(boolean param){ + + // setting primitive attribute tracker to true + localAbsoluteTracker = + true; + + this.localAbsolute=param; + + + } + + + /** + * field for AbsoluteFile + */ + + + protected File localAbsoluteFile ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localAbsoluteFileTracker = false ; + + public boolean isAbsoluteFileSpecified(){ + return localAbsoluteFileTracker; + } + + + + /** + * Auto generated getter method + * @return File + */ + public File getAbsoluteFile(){ + return localAbsoluteFile; + } + + + + /** + * Auto generated setter method + * @param param AbsoluteFile + */ + public void setAbsoluteFile(File param){ + localAbsoluteFileTracker = true; + + this.localAbsoluteFile=param; + + + } + + + /** + * field for AbsolutePath + */ + + + protected java.lang.String localAbsolutePath ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localAbsolutePathTracker = false ; + + public boolean isAbsolutePathSpecified(){ + return localAbsolutePathTracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String getAbsolutePath(){ + return localAbsolutePath; + } + + + + /** + * Auto generated setter method + * @param param AbsolutePath + */ + public void setAbsolutePath(java.lang.String param){ + localAbsolutePathTracker = true; + + this.localAbsolutePath=param; + + + } + + + /** + * field for CanonicalFile + */ + + + protected File localCanonicalFile ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localCanonicalFileTracker = false ; + + public boolean isCanonicalFileSpecified(){ + return localCanonicalFileTracker; + } + + + + /** + * Auto generated getter method + * @return File + */ + public File getCanonicalFile(){ + return localCanonicalFile; + } + + + + /** + * Auto generated setter method + * @param param CanonicalFile + */ + public void setCanonicalFile(File param){ + localCanonicalFileTracker = true; + + this.localCanonicalFile=param; + + + } + + + /** + * field for CanonicalPath + */ + + + protected java.lang.String localCanonicalPath ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localCanonicalPathTracker = false ; + + public boolean isCanonicalPathSpecified(){ + return localCanonicalPathTracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String getCanonicalPath(){ + return localCanonicalPath; + } + + + + /** + * Auto generated setter method + * @param param CanonicalPath + */ + public void setCanonicalPath(java.lang.String param){ + localCanonicalPathTracker = true; + + this.localCanonicalPath=param; + + + } + + + /** + * field for Directory + */ + + + protected boolean localDirectory ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localDirectoryTracker = false ; + + public boolean isDirectorySpecified(){ + return localDirectoryTracker; + } + + + + /** + * Auto generated getter method + * @return boolean + */ + public boolean getDirectory(){ + return localDirectory; + } + + + + /** + * Auto generated setter method + * @param param Directory + */ + public void setDirectory(boolean param){ + + // setting primitive attribute tracker to true + localDirectoryTracker = + true; + + this.localDirectory=param; + + + } + + + /** + * field for File + */ + + + protected boolean localFile ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localFileTracker = false ; + + public boolean isFileSpecified(){ + return localFileTracker; + } + + + + /** + * Auto generated getter method + * @return boolean + */ + public boolean getFile(){ + return localFile; + } + + + + /** + * Auto generated setter method + * @param param File + */ + public void setFile(boolean param){ + + // setting primitive attribute tracker to true + localFileTracker = + true; + + this.localFile=param; + + + } + + + /** + * field for FreeSpace + */ + + + protected long localFreeSpace ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localFreeSpaceTracker = false ; + + public boolean isFreeSpaceSpecified(){ + return localFreeSpaceTracker; + } + + + + /** + * Auto generated getter method + * @return long + */ + public long getFreeSpace(){ + return localFreeSpace; + } + + + + /** + * Auto generated setter method + * @param param FreeSpace + */ + public void setFreeSpace(long param){ + + // setting primitive attribute tracker to true + localFreeSpaceTracker = + param != java.lang.Long.MIN_VALUE; + + this.localFreeSpace=param; + + + } + + + /** + * field for Hidden + */ + + + protected boolean localHidden ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localHiddenTracker = false ; + + public boolean isHiddenSpecified(){ + return localHiddenTracker; + } + + + + /** + * Auto generated getter method + * @return boolean + */ + public boolean getHidden(){ + return localHidden; + } + + + + /** + * Auto generated setter method + * @param param Hidden + */ + public void setHidden(boolean param){ + + // setting primitive attribute tracker to true + localHiddenTracker = + true; + + this.localHidden=param; + + + } + + + /** + * field for Name + */ + + + protected java.lang.String localName ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localNameTracker = false ; + + public boolean isNameSpecified(){ + return localNameTracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String getName(){ + return localName; + } + + + + /** + * Auto generated setter method + * @param param Name + */ + public void setName(java.lang.String param){ + localNameTracker = true; + + this.localName=param; + + + } + + + /** + * field for Parent + */ + + + protected java.lang.String localParent ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localParentTracker = false ; + + public boolean isParentSpecified(){ + return localParentTracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String getParent(){ + return localParent; + } + + + + /** + * Auto generated setter method + * @param param Parent + */ + public void setParent(java.lang.String param){ + localParentTracker = true; + + this.localParent=param; + + + } + + + /** + * field for ParentFile + */ + + + protected File localParentFile ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localParentFileTracker = false ; + + public boolean isParentFileSpecified(){ + return localParentFileTracker; + } + + + + /** + * Auto generated getter method + * @return File + */ + public File getParentFile(){ + return localParentFile; + } + + + + /** + * Auto generated setter method + * @param param ParentFile + */ + public void setParentFile(File param){ + localParentFileTracker = true; + + this.localParentFile=param; + + + } + + + /** + * field for Path + */ + + + protected java.lang.String localPath ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localPathTracker = false ; + + public boolean isPathSpecified(){ + return localPathTracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String getPath(){ + return localPath; + } + + + + /** + * Auto generated setter method + * @param param Path + */ + public void setPath(java.lang.String param){ + localPathTracker = true; + + this.localPath=param; + + + } + + + /** + * field for TotalSpace + */ + + + protected long localTotalSpace ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localTotalSpaceTracker = false ; + + public boolean isTotalSpaceSpecified(){ + return localTotalSpaceTracker; + } + + + + /** + * Auto generated getter method + * @return long + */ + public long getTotalSpace(){ + return localTotalSpace; + } + + + + /** + * Auto generated setter method + * @param param TotalSpace + */ + public void setTotalSpace(long param){ + + // setting primitive attribute tracker to true + localTotalSpaceTracker = + param != java.lang.Long.MIN_VALUE; + + this.localTotalSpace=param; + + + } + + + /** + * field for UsableSpace + */ + + + protected long localUsableSpace ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localUsableSpaceTracker = false ; + + public boolean isUsableSpaceSpecified(){ + return localUsableSpaceTracker; + } + + + + /** + * Auto generated getter method + * @return long + */ + public long getUsableSpace(){ + return localUsableSpace; + } + + + + /** + * Auto generated setter method + * @param param UsableSpace + */ + public void setUsableSpace(long param){ + + // setting primitive attribute tracker to true + localUsableSpaceTracker = + param != java.lang.Long.MIN_VALUE; + + this.localUsableSpace=param; + + + } + + + + + /** + * + * @param parentQName + * @param factory + * @return org.apache.axiom.om.OMElement + */ + public org.apache.axiom.om.OMElement getOMElement ( + final javax.xml.namespace.QName parentQName, + final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{ + + + + org.apache.axiom.om.OMDataSource dataSource = + new org.apache.axis2.databinding.ADBDataSource(this,parentQName); + return factory.createOMElement(dataSource,parentQName); + + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + serialize(parentQName,xmlWriter,false); + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter, + boolean serializeType) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + + + + + java.lang.String prefix = null; + java.lang.String namespace = null; + + + prefix = parentQName.getPrefix(); + namespace = parentQName.getNamespaceURI(); + writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); + + if (serializeType){ + + + java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://io.java/xsd"); + if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + namespacePrefix+":File", + xmlWriter); + } else { + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + "File", + xmlWriter); + } + + + } + if (localAbsoluteTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "absolute", xmlWriter); + + if (false) { + + throw new org.apache.axis2.databinding.ADBException("absolute cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAbsolute)); + } + + xmlWriter.writeEndElement(); + } if (localAbsoluteFileTracker){ + if (localAbsoluteFile==null){ + + writeStartElement(null, "http://io.java/xsd", "absoluteFile", xmlWriter); + + // write the nil attribute + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + xmlWriter.writeEndElement(); + }else{ + localAbsoluteFile.serialize(new javax.xml.namespace.QName("http://io.java/xsd","absoluteFile"), + xmlWriter); + } + } if (localAbsolutePathTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "absolutePath", xmlWriter); + + + if (localAbsolutePath==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(localAbsolutePath); + + } + + xmlWriter.writeEndElement(); + } if (localCanonicalFileTracker){ + if (localCanonicalFile==null){ + + writeStartElement(null, "http://io.java/xsd", "canonicalFile", xmlWriter); + + // write the nil attribute + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + xmlWriter.writeEndElement(); + }else{ + localCanonicalFile.serialize(new javax.xml.namespace.QName("http://io.java/xsd","canonicalFile"), + xmlWriter); + } + } if (localCanonicalPathTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "canonicalPath", xmlWriter); + + + if (localCanonicalPath==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(localCanonicalPath); + + } + + xmlWriter.writeEndElement(); + } if (localDirectoryTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "directory", xmlWriter); + + if (false) { + + throw new org.apache.axis2.databinding.ADBException("directory cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDirectory)); + } + + xmlWriter.writeEndElement(); + } if (localFileTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "file", xmlWriter); + + if (false) { + + throw new org.apache.axis2.databinding.ADBException("file cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFile)); + } + + xmlWriter.writeEndElement(); + } if (localFreeSpaceTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "freeSpace", xmlWriter); + + if (localFreeSpace==java.lang.Long.MIN_VALUE) { + + throw new org.apache.axis2.databinding.ADBException("freeSpace cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFreeSpace)); + } + + xmlWriter.writeEndElement(); + } if (localHiddenTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "hidden", xmlWriter); + + if (false) { + + throw new org.apache.axis2.databinding.ADBException("hidden cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHidden)); + } + + xmlWriter.writeEndElement(); + } if (localNameTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "name", xmlWriter); + + + if (localName==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(localName); + + } + + xmlWriter.writeEndElement(); + } if (localParentTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "parent", xmlWriter); + + + if (localParent==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(localParent); + + } + + xmlWriter.writeEndElement(); + } if (localParentFileTracker){ + if (localParentFile==null){ + + writeStartElement(null, "http://io.java/xsd", "parentFile", xmlWriter); + + // write the nil attribute + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + xmlWriter.writeEndElement(); + }else{ + localParentFile.serialize(new javax.xml.namespace.QName("http://io.java/xsd","parentFile"), + xmlWriter); + } + } if (localPathTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "path", xmlWriter); + + + if (localPath==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(localPath); + + } + + xmlWriter.writeEndElement(); + } if (localTotalSpaceTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "totalSpace", xmlWriter); + + if (localTotalSpace==java.lang.Long.MIN_VALUE) { + + throw new org.apache.axis2.databinding.ADBException("totalSpace cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localTotalSpace)); + } + + xmlWriter.writeEndElement(); + } if (localUsableSpaceTracker){ + namespace = "http://io.java/xsd"; + writeStartElement(null, namespace, "usableSpace", xmlWriter); + + if (localUsableSpace==java.lang.Long.MIN_VALUE) { + + throw new org.apache.axis2.databinding.ADBException("usableSpace cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUsableSpace)); + } + + xmlWriter.writeEndElement(); + } + xmlWriter.writeEndElement(); + + + } + + private static java.lang.String generatePrefix(java.lang.String namespace) { + if(namespace.equals("http://io.java/xsd")){ + return "ns1"; + } + return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + + /** + * Utility method to write an element start tag. + */ + private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); + if (writerPrefix != null) { + xmlWriter.writeStartElement(namespace, localPart); + } else { + if (namespace.length() == 0) { + prefix = ""; + } else if (prefix == null) { + prefix = generatePrefix(namespace); + } + + xmlWriter.writeStartElement(prefix, localPart, namespace); + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + } + + /** + * Util method to write an attribute with the ns prefix + */ + private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (xmlWriter.getPrefix(namespace) == null) { + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + xmlWriter.writeAttribute(namespace,attName,attValue); + } + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeAttribute(java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName,attValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace,attName,attValue); + } + } + + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName, + javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + java.lang.String attributeNamespace = qname.getNamespaceURI(); + java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace); + if (attributePrefix == null) { + attributePrefix = registerPrefix(xmlWriter, attributeNamespace); + } + java.lang.String attributeValue; + if (attributePrefix.trim().length() > 0) { + attributeValue = attributePrefix + ":" + qname.getLocalPart(); + } else { + attributeValue = qname.getLocalPart(); + } + + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName, attributeValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace, attName, attributeValue); + } + } + /** + * method to handle Qnames + */ + + private void writeQName(javax.xml.namespace.QName qname, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String namespaceURI = qname.getNamespaceURI(); + if (namespaceURI != null) { + java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); + if (prefix == null) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } else { + // i.e this is the default namespace + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + } + + private void writeQNames(javax.xml.namespace.QName[] qnames, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + if (qnames != null) { + // we have to store this data until last moment since it is not possible to write any + // namespace data after writing the charactor data + java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer(); + java.lang.String namespaceURI = null; + java.lang.String prefix = null; + + for (int i = 0; i < qnames.length; i++) { + if (i > 0) { + stringToWrite.append(" "); + } + namespaceURI = qnames[i].getNamespaceURI(); + if (namespaceURI != null) { + prefix = xmlWriter.getPrefix(namespaceURI); + if ((prefix == null) || (prefix.length() == 0)) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } + xmlWriter.writeCharacters(stringToWrite.toString()); + } + + } + + + /** + * Register a namespace prefix + */ + private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException { + java.lang.String prefix = xmlWriter.getPrefix(namespace); + if (prefix == null) { + prefix = generatePrefix(namespace); + javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext(); + while (true) { + java.lang.String uri = nsContext.getNamespaceURI(prefix); + if (uri == null || uri.length() == 0) { + break; + } + prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + return prefix; + } + + + + /** + * databinding method to get an XML representation of this object + * + */ + public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) + throws org.apache.axis2.databinding.ADBException{ + + + + java.util.ArrayList elementList = new java.util.ArrayList(); + java.util.ArrayList attribList = new java.util.ArrayList(); + + if (localAbsoluteTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "absolute")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAbsolute)); + } if (localAbsoluteFileTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "absoluteFile")); + + + elementList.add(localAbsoluteFile==null?null: + localAbsoluteFile); + } if (localAbsolutePathTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "absolutePath")); + + elementList.add(localAbsolutePath==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAbsolutePath)); + } if (localCanonicalFileTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "canonicalFile")); + + + elementList.add(localCanonicalFile==null?null: + localCanonicalFile); + } if (localCanonicalPathTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "canonicalPath")); + + elementList.add(localCanonicalPath==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCanonicalPath)); + } if (localDirectoryTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "directory")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDirectory)); + } if (localFileTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "file")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFile)); + } if (localFreeSpaceTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "freeSpace")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localFreeSpace)); + } if (localHiddenTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "hidden")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localHidden)); + } if (localNameTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "name")); + + elementList.add(localName==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName)); + } if (localParentTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "parent")); + + elementList.add(localParent==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localParent)); + } if (localParentFileTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "parentFile")); + + + elementList.add(localParentFile==null?null: + localParentFile); + } if (localPathTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "path")); + + elementList.add(localPath==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPath)); + } if (localTotalSpaceTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "totalSpace")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localTotalSpace)); + } if (localUsableSpaceTracker){ + elementList.add(new javax.xml.namespace.QName("http://io.java/xsd", + "usableSpace")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUsableSpace)); + } + + return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray()); + + + + } + + + + /** + * Factory class that keeps the parse method + */ + public static class Factory{ + + + + + /** + * static method to create the object + * Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable + * If this object is not an element, it is a complex type and the reader is at the event just after the outer start element + * Postcondition: If this object is an element, the reader is positioned at its end element + * If this object is a complex type, the reader is positioned at the end element of its outer element + */ + public static File parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{ + File object = + new File(); + + int event; + java.lang.String nillableValue = null; + java.lang.String prefix =""; + java.lang.String namespaceuri =""; + try { + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + + if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){ + java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", + "type"); + if (fullTypeName!=null){ + java.lang.String nsPrefix = null; + if (fullTypeName.indexOf(":") > -1){ + nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":")); + } + nsPrefix = nsPrefix==null?"":nsPrefix; + + java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1); + + if (!"File".equals(type)){ + //find namespace for the prefix + java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); + return (File)ExtensionMapper.getTypeObject( + nsUri,type,reader); + } + + + } + + + } + + + + + // Note all attributes that were handled. Used to differ normal attributes + // from anyAttributes. + java.util.Vector handledAttributes = new java.util.Vector(); + + + + + reader.next(); + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","absolute").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"absolute" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setAbsolute( + org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","absoluteFile").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + object.setAbsoluteFile(null); + reader.next(); + + reader.next(); + + }else{ + + object.setAbsoluteFile(File.Factory.parse(reader)); + + reader.next(); + } + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","absolutePath").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.setAbsolutePath( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","canonicalFile").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + object.setCanonicalFile(null); + reader.next(); + + reader.next(); + + }else{ + + object.setCanonicalFile(File.Factory.parse(reader)); + + reader.next(); + } + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","canonicalPath").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.setCanonicalPath( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","directory").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"directory" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setDirectory( + org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","file").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"file" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setFile( + org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","freeSpace").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"freeSpace" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setFreeSpace( + org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + object.setFreeSpace(java.lang.Long.MIN_VALUE); + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","hidden").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"hidden" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setHidden( + org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","name").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.setName( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","parent").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.setParent( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","parentFile").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + object.setParentFile(null); + reader.next(); + + reader.next(); + + }else{ + + object.setParentFile(File.Factory.parse(reader)); + + reader.next(); + } + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","path").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.setPath( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","totalSpace").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"totalSpace" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setTotalSpace( + org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + object.setTotalSpace(java.lang.Long.MIN_VALUE); + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://io.java/xsd","usableSpace").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"usableSpace" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setUsableSpace( + org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + object.setUsableSpace(java.lang.Long.MIN_VALUE); + + } + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + if (reader.isStartElement()) + // A start element we are not expecting indicates a trailing invalid property + throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); + + + + + } catch (javax.xml.stream.XMLStreamException e) { + throw new java.lang.Exception(e); + } + + return object; + } + + }//end of factory class + + + + } + + + public static class ExtensionMapper{ + + public static java.lang.Object getTypeObject(java.lang.String namespaceURI, + java.lang.String typeName, + javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{ + + + if ( + "http://io.java/xsd".equals(namespaceURI) && + "File".equals(typeName)){ + + return File.Factory.parse(reader); + + + } + + + throw new org.apache.axis2.databinding.ADBException("Unsupported type " + namespaceURI + " " + typeName); + } + + } + + public static class CreateConfigFile + implements org.apache.axis2.databinding.ADBBean{ + + public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName( + "http://salome.service.ws_server.splat.org", + "createConfigFile", + "ns2"); + + + + /** + * field for Args0 + */ + + + protected long localArgs0 ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localArgs0Tracker = false ; + + public boolean isArgs0Specified(){ + return localArgs0Tracker; + } + + + + /** + * Auto generated getter method + * @return long + */ + public long getArgs0(){ + return localArgs0; + } + + + + /** + * Auto generated setter method + * @param param Args0 + */ + public void setArgs0(long param){ + + // setting primitive attribute tracker to true + localArgs0Tracker = + param != java.lang.Long.MIN_VALUE; + + this.localArgs0=param; + + + } + + + /** + * field for Args1 + */ + + + protected long localArgs1 ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localArgs1Tracker = false ; + + public boolean isArgs1Specified(){ + return localArgs1Tracker; + } + + + + /** + * Auto generated getter method + * @return long + */ + public long getArgs1(){ + return localArgs1; + } + + + + /** + * Auto generated setter method + * @param param Args1 + */ + public void setArgs1(long param){ + + // setting primitive attribute tracker to true + localArgs1Tracker = + param != java.lang.Long.MIN_VALUE; + + this.localArgs1=param; + + + } + + + /** + * field for Args2 + */ + + + protected long localArgs2 ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localArgs2Tracker = false ; + + public boolean isArgs2Specified(){ + return localArgs2Tracker; + } + + + + /** + * Auto generated getter method + * @return long + */ + public long getArgs2(){ + return localArgs2; + } + + + + /** + * Auto generated setter method + * @param param Args2 + */ + public void setArgs2(long param){ + + // setting primitive attribute tracker to true + localArgs2Tracker = + param != java.lang.Long.MIN_VALUE; + + this.localArgs2=param; + + + } + + + /** + * field for Args3 + */ + + + protected java.lang.String localArgs3 ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localArgs3Tracker = false ; + + public boolean isArgs3Specified(){ + return localArgs3Tracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String getArgs3(){ + return localArgs3; + } + + + + /** + * Auto generated setter method + * @param param Args3 + */ + public void setArgs3(java.lang.String param){ + localArgs3Tracker = true; + + this.localArgs3=param; + + + } + + + + + /** + * + * @param parentQName + * @param factory + * @return org.apache.axiom.om.OMElement + */ + public org.apache.axiom.om.OMElement getOMElement ( + final javax.xml.namespace.QName parentQName, + final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{ + + + + org.apache.axiom.om.OMDataSource dataSource = + new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME); + return factory.createOMElement(dataSource,MY_QNAME); + + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + serialize(parentQName,xmlWriter,false); + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter, + boolean serializeType) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + + + + + java.lang.String prefix = null; + java.lang.String namespace = null; + + + prefix = parentQName.getPrefix(); + namespace = parentQName.getNamespaceURI(); + writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); + + if (serializeType){ + + + java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://salome.service.ws_server.splat.org"); + if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + namespacePrefix+":createConfigFile", + xmlWriter); + } else { + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + "createConfigFile", + xmlWriter); + } + + + } + if (localArgs0Tracker){ + namespace = "http://salome.service.ws_server.splat.org"; + writeStartElement(null, namespace, "args0", xmlWriter); + + if (localArgs0==java.lang.Long.MIN_VALUE) { + + throw new org.apache.axis2.databinding.ADBException("args0 cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localArgs0)); + } + + xmlWriter.writeEndElement(); + } if (localArgs1Tracker){ + namespace = "http://salome.service.ws_server.splat.org"; + writeStartElement(null, namespace, "args1", xmlWriter); + + if (localArgs1==java.lang.Long.MIN_VALUE) { + + throw new org.apache.axis2.databinding.ADBException("args1 cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localArgs1)); + } + + xmlWriter.writeEndElement(); + } if (localArgs2Tracker){ + namespace = "http://salome.service.ws_server.splat.org"; + writeStartElement(null, namespace, "args2", xmlWriter); + + if (localArgs2==java.lang.Long.MIN_VALUE) { + + throw new org.apache.axis2.databinding.ADBException("args2 cannot be null!!"); + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localArgs2)); + } + + xmlWriter.writeEndElement(); + } if (localArgs3Tracker){ + namespace = "http://salome.service.ws_server.splat.org"; + writeStartElement(null, namespace, "args3", xmlWriter); + + + if (localArgs3==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(localArgs3); + + } + + xmlWriter.writeEndElement(); + } + xmlWriter.writeEndElement(); + + + } + + private static java.lang.String generatePrefix(java.lang.String namespace) { + if(namespace.equals("http://salome.service.ws_server.splat.org")){ + return "ns2"; + } + return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + + /** + * Utility method to write an element start tag. + */ + private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); + if (writerPrefix != null) { + xmlWriter.writeStartElement(namespace, localPart); + } else { + if (namespace.length() == 0) { + prefix = ""; + } else if (prefix == null) { + prefix = generatePrefix(namespace); + } + + xmlWriter.writeStartElement(prefix, localPart, namespace); + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + } + + /** + * Util method to write an attribute with the ns prefix + */ + private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (xmlWriter.getPrefix(namespace) == null) { + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + xmlWriter.writeAttribute(namespace,attName,attValue); + } + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeAttribute(java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName,attValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace,attName,attValue); + } + } + + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName, + javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + java.lang.String attributeNamespace = qname.getNamespaceURI(); + java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace); + if (attributePrefix == null) { + attributePrefix = registerPrefix(xmlWriter, attributeNamespace); + } + java.lang.String attributeValue; + if (attributePrefix.trim().length() > 0) { + attributeValue = attributePrefix + ":" + qname.getLocalPart(); + } else { + attributeValue = qname.getLocalPart(); + } + + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName, attributeValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace, attName, attributeValue); + } + } + /** + * method to handle Qnames + */ + + private void writeQName(javax.xml.namespace.QName qname, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String namespaceURI = qname.getNamespaceURI(); + if (namespaceURI != null) { + java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); + if (prefix == null) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } else { + // i.e this is the default namespace + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + } + + private void writeQNames(javax.xml.namespace.QName[] qnames, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + if (qnames != null) { + // we have to store this data until last moment since it is not possible to write any + // namespace data after writing the charactor data + java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer(); + java.lang.String namespaceURI = null; + java.lang.String prefix = null; + + for (int i = 0; i < qnames.length; i++) { + if (i > 0) { + stringToWrite.append(" "); + } + namespaceURI = qnames[i].getNamespaceURI(); + if (namespaceURI != null) { + prefix = xmlWriter.getPrefix(namespaceURI); + if ((prefix == null) || (prefix.length() == 0)) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } + xmlWriter.writeCharacters(stringToWrite.toString()); + } + + } + + + /** + * Register a namespace prefix + */ + private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException { + java.lang.String prefix = xmlWriter.getPrefix(namespace); + if (prefix == null) { + prefix = generatePrefix(namespace); + javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext(); + while (true) { + java.lang.String uri = nsContext.getNamespaceURI(prefix); + if (uri == null || uri.length() == 0) { + break; + } + prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + return prefix; + } + + + + /** + * databinding method to get an XML representation of this object + * + */ + public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) + throws org.apache.axis2.databinding.ADBException{ + + + + java.util.ArrayList elementList = new java.util.ArrayList(); + java.util.ArrayList attribList = new java.util.ArrayList(); + + if (localArgs0Tracker){ + elementList.add(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "args0")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localArgs0)); + } if (localArgs1Tracker){ + elementList.add(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "args1")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localArgs1)); + } if (localArgs2Tracker){ + elementList.add(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "args2")); + + elementList.add( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localArgs2)); + } if (localArgs3Tracker){ + elementList.add(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "args3")); + + elementList.add(localArgs3==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localArgs3)); + } + + return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray()); + + + + } + + + + /** + * Factory class that keeps the parse method + */ + public static class Factory{ + + + + + /** + * static method to create the object + * Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable + * If this object is not an element, it is a complex type and the reader is at the event just after the outer start element + * Postcondition: If this object is an element, the reader is positioned at its end element + * If this object is a complex type, the reader is positioned at the end element of its outer element + */ + public static CreateConfigFile parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{ + CreateConfigFile object = + new CreateConfigFile(); + + int event; + java.lang.String nillableValue = null; + java.lang.String prefix =""; + java.lang.String namespaceuri =""; + try { + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + + if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){ + java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", + "type"); + if (fullTypeName!=null){ + java.lang.String nsPrefix = null; + if (fullTypeName.indexOf(":") > -1){ + nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":")); + } + nsPrefix = nsPrefix==null?"":nsPrefix; + + java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1); + + if (!"createConfigFile".equals(type)){ + //find namespace for the prefix + java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); + return (CreateConfigFile)ExtensionMapper.getTypeObject( + nsUri,type,reader); + } + + + } + + + } + + + + + // Note all attributes that were handled. Used to differ normal attributes + // from anyAttributes. + java.util.Vector handledAttributes = new java.util.Vector(); + + + + + reader.next(); + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org","args0").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"args0" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setArgs0( + org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + object.setArgs0(java.lang.Long.MIN_VALUE); + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org","args1").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"args1" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setArgs1( + org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + object.setArgs1(java.lang.Long.MIN_VALUE); + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org","args2").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + throw new org.apache.axis2.databinding.ADBException("The element: "+"args2" +" cannot be null"); + } + + + java.lang.String content = reader.getElementText(); + + object.setArgs2( + org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(content)); + + reader.next(); + + } // End of if for expected property start element + + else { + + object.setArgs2(java.lang.Long.MIN_VALUE); + + } + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org","args3").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.setArgs3( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + if (reader.isStartElement()) + // A start element we are not expecting indicates a trailing invalid property + throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); + + + + + } catch (javax.xml.stream.XMLStreamException e) { + throw new java.lang.Exception(e); + } + + return object; + } + + }//end of factory class + + + + } + + + public static class CreateConfigFileResponse + implements org.apache.axis2.databinding.ADBBean{ + + public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName( + "http://salome.service.ws_server.splat.org", + "createConfigFileResponse", + "ns2"); + + + + /** + * field for _return + */ + + + protected File local_return ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean local_returnTracker = false ; + + public boolean is_returnSpecified(){ + return local_returnTracker; + } + + + + /** + * Auto generated getter method + * @return File + */ + public File get_return(){ + return local_return; + } + + + + /** + * Auto generated setter method + * @param param _return + */ + public void set_return(File param){ + local_returnTracker = true; + + this.local_return=param; + + + } + + + + + /** + * + * @param parentQName + * @param factory + * @return org.apache.axiom.om.OMElement + */ + public org.apache.axiom.om.OMElement getOMElement ( + final javax.xml.namespace.QName parentQName, + final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{ + + + + org.apache.axiom.om.OMDataSource dataSource = + new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME); + return factory.createOMElement(dataSource,MY_QNAME); + + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + serialize(parentQName,xmlWriter,false); + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter, + boolean serializeType) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + + + + + java.lang.String prefix = null; + java.lang.String namespace = null; + + + prefix = parentQName.getPrefix(); + namespace = parentQName.getNamespaceURI(); + writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); + + if (serializeType){ + + + java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://salome.service.ws_server.splat.org"); + if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + namespacePrefix+":createConfigFileResponse", + xmlWriter); + } else { + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + "createConfigFileResponse", + xmlWriter); + } + + + } + if (local_returnTracker){ + if (local_return==null){ + + writeStartElement(null, "http://salome.service.ws_server.splat.org", "return", xmlWriter); + + // write the nil attribute + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + xmlWriter.writeEndElement(); + }else{ + local_return.serialize(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org","return"), + xmlWriter); + } + } + xmlWriter.writeEndElement(); + + + } + + private static java.lang.String generatePrefix(java.lang.String namespace) { + if(namespace.equals("http://salome.service.ws_server.splat.org")){ + return "ns2"; + } + return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + + /** + * Utility method to write an element start tag. + */ + private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); + if (writerPrefix != null) { + xmlWriter.writeStartElement(namespace, localPart); + } else { + if (namespace.length() == 0) { + prefix = ""; + } else if (prefix == null) { + prefix = generatePrefix(namespace); + } + + xmlWriter.writeStartElement(prefix, localPart, namespace); + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + } + + /** + * Util method to write an attribute with the ns prefix + */ + private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (xmlWriter.getPrefix(namespace) == null) { + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + xmlWriter.writeAttribute(namespace,attName,attValue); + } + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeAttribute(java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName,attValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace,attName,attValue); + } + } + + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName, + javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + java.lang.String attributeNamespace = qname.getNamespaceURI(); + java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace); + if (attributePrefix == null) { + attributePrefix = registerPrefix(xmlWriter, attributeNamespace); + } + java.lang.String attributeValue; + if (attributePrefix.trim().length() > 0) { + attributeValue = attributePrefix + ":" + qname.getLocalPart(); + } else { + attributeValue = qname.getLocalPart(); + } + + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName, attributeValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace, attName, attributeValue); + } + } + /** + * method to handle Qnames + */ + + private void writeQName(javax.xml.namespace.QName qname, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String namespaceURI = qname.getNamespaceURI(); + if (namespaceURI != null) { + java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); + if (prefix == null) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } else { + // i.e this is the default namespace + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + } + + private void writeQNames(javax.xml.namespace.QName[] qnames, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + if (qnames != null) { + // we have to store this data until last moment since it is not possible to write any + // namespace data after writing the charactor data + java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer(); + java.lang.String namespaceURI = null; + java.lang.String prefix = null; + + for (int i = 0; i < qnames.length; i++) { + if (i > 0) { + stringToWrite.append(" "); + } + namespaceURI = qnames[i].getNamespaceURI(); + if (namespaceURI != null) { + prefix = xmlWriter.getPrefix(namespaceURI); + if ((prefix == null) || (prefix.length() == 0)) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } + xmlWriter.writeCharacters(stringToWrite.toString()); + } + + } + + + /** + * Register a namespace prefix + */ + private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException { + java.lang.String prefix = xmlWriter.getPrefix(namespace); + if (prefix == null) { + prefix = generatePrefix(namespace); + javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext(); + while (true) { + java.lang.String uri = nsContext.getNamespaceURI(prefix); + if (uri == null || uri.length() == 0) { + break; + } + prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + return prefix; + } + + + + /** + * databinding method to get an XML representation of this object + * + */ + public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) + throws org.apache.axis2.databinding.ADBException{ + + + + java.util.ArrayList elementList = new java.util.ArrayList(); + java.util.ArrayList attribList = new java.util.ArrayList(); + + if (local_returnTracker){ + elementList.add(new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org", + "return")); + + + elementList.add(local_return==null?null: + local_return); + } + + return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray()); + + + + } + + + + /** + * Factory class that keeps the parse method + */ + public static class Factory{ + + + + + /** + * static method to create the object + * Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable + * If this object is not an element, it is a complex type and the reader is at the event just after the outer start element + * Postcondition: If this object is an element, the reader is positioned at its end element + * If this object is a complex type, the reader is positioned at the end element of its outer element + */ + public static CreateConfigFileResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{ + CreateConfigFileResponse object = + new CreateConfigFileResponse(); + + int event; + java.lang.String nillableValue = null; + java.lang.String prefix =""; + java.lang.String namespaceuri =""; + try { + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + + if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){ + java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", + "type"); + if (fullTypeName!=null){ + java.lang.String nsPrefix = null; + if (fullTypeName.indexOf(":") > -1){ + nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":")); + } + nsPrefix = nsPrefix==null?"":nsPrefix; + + java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1); + + if (!"createConfigFileResponse".equals(type)){ + //find namespace for the prefix + java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); + return (CreateConfigFileResponse)ExtensionMapper.getTypeObject( + nsUri,type,reader); + } + + + } + + + } + + + + + // Note all attributes that were handled. Used to differ normal attributes + // from anyAttributes. + java.util.Vector handledAttributes = new java.util.Vector(); + + + + + reader.next(); + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://salome.service.ws_server.splat.org","return").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if ("true".equals(nillableValue) || "1".equals(nillableValue)){ + object.set_return(null); + reader.next(); + + reader.next(); + + }else{ + + object.set_return(File.Factory.parse(reader)); + + reader.next(); + } + } // End of if for expected property start element + + else { + + } + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + if (reader.isStartElement()) + // A start element we are not expecting indicates a trailing invalid property + throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); + + + + + } catch (javax.xml.stream.XMLStreamException e) { + throw new java.lang.Exception(e); + } + + return object; + } + + }//end of factory class + + + + } + + + private org.apache.axiom.om.OMElement toOM(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile param, boolean optimizeContent) + throws org.apache.axis2.AxisFault { + + + try{ + return param.getOMElement(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.MY_QNAME, + org.apache.axiom.om.OMAbstractFactory.getOMFactory()); + } catch(org.apache.axis2.databinding.ADBException e){ + throw org.apache.axis2.AxisFault.makeFault(e); + } + + + } + + private org.apache.axiom.om.OMElement toOM(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse param, boolean optimizeContent) + throws org.apache.axis2.AxisFault { + + + try{ + return param.getOMElement(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse.MY_QNAME, + org.apache.axiom.om.OMAbstractFactory.getOMFactory()); + } catch(org.apache.axis2.databinding.ADBException e){ + throw org.apache.axis2.AxisFault.makeFault(e); + } + + + } + + + private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile param, boolean optimizeContent, javax.xml.namespace.QName methodQName) + throws org.apache.axis2.AxisFault{ + + + try{ + + org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); + emptyEnvelope.getBody().addChild(param.getOMElement(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.MY_QNAME,factory)); + return emptyEnvelope; + } catch(org.apache.axis2.databinding.ADBException e){ + throw org.apache.axis2.AxisFault.makeFault(e); + } + + + } + + + /* methods to provide back word compatibility */ + + + + + /** + * get the default envelope + */ + private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory){ + return factory.getDefaultEnvelope(); + } + + + private java.lang.Object fromOM( + org.apache.axiom.om.OMElement param, + java.lang.Class type, + java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{ + + try { + + if (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.class.equals(type)){ + + return org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.Factory.parse(param.getXMLStreamReaderWithoutCaching()); + + + } + + if (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse.class.equals(type)){ + + return org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching()); + + + } + + } catch (java.lang.Exception e) { + throw org.apache.axis2.AxisFault.makeFault(e); + } + return null; + } + + + + + } + \ No newline at end of file diff --git a/Workspace/Siman-Stub/src/org/splat/ws_client/test/HelloSimanWSCallbackHandler.java b/Workspace/Siman-Stub/src/org/splat/ws_client/test/HelloSimanWSCallbackHandler.java new file mode 100644 index 0000000..889c2b3 --- /dev/null +++ b/Workspace/Siman-Stub/src/org/splat/ws_client/test/HelloSimanWSCallbackHandler.java @@ -0,0 +1,66 @@ + +/** + * HelloSimanWSCallbackHandler.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: 1.6.2 Built on : Apr 17, 2012 (05:33:49 IST) + */ + + package org.splat.ws_client.test; + + /** + * HelloSimanWSCallbackHandler Callback class, Users can extend this class and implement + * their own receiveResult and receiveError methods. + */ + public abstract class HelloSimanWSCallbackHandler{ + + + + protected Object clientData; + + /** + * User can pass in any object that needs to be accessed once the NonBlocking + * Web service call is finished and appropriate method of this CallBack is called. + * @param clientData Object mechanism by which the user can pass in user data + * that will be avilable at the time this callback is called. + */ + public HelloSimanWSCallbackHandler(Object clientData){ + this.clientData = clientData; + } + + /** + * Please use this constructor if you don't want to set any clientData + */ + public HelloSimanWSCallbackHandler(){ + this.clientData = null; + } + + /** + * Get the client data + */ + + public Object getClientData() { + return clientData; + } + + + /** + * auto generated Axis2 call back method for getGreeting method + * override this method for handling normal response from getGreeting operation + */ + public void receiveResultgetGreeting( + org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse result + ) { + } + + /** + * auto generated Axis2 Error handler + * override this method for handling error response from getGreeting operation + */ + public void receiveErrorgetGreeting(java.lang.Exception e) { + } + + + + } + \ No newline at end of file diff --git a/Workspace/Siman-Stub/src/org/splat/ws_client/test/HelloSimanWSStub.java b/Workspace/Siman-Stub/src/org/splat/ws_client/test/HelloSimanWSStub.java new file mode 100644 index 0000000..81ef180 --- /dev/null +++ b/Workspace/Siman-Stub/src/org/splat/ws_client/test/HelloSimanWSStub.java @@ -0,0 +1,1429 @@ + +/** + * HelloSimanWSStub.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: 1.6.2 Built on : Apr 17, 2012 (05:33:49 IST) + */ + package org.splat.ws_client.test; + + + + /* + * HelloSimanWSStub java implementation + */ + + + public class HelloSimanWSStub extends org.apache.axis2.client.Stub + { + protected org.apache.axis2.description.AxisOperation[] _operations; + + //hashmaps to keep the fault mapping + private java.util.HashMap faultExceptionNameMap = new java.util.HashMap(); + private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap(); + private java.util.HashMap faultMessageMap = new java.util.HashMap(); + + private static int counter = 0; + + private static synchronized java.lang.String getUniqueSuffix(){ + // reset the counter if it is greater than 99999 + if (counter > 99999){ + counter = 0; + } + counter = counter + 1; + return java.lang.Long.toString(java.lang.System.currentTimeMillis()) + "_" + counter; + } + + + private void populateAxisService() throws org.apache.axis2.AxisFault { + + //creating the Service with a unique name + _service = new org.apache.axis2.description.AxisService("HelloSimanWS" + getUniqueSuffix()); + addAnonymousOperations(); + + //creating the operations + org.apache.axis2.description.AxisOperation __operation; + + _operations = new org.apache.axis2.description.AxisOperation[1]; + + __operation = new org.apache.axis2.description.OutInAxisOperation(); + + + __operation.setName(new javax.xml.namespace.QName("http://test.ws_server.splat.org", "getGreeting")); + _service.addOperation(__operation); + + + + + _operations[0]=__operation; + + + } + + //populates the faults + private void populateFaults(){ + + + + } + + /** + *Constructor that takes in a configContext + */ + + public HelloSimanWSStub(org.apache.axis2.context.ConfigurationContext configurationContext, + java.lang.String targetEndpoint) + throws org.apache.axis2.AxisFault { + this(configurationContext,targetEndpoint,false); + } + + + /** + * Constructor that takes in a configContext and useseperate listner + */ + public HelloSimanWSStub(org.apache.axis2.context.ConfigurationContext configurationContext, + java.lang.String targetEndpoint, boolean useSeparateListener) + throws org.apache.axis2.AxisFault { + //To populate AxisService + populateAxisService(); + populateFaults(); + + _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service); + + + _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference( + targetEndpoint)); + _serviceClient.getOptions().setUseSeparateListener(useSeparateListener); + + //Set the soap version + _serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); + + + } + + /** + * Default Constructor + */ + public HelloSimanWSStub(org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault { + + this(configurationContext,"http://localhost:8080/Siman-WS/services/HelloSimanWS.HelloSimanWSHttpSoap12Endpoint/" ); + + } + + /** + * Default Constructor + */ + public HelloSimanWSStub() throws org.apache.axis2.AxisFault { + + this("http://localhost:8080/Siman-WS/services/HelloSimanWS.HelloSimanWSHttpSoap12Endpoint/" ); + + } + + /** + * Constructor taking the target endpoint + */ + public HelloSimanWSStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault { + this(null,targetEndpoint); + } + + + + + /** + * Auto generated method signature + * + * @see org.splat.ws_client.test.HelloSimanWS#getGreeting + * @param getGreeting0 + + */ + + + + public org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse getGreeting( + + org.splat.ws_client.test.HelloSimanWSStub.GetGreeting getGreeting0) + + + throws java.rmi.RemoteException + + { + org.apache.axis2.context.MessageContext _messageContext = null; + try{ + org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); + _operationClient.getOptions().setAction("urn:getGreeting"); + _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true); + + + + addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&"); + + + // create a message context + _messageContext = new org.apache.axis2.context.MessageContext(); + + + + // create SOAP envelope with that payload + org.apache.axiom.soap.SOAPEnvelope env = null; + + + env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), + getGreeting0, + optimizeContent(new javax.xml.namespace.QName("http://test.ws_server.splat.org", + "getGreeting")), new javax.xml.namespace.QName("http://test.ws_server.splat.org", + "getGreeting")); + + //adding SOAP soap_headers + _serviceClient.addHeadersToEnvelope(env); + // set the message context with that soap envelope + _messageContext.setEnvelope(env); + + // add the message contxt to the operation client + _operationClient.addMessageContext(_messageContext); + + //execute the operation client + _operationClient.execute(true); + + + org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext( + org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE); + org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope(); + + + java.lang.Object object = fromOM( + _returnEnv.getBody().getFirstElement() , + org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse.class, + getEnvelopeNamespaces(_returnEnv)); + + + return (org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse)object; + + }catch(org.apache.axis2.AxisFault f){ + + org.apache.axiom.om.OMElement faultElt = f.getDetail(); + if (faultElt!=null){ + if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"getGreeting"))){ + //make the fault by reflection + try{ + java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"getGreeting")); + java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName); + java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class); + java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage()); + //message class + java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"getGreeting")); + java.lang.Class messageClass = java.lang.Class.forName(messageClassName); + java.lang.Object messageObject = fromOM(faultElt,messageClass,null); + java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage", + new java.lang.Class[]{messageClass}); + m.invoke(ex,new java.lang.Object[]{messageObject}); + + + throw new java.rmi.RemoteException(ex.getMessage(), ex); + }catch(java.lang.ClassCastException e){ + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.ClassNotFoundException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + }catch (java.lang.NoSuchMethodException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.reflect.InvocationTargetException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.IllegalAccessException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } catch (java.lang.InstantiationException e) { + // we cannot intantiate the class - throw the original Axis fault + throw f; + } + }else{ + throw f; + } + }else{ + throw f; + } + } finally { + if (_messageContext.getTransportOut() != null) { + _messageContext.getTransportOut().getSender().cleanup(_messageContext); + } + } + } + + /** + * Auto generated method signature for Asynchronous Invocations + * + * @see org.splat.ws_client.test.HelloSimanWS#startgetGreeting + * @param getGreeting0 + + */ + public void startgetGreeting( + + org.splat.ws_client.test.HelloSimanWSStub.GetGreeting getGreeting0, + + final org.splat.ws_client.test.HelloSimanWSCallbackHandler callback) + + throws java.rmi.RemoteException{ + + org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); + _operationClient.getOptions().setAction("urn:getGreeting"); + _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true); + + + + addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&"); + + + + // create SOAP envelope with that payload + org.apache.axiom.soap.SOAPEnvelope env=null; + final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext(); + + + //Style is Doc. + + + env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), + getGreeting0, + optimizeContent(new javax.xml.namespace.QName("http://test.ws_server.splat.org", + "getGreeting")), new javax.xml.namespace.QName("http://test.ws_server.splat.org", + "getGreeting")); + + // adding SOAP soap_headers + _serviceClient.addHeadersToEnvelope(env); + // create message context with that soap envelope + _messageContext.setEnvelope(env); + + // add the message context to the operation client + _operationClient.addMessageContext(_messageContext); + + + + _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() { + public void onMessage(org.apache.axis2.context.MessageContext resultContext) { + try { + org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope(); + + java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(), + org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse.class, + getEnvelopeNamespaces(resultEnv)); + callback.receiveResultgetGreeting( + (org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse)object); + + } catch (org.apache.axis2.AxisFault e) { + callback.receiveErrorgetGreeting(e); + } + } + + public void onError(java.lang.Exception error) { + if (error instanceof org.apache.axis2.AxisFault) { + org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error; + org.apache.axiom.om.OMElement faultElt = f.getDetail(); + if (faultElt!=null){ + if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"getGreeting"))){ + //make the fault by reflection + try{ + java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"getGreeting")); + java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName); + java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class); + java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage()); + //message class + java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),"getGreeting")); + java.lang.Class messageClass = java.lang.Class.forName(messageClassName); + java.lang.Object messageObject = fromOM(faultElt,messageClass,null); + java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage", + new java.lang.Class[]{messageClass}); + m.invoke(ex,new java.lang.Object[]{messageObject}); + + + callback.receiveErrorgetGreeting(new java.rmi.RemoteException(ex.getMessage(), ex)); + } catch(java.lang.ClassCastException e){ + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorgetGreeting(f); + } catch (java.lang.ClassNotFoundException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorgetGreeting(f); + } catch (java.lang.NoSuchMethodException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorgetGreeting(f); + } catch (java.lang.reflect.InvocationTargetException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorgetGreeting(f); + } catch (java.lang.IllegalAccessException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorgetGreeting(f); + } catch (java.lang.InstantiationException e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorgetGreeting(f); + } catch (org.apache.axis2.AxisFault e) { + // we cannot intantiate the class - throw the original Axis fault + callback.receiveErrorgetGreeting(f); + } + } else { + callback.receiveErrorgetGreeting(f); + } + } else { + callback.receiveErrorgetGreeting(f); + } + } else { + callback.receiveErrorgetGreeting(error); + } + } + + public void onFault(org.apache.axis2.context.MessageContext faultContext) { + org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext); + onError(fault); + } + + public void onComplete() { + try { + _messageContext.getTransportOut().getSender().cleanup(_messageContext); + } catch (org.apache.axis2.AxisFault axisFault) { + callback.receiveErrorgetGreeting(axisFault); + } + } + }); + + + org.apache.axis2.util.CallbackReceiver _callbackReceiver = null; + if ( _operations[0].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) { + _callbackReceiver = new org.apache.axis2.util.CallbackReceiver(); + _operations[0].setMessageReceiver( + _callbackReceiver); + } + + //execute the operation client + _operationClient.execute(false); + + } + + + + /** + * A utility method that copies the namepaces from the SOAPEnvelope + */ + private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){ + java.util.Map returnMap = new java.util.HashMap(); + java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces(); + while (namespaceIterator.hasNext()) { + org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next(); + returnMap.put(ns.getPrefix(),ns.getNamespaceURI()); + } + return returnMap; + } + + + + private javax.xml.namespace.QName[] opNameArray = null; + private boolean optimizeContent(javax.xml.namespace.QName opName) { + + + if (opNameArray == null) { + return false; + } + for (int i = 0; i < opNameArray.length; i++) { + if (opName.equals(opNameArray[i])) { + return true; + } + } + return false; + } + //http://localhost:8080/Siman-WS/services/HelloSimanWS.HelloSimanWSHttpSoap12Endpoint/ + public static class GetGreeting + implements org.apache.axis2.databinding.ADBBean{ + + public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName( + "http://test.ws_server.splat.org", + "getGreeting", + "ns1"); + + + + /** + * field for Name + */ + + + protected java.lang.String localName ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean localNameTracker = false ; + + public boolean isNameSpecified(){ + return localNameTracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String getName(){ + return localName; + } + + + + /** + * Auto generated setter method + * @param param Name + */ + public void setName(java.lang.String param){ + localNameTracker = true; + + this.localName=param; + + + } + + + + + /** + * + * @param parentQName + * @param factory + * @return org.apache.axiom.om.OMElement + */ + public org.apache.axiom.om.OMElement getOMElement ( + final javax.xml.namespace.QName parentQName, + final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{ + + + + org.apache.axiom.om.OMDataSource dataSource = + new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME); + return factory.createOMElement(dataSource,MY_QNAME); + + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + serialize(parentQName,xmlWriter,false); + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter, + boolean serializeType) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + + + + + java.lang.String prefix = null; + java.lang.String namespace = null; + + + prefix = parentQName.getPrefix(); + namespace = parentQName.getNamespaceURI(); + writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); + + if (serializeType){ + + + java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://test.ws_server.splat.org"); + if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + namespacePrefix+":getGreeting", + xmlWriter); + } else { + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + "getGreeting", + xmlWriter); + } + + + } + if (localNameTracker){ + namespace = "http://test.ws_server.splat.org"; + writeStartElement(null, namespace, "name", xmlWriter); + + + if (localName==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(localName); + + } + + xmlWriter.writeEndElement(); + } + xmlWriter.writeEndElement(); + + + } + + private static java.lang.String generatePrefix(java.lang.String namespace) { + if(namespace.equals("http://test.ws_server.splat.org")){ + return "ns1"; + } + return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + + /** + * Utility method to write an element start tag. + */ + private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); + if (writerPrefix != null) { + xmlWriter.writeStartElement(namespace, localPart); + } else { + if (namespace.length() == 0) { + prefix = ""; + } else if (prefix == null) { + prefix = generatePrefix(namespace); + } + + xmlWriter.writeStartElement(prefix, localPart, namespace); + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + } + + /** + * Util method to write an attribute with the ns prefix + */ + private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (xmlWriter.getPrefix(namespace) == null) { + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + xmlWriter.writeAttribute(namespace,attName,attValue); + } + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeAttribute(java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName,attValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace,attName,attValue); + } + } + + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName, + javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + java.lang.String attributeNamespace = qname.getNamespaceURI(); + java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace); + if (attributePrefix == null) { + attributePrefix = registerPrefix(xmlWriter, attributeNamespace); + } + java.lang.String attributeValue; + if (attributePrefix.trim().length() > 0) { + attributeValue = attributePrefix + ":" + qname.getLocalPart(); + } else { + attributeValue = qname.getLocalPart(); + } + + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName, attributeValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace, attName, attributeValue); + } + } + /** + * method to handle Qnames + */ + + private void writeQName(javax.xml.namespace.QName qname, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String namespaceURI = qname.getNamespaceURI(); + if (namespaceURI != null) { + java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); + if (prefix == null) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } else { + // i.e this is the default namespace + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + } + + private void writeQNames(javax.xml.namespace.QName[] qnames, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + if (qnames != null) { + // we have to store this data until last moment since it is not possible to write any + // namespace data after writing the charactor data + java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer(); + java.lang.String namespaceURI = null; + java.lang.String prefix = null; + + for (int i = 0; i < qnames.length; i++) { + if (i > 0) { + stringToWrite.append(" "); + } + namespaceURI = qnames[i].getNamespaceURI(); + if (namespaceURI != null) { + prefix = xmlWriter.getPrefix(namespaceURI); + if ((prefix == null) || (prefix.length() == 0)) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } + xmlWriter.writeCharacters(stringToWrite.toString()); + } + + } + + + /** + * Register a namespace prefix + */ + private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException { + java.lang.String prefix = xmlWriter.getPrefix(namespace); + if (prefix == null) { + prefix = generatePrefix(namespace); + javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext(); + while (true) { + java.lang.String uri = nsContext.getNamespaceURI(prefix); + if (uri == null || uri.length() == 0) { + break; + } + prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + return prefix; + } + + + + /** + * databinding method to get an XML representation of this object + * + */ + public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) + throws org.apache.axis2.databinding.ADBException{ + + + + java.util.ArrayList elementList = new java.util.ArrayList(); + java.util.ArrayList attribList = new java.util.ArrayList(); + + if (localNameTracker){ + elementList.add(new javax.xml.namespace.QName("http://test.ws_server.splat.org", + "name")); + + elementList.add(localName==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName)); + } + + return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray()); + + + + } + + + + /** + * Factory class that keeps the parse method + */ + public static class Factory{ + + + + + /** + * static method to create the object + * Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable + * If this object is not an element, it is a complex type and the reader is at the event just after the outer start element + * Postcondition: If this object is an element, the reader is positioned at its end element + * If this object is a complex type, the reader is positioned at the end element of its outer element + */ + public static GetGreeting parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{ + GetGreeting object = + new GetGreeting(); + + int event; + java.lang.String nillableValue = null; + java.lang.String prefix =""; + java.lang.String namespaceuri =""; + try { + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + + if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){ + java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", + "type"); + if (fullTypeName!=null){ + java.lang.String nsPrefix = null; + if (fullTypeName.indexOf(":") > -1){ + nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":")); + } + nsPrefix = nsPrefix==null?"":nsPrefix; + + java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1); + + if (!"getGreeting".equals(type)){ + //find namespace for the prefix + java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); + return (GetGreeting)ExtensionMapper.getTypeObject( + nsUri,type,reader); + } + + + } + + + } + + + + + // Note all attributes that were handled. Used to differ normal attributes + // from anyAttributes. + java.util.Vector handledAttributes = new java.util.Vector(); + + + + + reader.next(); + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://test.ws_server.splat.org","name").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.setName( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + if (reader.isStartElement()) + // A start element we are not expecting indicates a trailing invalid property + throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); + + + + + } catch (javax.xml.stream.XMLStreamException e) { + throw new java.lang.Exception(e); + } + + return object; + } + + }//end of factory class + + + + } + + + public static class ExtensionMapper{ + + public static java.lang.Object getTypeObject(java.lang.String namespaceURI, + java.lang.String typeName, + javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{ + + + throw new org.apache.axis2.databinding.ADBException("Unsupported type " + namespaceURI + " " + typeName); + } + + } + + public static class GetGreetingResponse + implements org.apache.axis2.databinding.ADBBean{ + + public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName( + "http://test.ws_server.splat.org", + "getGreetingResponse", + "ns1"); + + + + /** + * field for _return + */ + + + protected java.lang.String local_return ; + + /* This tracker boolean wil be used to detect whether the user called the set method + * for this attribute. It will be used to determine whether to include this field + * in the serialized XML + */ + protected boolean local_returnTracker = false ; + + public boolean is_returnSpecified(){ + return local_returnTracker; + } + + + + /** + * Auto generated getter method + * @return java.lang.String + */ + public java.lang.String get_return(){ + return local_return; + } + + + + /** + * Auto generated setter method + * @param param _return + */ + public void set_return(java.lang.String param){ + local_returnTracker = true; + + this.local_return=param; + + + } + + + + + /** + * + * @param parentQName + * @param factory + * @return org.apache.axiom.om.OMElement + */ + public org.apache.axiom.om.OMElement getOMElement ( + final javax.xml.namespace.QName parentQName, + final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{ + + + + org.apache.axiom.om.OMDataSource dataSource = + new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME); + return factory.createOMElement(dataSource,MY_QNAME); + + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + serialize(parentQName,xmlWriter,false); + } + + public void serialize(final javax.xml.namespace.QName parentQName, + javax.xml.stream.XMLStreamWriter xmlWriter, + boolean serializeType) + throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{ + + + + + java.lang.String prefix = null; + java.lang.String namespace = null; + + + prefix = parentQName.getPrefix(); + namespace = parentQName.getNamespaceURI(); + writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); + + if (serializeType){ + + + java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://test.ws_server.splat.org"); + if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + namespacePrefix+":getGreetingResponse", + xmlWriter); + } else { + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", + "getGreetingResponse", + xmlWriter); + } + + + } + if (local_returnTracker){ + namespace = "http://test.ws_server.splat.org"; + writeStartElement(null, namespace, "return", xmlWriter); + + + if (local_return==null){ + // write the nil attribute + + writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); + + }else{ + + + xmlWriter.writeCharacters(local_return); + + } + + xmlWriter.writeEndElement(); + } + xmlWriter.writeEndElement(); + + + } + + private static java.lang.String generatePrefix(java.lang.String namespace) { + if(namespace.equals("http://test.ws_server.splat.org")){ + return "ns1"; + } + return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + + /** + * Utility method to write an element start tag. + */ + private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); + if (writerPrefix != null) { + xmlWriter.writeStartElement(namespace, localPart); + } else { + if (namespace.length() == 0) { + prefix = ""; + } else if (prefix == null) { + prefix = generatePrefix(namespace); + } + + xmlWriter.writeStartElement(prefix, localPart, namespace); + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + } + + /** + * Util method to write an attribute with the ns prefix + */ + private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (xmlWriter.getPrefix(namespace) == null) { + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + xmlWriter.writeAttribute(namespace,attName,attValue); + } + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeAttribute(java.lang.String namespace,java.lang.String attName, + java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName,attValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace,attName,attValue); + } + } + + + /** + * Util method to write an attribute without the ns prefix + */ + private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName, + javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + java.lang.String attributeNamespace = qname.getNamespaceURI(); + java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace); + if (attributePrefix == null) { + attributePrefix = registerPrefix(xmlWriter, attributeNamespace); + } + java.lang.String attributeValue; + if (attributePrefix.trim().length() > 0) { + attributeValue = attributePrefix + ":" + qname.getLocalPart(); + } else { + attributeValue = qname.getLocalPart(); + } + + if (namespace.equals("")) { + xmlWriter.writeAttribute(attName, attributeValue); + } else { + registerPrefix(xmlWriter, namespace); + xmlWriter.writeAttribute(namespace, attName, attributeValue); + } + } + /** + * method to handle Qnames + */ + + private void writeQName(javax.xml.namespace.QName qname, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + java.lang.String namespaceURI = qname.getNamespaceURI(); + if (namespaceURI != null) { + java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); + if (prefix == null) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } else { + // i.e this is the default namespace + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + + } else { + xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname)); + } + } + + private void writeQNames(javax.xml.namespace.QName[] qnames, + javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { + + if (qnames != null) { + // we have to store this data until last moment since it is not possible to write any + // namespace data after writing the charactor data + java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer(); + java.lang.String namespaceURI = null; + java.lang.String prefix = null; + + for (int i = 0; i < qnames.length; i++) { + if (i > 0) { + stringToWrite.append(" "); + } + namespaceURI = qnames[i].getNamespaceURI(); + if (namespaceURI != null) { + prefix = xmlWriter.getPrefix(namespaceURI); + if ((prefix == null) || (prefix.length() == 0)) { + prefix = generatePrefix(namespaceURI); + xmlWriter.writeNamespace(prefix, namespaceURI); + xmlWriter.setPrefix(prefix,namespaceURI); + } + + if (prefix.trim().length() > 0){ + stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } else { + stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i])); + } + } + xmlWriter.writeCharacters(stringToWrite.toString()); + } + + } + + + /** + * Register a namespace prefix + */ + private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException { + java.lang.String prefix = xmlWriter.getPrefix(namespace); + if (prefix == null) { + prefix = generatePrefix(namespace); + javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext(); + while (true) { + java.lang.String uri = nsContext.getNamespaceURI(prefix); + if (uri == null || uri.length() == 0) { + break; + } + prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); + } + xmlWriter.writeNamespace(prefix, namespace); + xmlWriter.setPrefix(prefix, namespace); + } + return prefix; + } + + + + /** + * databinding method to get an XML representation of this object + * + */ + public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) + throws org.apache.axis2.databinding.ADBException{ + + + + java.util.ArrayList elementList = new java.util.ArrayList(); + java.util.ArrayList attribList = new java.util.ArrayList(); + + if (local_returnTracker){ + elementList.add(new javax.xml.namespace.QName("http://test.ws_server.splat.org", + "return")); + + elementList.add(local_return==null?null: + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return)); + } + + return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray()); + + + + } + + + + /** + * Factory class that keeps the parse method + */ + public static class Factory{ + + + + + /** + * static method to create the object + * Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable + * If this object is not an element, it is a complex type and the reader is at the event just after the outer start element + * Postcondition: If this object is an element, the reader is positioned at its end element + * If this object is a complex type, the reader is positioned at the end element of its outer element + */ + public static GetGreetingResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{ + GetGreetingResponse object = + new GetGreetingResponse(); + + int event; + java.lang.String nillableValue = null; + java.lang.String prefix =""; + java.lang.String namespaceuri =""; + try { + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + + if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){ + java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", + "type"); + if (fullTypeName!=null){ + java.lang.String nsPrefix = null; + if (fullTypeName.indexOf(":") > -1){ + nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":")); + } + nsPrefix = nsPrefix==null?"":nsPrefix; + + java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1); + + if (!"getGreetingResponse".equals(type)){ + //find namespace for the prefix + java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); + return (GetGreetingResponse)ExtensionMapper.getTypeObject( + nsUri,type,reader); + } + + + } + + + } + + + + + // Note all attributes that were handled. Used to differ normal attributes + // from anyAttributes. + java.util.Vector handledAttributes = new java.util.Vector(); + + + + + reader.next(); + + + while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); + + if (reader.isStartElement() && new javax.xml.namespace.QName("http://test.ws_server.splat.org","return").equals(reader.getName())){ + + nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"); + if (!"true".equals(nillableValue) && !"1".equals(nillableValue)){ + + + java.lang.String content = reader.getElementText(); + + object.set_return( + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); + + } else { + + + reader.getElementText(); // throw away text nodes if any. + } + + reader.next(); + + } // End of if for expected property start element + + else { + + } + + while (!reader.isStartElement() && !reader.isEndElement()) + reader.next(); + + if (reader.isStartElement()) + // A start element we are not expecting indicates a trailing invalid property + throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getName()); + + + + + } catch (javax.xml.stream.XMLStreamException e) { + throw new java.lang.Exception(e); + } + + return object; + } + + }//end of factory class + + + + } + + + private org.apache.axiom.om.OMElement toOM(org.splat.ws_client.test.HelloSimanWSStub.GetGreeting param, boolean optimizeContent) + throws org.apache.axis2.AxisFault { + + + try{ + return param.getOMElement(org.splat.ws_client.test.HelloSimanWSStub.GetGreeting.MY_QNAME, + org.apache.axiom.om.OMAbstractFactory.getOMFactory()); + } catch(org.apache.axis2.databinding.ADBException e){ + throw org.apache.axis2.AxisFault.makeFault(e); + } + + + } + + private org.apache.axiom.om.OMElement toOM(org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse param, boolean optimizeContent) + throws org.apache.axis2.AxisFault { + + + try{ + return param.getOMElement(org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse.MY_QNAME, + org.apache.axiom.om.OMAbstractFactory.getOMFactory()); + } catch(org.apache.axis2.databinding.ADBException e){ + throw org.apache.axis2.AxisFault.makeFault(e); + } + + + } + + + private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, org.splat.ws_client.test.HelloSimanWSStub.GetGreeting param, boolean optimizeContent, javax.xml.namespace.QName methodQName) + throws org.apache.axis2.AxisFault{ + + + try{ + + org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope(); + emptyEnvelope.getBody().addChild(param.getOMElement(org.splat.ws_client.test.HelloSimanWSStub.GetGreeting.MY_QNAME,factory)); + return emptyEnvelope; + } catch(org.apache.axis2.databinding.ADBException e){ + throw org.apache.axis2.AxisFault.makeFault(e); + } + + + } + + + /* methods to provide back word compatibility */ + + + + + /** + * get the default envelope + */ + private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory){ + return factory.getDefaultEnvelope(); + } + + + private java.lang.Object fromOM( + org.apache.axiom.om.OMElement param, + java.lang.Class type, + java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{ + + try { + + if (org.splat.ws_client.test.HelloSimanWSStub.GetGreeting.class.equals(type)){ + + return org.splat.ws_client.test.HelloSimanWSStub.GetGreeting.Factory.parse(param.getXMLStreamReaderWithoutCaching()); + + + } + + if (org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse.class.equals(type)){ + + return org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching()); + + + } + + } catch (java.lang.Exception e) { + throw org.apache.axis2.AxisFault.makeFault(e); + } + return null; + } + + + + + } + \ No newline at end of file diff --git a/Workspace/Siman-Stub/test/org/splat/ws_client/service/salome/SimanSalomeServiceTest.java b/Workspace/Siman-Stub/test/org/splat/ws_client/service/salome/SimanSalomeServiceTest.java new file mode 100644 index 0000000..1c74bda --- /dev/null +++ b/Workspace/Siman-Stub/test/org/splat/ws_client/service/salome/SimanSalomeServiceTest.java @@ -0,0 +1,91 @@ + + +/** + * SimanSalomeServiceTest.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: 1.6.2 Built on : Apr 17, 2012 (05:33:49 IST) + */ + package org.splat.ws_client.service.salome; + + /* + * SimanSalomeServiceTest Junit test case + */ + + public class SimanSalomeServiceTest extends junit.framework.TestCase{ + + + /** + * Auto generated test method + */ + public void testcreateConfigFile() throws java.lang.Exception{ + + org.splat.ws_client.service.salome.SimanSalomeServiceStub stub = + new org.splat.ws_client.service.salome.SimanSalomeServiceStub();//the default implementation should point to the right endpoint + + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile4= + (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.class); + // TODO : Fill in the createConfigFile4 here + + createConfigFile4.setArgs0((long)1); + createConfigFile4.setArgs1((long)2); + createConfigFile4.setArgs2((long)3); + createConfigFile4.setArgs3("d:\\"); + + + assertNotNull(stub.createConfigFile( + createConfigFile4)); + + + + + } + + /** + * Auto generated test method + */ + public void testStartcreateConfigFile() throws java.lang.Exception{ + org.splat.ws_client.service.salome.SimanSalomeServiceStub stub = new org.splat.ws_client.service.salome.SimanSalomeServiceStub(); + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile createConfigFile4= + (org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile)getTestObject(org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFile.class); + // TODO : Fill in the createConfigFile4 here + + createConfigFile4.setArgs0(11); + createConfigFile4.setArgs1(22); + createConfigFile4.setArgs2(33); + createConfigFile4.setArgs3("d:\\"); + + stub.startcreateConfigFile( + createConfigFile4, + new tempCallbackN65548() + ); + + + + } + + private class tempCallbackN65548 extends org.splat.ws_client.service.salome.SimanSalomeServiceCallbackHandler{ + public tempCallbackN65548(){ super(null);} + + public void receiveResultcreateConfigFile( + org.splat.ws_client.service.salome.SimanSalomeServiceStub.CreateConfigFileResponse result + ) { + + } + + public void receiveErrorcreateConfigFile(java.lang.Exception e) { + fail(); + } + + } + + //Create an ADBBean and provide it as the test object + public org.apache.axis2.databinding.ADBBean getTestObject(java.lang.Class type) throws java.lang.Exception{ + return (org.apache.axis2.databinding.ADBBean) type.newInstance(); + } + + + + + } + \ No newline at end of file diff --git a/Workspace/Siman-Stub/test/org/splat/ws_client/test/HelloSimanWSTest.java b/Workspace/Siman-Stub/test/org/splat/ws_client/test/HelloSimanWSTest.java new file mode 100644 index 0000000..2117b51 --- /dev/null +++ b/Workspace/Siman-Stub/test/org/splat/ws_client/test/HelloSimanWSTest.java @@ -0,0 +1,80 @@ + + +/** + * HelloSimanWSTest.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: 1.6.2 Built on : Apr 17, 2012 (05:33:49 IST) + */ + package org.splat.ws_client.test; + + /* + * HelloSimanWSTest Junit test case + */ + + public class HelloSimanWSTest extends junit.framework.TestCase{ + + + /** + * Auto generated test method + */ + public void testgetGreeting() throws java.lang.Exception { + + org.splat.ws_client.test.HelloSimanWSStub stub = new org.splat.ws_client.test.HelloSimanWSStub();// the default implementation + // should point to the right + // endpoint + + org.splat.ws_client.test.HelloSimanWSStub.GetGreeting getGreeting4 = (org.splat.ws_client.test.HelloSimanWSStub.GetGreeting) getTestObject(org.splat.ws_client.test.HelloSimanWSStub.GetGreeting.class); + // TODO : Fill in the getGreeting4 here + + String fromwhom = "junit greeting from Maria, Roman and Alexander !!!"; + getGreeting4.setName(fromwhom); + assertNotNull(stub.getGreeting(getGreeting4)); + } + + /** + * Auto generated test method + */ + public void testStartgetGreeting() throws java.lang.Exception{ + org.splat.ws_client.test.HelloSimanWSStub stub = new org.splat.ws_client.test.HelloSimanWSStub(); + org.splat.ws_client.test.HelloSimanWSStub.GetGreeting getGreeting4= + (org.splat.ws_client.test.HelloSimanWSStub.GetGreeting)getTestObject(org.splat.ws_client.test.HelloSimanWSStub.GetGreeting.class); + // TODO : Fill in the getGreeting4 here + + String fromwhom = "junit greeting from Maria, Roman and Alexander !!!"; + getGreeting4.setName(fromwhom); + + stub.startgetGreeting( + getGreeting4, + new tempCallbackN65548() + ); + + + + } + + private class tempCallbackN65548 extends org.splat.ws_client.test.HelloSimanWSCallbackHandler{ + public tempCallbackN65548(){ super(null);} + + public void receiveResultgetGreeting( + org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse result + ) { + + } + + public void receiveErrorgetGreeting(java.lang.Exception e) { + fail(); + } + + } + + //Create an ADBBean and provide it as the test object + public org.apache.axis2.databinding.ADBBean getTestObject(java.lang.Class type) throws java.lang.Exception{ + return (org.apache.axis2.databinding.ADBBean) type.newInstance(); + } + + + + + } + \ No newline at end of file diff --git a/Workspace/Siman-Stub/test/org/splat/ws_client/test/HelloSimanWSTestClient.java b/Workspace/Siman-Stub/test/org/splat/ws_client/test/HelloSimanWSTestClient.java new file mode 100644 index 0000000..4dabdd2 --- /dev/null +++ b/Workspace/Siman-Stub/test/org/splat/ws_client/test/HelloSimanWSTestClient.java @@ -0,0 +1,24 @@ +package org.splat.ws_client.test; + +import org.splat.ws_client.test.HelloSimanWSStub.GetGreeting; + +public class HelloSimanWSTestClient { + + public static void main(String[] args) throws java.lang.Exception { + + // Creating the stub + org.splat.ws_client.test.HelloSimanWSStub stub = new org.splat.ws_client.test.HelloSimanWSStub(); + + // Creating the request + org.splat.ws_client.test.HelloSimanWSStub.GetGreeting request = new org.splat.ws_client.test.HelloSimanWSStub.GetGreeting(); + + request.setName(" - test Greeting from Maria, Roman and Alexander !!!"); + + // Invoking the service + org.splat.ws_client.test.HelloSimanWSStub.GetGreetingResponse response = stub.getGreeting(request); + + System.out.println("Response : " + response.get_return()); + } +} + + \ No newline at end of file