diff options
Diffstat (limited to 'tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany')
6 files changed, 0 insertions, 668 deletions
diff --git a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java b/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java deleted file mode 100644 index a7c332f9e7..0000000000 --- a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetings.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * GetGreetings.java This file was auto-generated from WSDL by the Apache Axis2 - * version: #axisVersion# #today# - */ -package org.apache.tuscany.samples.helloworldaxis; - -/** - * GetGreetings bean class - */ -public class GetGreetings implements org.apache.axis2.databinding.ADBBean { - public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org", - "getGreetings", "ns1"); - - /** field for In0 */ - private java.lang.String localIn0; - - /** - * Auto generated getter method - * - * @return java.lang.String - */ - public java.lang.String getIn0() { - return localIn0; - } - - /** - * Auto generated setter method - * - * @param param In0 - */ - public void setIn0(java.lang.String param) { - this.localIn0 = param; - } - - /** - * databinding method to get an XML representation of this object - */ - public javax.xml.stream.XMLStreamReader getPullParser( - javax.xml.namespace.QName qName) { - java.util.ArrayList elementList = new java.util.ArrayList(); - java.util.ArrayList attribList = new java.util.ArrayList(); - - elementList.add(new javax.xml.namespace.QName( - "http://helloworldaxis.samples.tuscany.apache.org", "in0")); - elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( - localIn0)); - - return org.apache.axis2.databinding.utils.ADBPullParser.createPullParser(qName, - elementList.toArray(), attribList.toArray()); - } - - /** - * static method to create the object Note - This is not complete - */ - public static GetGreetings parse(javax.xml.stream.XMLStreamReader reader) - throws java.lang.Exception { - GetGreetings object = new GetGreetings(); - - try { - int event = reader.getEventType(); - int count = 0; - int argumentCount = 1; - boolean done = false; - - //event better be a START_ELEMENT. if not we should go up to the start element here - while (!reader.isStartElement()) { - event = reader.next(); - } - - while (!done) { - if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event) { - if ("in0".equals(reader.getLocalName())) { - String content = reader.getElementText(); - object.setIn0(org.apache.axis2.databinding.utils.ConverterUtil.convertTostring( - content)); - count++; - } - } - - if (argumentCount == count) { - done = true; - } - - if (!done) { - event = reader.next(); - } - } - } catch (javax.xml.stream.XMLStreamException e) { - throw new java.lang.Exception(e); - } - - return object; - } -} diff --git a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java b/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java deleted file mode 100644 index 8cee6c1e93..0000000000 --- a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/GetGreetingsResponse.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * GetGreetingsResponse.java This file was auto-generated from WSDL by the - * Apache Axis2 version: #axisVersion# #today# - */ -package org.apache.tuscany.samples.helloworldaxis; - -/** - * GetGreetingsResponse bean class - */ -public class GetGreetingsResponse - implements org.apache.axis2.databinding.ADBBean { - public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://helloworldaxis.samples.tuscany.apache.org", - "getGreetingsResponse", "ns1"); - - /** field for GetGreetingsReturn */ - private java.lang.String localGetGreetingsReturn; - - /** - * Auto generated getter method - * - * @return java.lang.String - */ - public java.lang.String getGetGreetingsReturn() { - return localGetGreetingsReturn; - } - - /** - * Auto generated setter method - * - * @param param GetGreetingsReturn - */ - public void setGetGreetingsReturn(java.lang.String param) { - this.localGetGreetingsReturn = param; - } - - /** - * databinding method to get an XML representation of this object - */ - public javax.xml.stream.XMLStreamReader getPullParser( - javax.xml.namespace.QName qName) { - java.util.ArrayList elementList = new java.util.ArrayList(); - java.util.ArrayList attribList = new java.util.ArrayList(); - - elementList.add(new javax.xml.namespace.QName( - "http://helloworldaxis.samples.tuscany.apache.org", - "getGreetingsReturn")); - elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( - localGetGreetingsReturn)); - - return org.apache.axis2.databinding.utils.ADBPullParser.createPullParser(qName, - elementList.toArray(), attribList.toArray()); - } - - /** - * static method to create the object Note - This is not complete - */ - public static GetGreetingsResponse parse( - javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { - GetGreetingsResponse object = new GetGreetingsResponse(); - - try { - int event = reader.getEventType(); - int count = 0; - int argumentCount = 1; - boolean done = false; - - //event better be a START_ELEMENT. if not we should go up to the start element here - while (!reader.isStartElement()) { - event = reader.next(); - } - - while (!done) { - if (javax.xml.stream.XMLStreamConstants.START_ELEMENT == event) { - if ("getGreetingsReturn".equals(reader.getLocalName())) { - String content = reader.getElementText(); - object.setGetGreetingsReturn(org.apache.axis2.databinding.utils.ConverterUtil.convertTostring( - content)); - count++; - } - } - - if (argumentCount == count) { - done = true; - } - - if (!done) { - event = reader.next(); - } - } - } catch (javax.xml.stream.XMLStreamException e) { - throw new java.lang.Exception(e); - } - - return object; - } -} diff --git a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplCallbackHandler.java b/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplCallbackHandler.java deleted file mode 100644 index ee30587946..0000000000 --- a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplCallbackHandler.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * HelloWorldServiceImplCallbackHandler.java This file was auto-generated from - * WSDL by the Apache Axis2 version: 0.94-SNAPSHOT Jan 10, 2006 (10:21:58 LKT) - */ -package org.apache.tuscany.samples.helloworldaxis; - -/** - * HelloWorldServiceImplCallbackHandler Callback class - */ -public abstract class HelloWorldServiceImplCallbackHandler { - private Object clientData; - - /** - * User can pass in any object that needs to be accessed once the - * NonBlocking Web service call is finished and appropreate 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 HelloWorldServiceImplCallbackHandler(Object clientData) { - this.clientData = clientData; - } - - /** - * auto generated Axis2 call back method for getGreetings method - */ - public void receiveResultgetGreetings( - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param9) { - //Fill here with the code to handle the response - } - - /** - * auto generated Axis2 Error handler - */ - public void receiveErrorgetGreetings(java.lang.Exception e) { - //Fill here with the code to handle the exception - } -} diff --git a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplMessageReceiver.java b/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplMessageReceiver.java deleted file mode 100644 index 90e9af80b2..0000000000 --- a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplMessageReceiver.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * HelloWorldServiceImplMessageReceiver.java This file was auto-generated from - * WSDL by the Apache Axis2 version: 0.94-SNAPSHOT Jan 10, 2006 (10:21:58 LKT) - */ -package org.apache.tuscany.samples.helloworldaxis; - -/** - * HelloWorldServiceImplMessageReceiver message receiver - */ -public class HelloWorldServiceImplMessageReceiver - extends org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver { - public void invokeBusinessLogic( - org.apache.axis2.context.MessageContext msgContext, - org.apache.axis2.context.MessageContext newMsgContext) - throws org.apache.axis2.AxisFault { - try { - // get the implementation class for the Web Service - Object obj = getTheImplementationObject(msgContext); - - //Inject the Message Context if it is asked for - org.apache.axis2.engine.DependencyManager.configureBusinessLogicProvider(obj, - msgContext, newMsgContext); - - HelloWorldServiceImplSkeleton skel = (HelloWorldServiceImplSkeleton) obj; - - //Out Envelop - org.apache.axis2.soap.SOAPEnvelope envelope = null; - - //Find the axisOperation that has been set by the Dispatch phase. - org.apache.axis2.description.AxisOperation op = msgContext.getOperationContext() - .getAxisOperation(); - - if (op == null) { - throw new org.apache.axis2.AxisFault( - "Operation is not located, if this is doclit style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider"); - } - - String methodName; - - if ((op.getName() != null) & - ((methodName = op.getName().getLocalPart()) != null)) { - if ("getGreetings".equals(methodName)) { - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param5 = - null; - - //doc style - param5 = skel.getGreetings((org.apache.tuscany.samples.helloworldaxis.GetGreetings) fromOM( - msgContext.getEnvelope().getBody() - .getFirstElement(), - org.apache.tuscany.samples.helloworldaxis.GetGreetings.class)); - - envelope = toEnvelope(getSOAPFactory(msgContext), param5); - } - - newMsgContext.setEnvelope(envelope); - } - } catch (Exception e) { - throw org.apache.axis2.AxisFault.makeFault(e); - } - } - - // - private org.apache.axis2.om.OMElement toOM( - org.apache.tuscany.samples.helloworldaxis.GetGreetings param) { - if (param instanceof org.apache.axis2.databinding.ADBBean) { - org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder = new org.apache.axis2.om.impl.llom.builder.StAXOMBuilder(org.apache.axis2.om.OMAbstractFactory.getOMFactory(), - param.getPullParser( - org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME)); - org.apache.axis2.om.OMElement documentElement = builder.getDocumentElement(); - ((org.apache.axis2.om.impl.OMNodeEx) documentElement).setParent(null); // remove the parent link - - return documentElement; - } else { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private org.apache.axis2.soap.SOAPEnvelope toEnvelope( - org.apache.axis2.soap.SOAPFactory factory, - org.apache.tuscany.samples.helloworldaxis.GetGreetings param) { - if (param instanceof org.apache.axis2.databinding.ADBBean) { - org.apache.axis2.databinding.ADBSOAPModelBuilder builder = new org.apache.axis2.databinding.ADBSOAPModelBuilder(param.getPullParser( - org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME), - factory); - - return builder.getEnvelope(); - } else { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private org.apache.axis2.om.OMElement toOM( - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param) { - if (param instanceof org.apache.axis2.databinding.ADBBean) { - org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder = new org.apache.axis2.om.impl.llom.builder.StAXOMBuilder(org.apache.axis2.om.OMAbstractFactory.getOMFactory(), - param.getPullParser( - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME)); - org.apache.axis2.om.OMElement documentElement = builder.getDocumentElement(); - ((org.apache.axis2.om.impl.OMNodeEx) documentElement).setParent(null); // remove the parent link - - return documentElement; - } else { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private org.apache.axis2.soap.SOAPEnvelope toEnvelope( - org.apache.axis2.soap.SOAPFactory factory, - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param) { - if (param instanceof org.apache.axis2.databinding.ADBBean) { - org.apache.axis2.databinding.ADBSOAPModelBuilder builder = new org.apache.axis2.databinding.ADBSOAPModelBuilder(param.getPullParser( - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME), - factory); - - return builder.getEnvelope(); - } else { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private java.lang.Object fromOM(org.apache.axis2.om.OMElement param, - java.lang.Class type) { - Object obj; - - try { - java.lang.reflect.Method parseMethod = type.getMethod("parse", - new Class[] { javax.xml.stream.XMLStreamReader.class }); - obj = null; - - if (parseMethod != null) { - obj = parseMethod.invoke(null, - new Object[] { param.getXMLStreamReaderWithoutCaching() }); - } else { - //oops! we don't know how to deal with this. Perhaps the reflective one is a good choice here - } - } catch (Exception e) { - throw new RuntimeException(e); - } - - return obj; - } -} diff --git a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java b/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java deleted file mode 100644 index 7796e08873..0000000000 --- a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplSkeleton.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * HelloWorldServiceImplSkeleton.java This file was auto-generated from WSDL by - * the Apache Axis2 version: 0.94-SNAPSHOT Jan 10, 2006 (10:21:58 LKT) - */ -package org.apache.tuscany.samples.helloworldaxis; - -/** - * HelloWorldServiceImplSkeleton java skeleton for the axisService - */ -public class HelloWorldServiceImplSkeleton -{ - /** - * Auto generated method signature - * - * @param greetings - */ - public org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse getGreetings( - org.apache.tuscany.samples.helloworldaxis.GetGreetings greetings ) - { - GetGreetingsResponse response = new GetGreetingsResponse(); - response.setGetGreetingsReturn( "Greeting: " + greetings.getIn0() ); - return response; - } -} diff --git a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java b/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java deleted file mode 100644 index 440a5aa36f..0000000000 --- a/tags/java-stable-20060304/samples/helloworld/helloworldaxis2/src/main/java/org/apache/tuscany/samples/helloworldaxis/HelloWorldServiceImplStub.java +++ /dev/null @@ -1,269 +0,0 @@ -/** - * HelloWorldServiceImplStub.java This file was auto-generated from WSDL by the - * Apache Axis2 version: 0.94-SNAPSHOT Jan 10, 2006 (10:21:58 LKT) - */ -package org.apache.tuscany.samples.helloworldaxis; - -/* - * HelloWorldServiceImplStub java implementation - */ -public class HelloWorldServiceImplStub - extends org.apache.axis2.client.Stub -{ - //default axis home being null forces the system to pick up the mars from the axis2 library - public static final String AXIS2_HOME = null; - - protected static org.apache.axis2.description.AxisOperation[] _operations; - - static - { - //creating the Service - _service = new org.apache.axis2.description.AxisService( "HelloWorldServiceImpl" ); - - //creating the operations - org.apache.axis2.description.AxisOperation __operation; - _operations = new org.apache.axis2.description.OutInAxisOperation[1]; - - __operation = new org.apache.axis2.description.OutInAxisOperation(); - __operation.setName( new javax.xml.namespace.QName( "http://helloworldaxis.samples.tuscany.apache.org", - "getGreetings" ) ); - _operations[0] = __operation; - _service.addOperation( __operation ); - } - - public HelloWorldServiceImplStub( org.apache.axis2.context.ConfigurationContext configurationContext, - String targetEndpoint ) - throws java.lang.Exception - { - _serviceClient = new org.apache.axis2.client.ServiceClient( configurationContext, _service ); - _serviceClient.getOptions().setTo( new org.apache.axis2.addressing.EndpointReference( targetEndpoint ) ); - } - - /** - * Default Constructor - */ - public HelloWorldServiceImplStub() - throws java.lang.Exception - { - this( "http://localhost:8080/axis2/services/HelloWorldServiceImplService" ); - } - - /** - * Constructor taking the traget endpoint - */ - public HelloWorldServiceImplStub( String targetEndpoint ) - throws java.lang.Exception - { - this( new org.apache.axis2.context.ConfigurationContextFactory() - .createConfigurationContextFromFileSystem( AXIS2_HOME ), targetEndpoint ); - } - - /** - * Auto generated method signature - * - * @param param10 - * - * @see org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl#getGreetings - */ - public org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse getGreetings( - org.apache.tuscany.samples.helloworldaxis.GetGreetings param10 ) - throws java.rmi.RemoteException - { - org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient( _operations[0] - .getName() ); - _operationClient.getOptions().setSoapAction( "" ); - _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault( true ); - - // create SOAP envelope with that payload - org.apache.axis2.soap.SOAPEnvelope env = null; - - //Style is Doc. - env = toEnvelope( getFactory( _options.getSoapVersionURI() ), param10 ); - - // create message context with that soap envelope - org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext(); - _messageContext.setEnvelope( env ); - - // add the message contxt to the operation client - _operationClient.addMessageContext( _messageContext ); - - //set the options hierarchy - _options.setParent( _operationClient.getOptions() ); - _operationClient.setOptions( _options ); - - //execute the operation client - _operationClient.execute( true ); - - org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient - .getMessageContext( org.apache.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE ); - org.apache.axis2.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope(); - - java.lang.Object object = fromOM( getElement( _returnEnv, "doc" ), - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.class ); - - return (org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse) object; - } - - /** - * Auto generated method signature for Asynchronous Invocations - * - * @param param10 - * - * @see org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl#startgetGreetings - */ - public void startgetGreetings( - org.apache.tuscany.samples.helloworldaxis.GetGreetings param10, - final org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImplCallbackHandler callback ) - throws java.rmi.RemoteException - { - org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient( _operations[0] - .getName() ); - _operationClient.getOptions().setSoapAction( "" ); - _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault( true ); - - // create SOAP envelope with that payload - org.apache.axis2.soap.SOAPEnvelope env; - - //Style is Doc. - env = toEnvelope( getFactory( _options.getSoapVersionURI() ), param10 ); - - // create message context with that soap envelope - org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext(); - _messageContext.setEnvelope( env ); - - // add the message contxt to the operation client - _operationClient.addMessageContext( _messageContext ); - - //set the options hierarchy - _options.setParent( _operationClient.getOptions() ); - _operationClient.setOptions( _options ); - - _operationClient.setCallback( new org.apache.axis2.client.async.Callback() - { - public void onComplete( org.apache.axis2.client.async.AsyncResult result ) - { - java.lang.Object object = fromOM( getElement( result.getResponseEnvelope(), "doc" ), - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.class ); - callback - .receiveResultgetGreetings( (org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse) object ); - } - - public void onError( java.lang.Exception e ) - { - callback.receiveErrorgetGreetings( e ); - } - } ); - - //execute the operation client - _operationClient.execute( true ); - } - - //http://localhost:8080/axis2/services/HelloWorldServiceImplService - private org.apache.axis2.om.OMElement toOM( org.apache.tuscany.samples.helloworldaxis.GetGreetings param ) - { - if ( param instanceof org.apache.axis2.databinding.ADBBean ) - { - org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder = new org.apache.axis2.om.impl.llom.builder.StAXOMBuilder( - org.apache.axis2.om.OMAbstractFactory - .getOMFactory(), - param - .getPullParser( org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME ) ); - org.apache.axis2.om.OMElement documentElement = builder.getDocumentElement(); - ( (org.apache.axis2.om.impl.OMNodeEx) documentElement ).setParent( null ); // remove the parent link - - return documentElement; - } - else - { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private org.apache.axis2.soap.SOAPEnvelope toEnvelope( org.apache.axis2.soap.SOAPFactory factory, - org.apache.tuscany.samples.helloworldaxis.GetGreetings param ) - { - if ( param instanceof org.apache.axis2.databinding.ADBBean ) - { - org.apache.axis2.databinding.ADBSOAPModelBuilder builder = new org.apache.axis2.databinding.ADBSOAPModelBuilder( - param - .getPullParser( org.apache.tuscany.samples.helloworldaxis.GetGreetings.MY_QNAME ), - factory ); - - return builder.getEnvelope(); - } - else - { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private org.apache.axis2.om.OMElement toOM( org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param ) - { - if ( param instanceof org.apache.axis2.databinding.ADBBean ) - { - org.apache.axis2.om.impl.llom.builder.StAXOMBuilder builder = new org.apache.axis2.om.impl.llom.builder.StAXOMBuilder( - org.apache.axis2.om.OMAbstractFactory - .getOMFactory(), - param - .getPullParser( org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME ) ); - org.apache.axis2.om.OMElement documentElement = builder.getDocumentElement(); - ( (org.apache.axis2.om.impl.OMNodeEx) documentElement ).setParent( null ); // remove the parent link - - return documentElement; - } - else - { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private org.apache.axis2.soap.SOAPEnvelope toEnvelope( - org.apache.axis2.soap.SOAPFactory factory, - org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse param ) - { - if ( param instanceof org.apache.axis2.databinding.ADBBean ) - { - org.apache.axis2.databinding.ADBSOAPModelBuilder builder = new org.apache.axis2.databinding.ADBSOAPModelBuilder( - param - .getPullParser( org.apache.tuscany.samples.helloworldaxis.GetGreetingsResponse.MY_QNAME ), - factory ); - - return builder.getEnvelope(); - } - else - { - //todo finish this onece the bean serializer has the necessary methods - return null; - } - } - - private java.lang.Object fromOM( org.apache.axis2.om.OMElement param, java.lang.Class type ) - { - Object obj; - - try - { - java.lang.reflect.Method parseMethod = type - .getMethod( "parse", new Class[] { javax.xml.stream.XMLStreamReader.class } ); - obj = null; - - if ( parseMethod != null ) - { - obj = parseMethod.invoke( null, new Object[] { param.getXMLStreamReaderWithoutCaching() } ); - } - else - { - //oops! we don't know how to deal with this. Perhaps the reflective one is a good choice here - } - } - catch ( Exception e ) - { - throw new RuntimeException( e ); - } - - return obj; - } -} |