[ http://issues.apache.org/jira/browse/AXIS2-482?page=all ]
     
Deepal Jayasinghe resolved AXIS2-482:
-------------------------------------

    Fix Version: 0.95
     Resolution: Fixed

Done , now using AxisService you can creat a service for client side  , or you 
can create a service for a given java class as well

> AxisServiceBuilder API produces different operation description from what the 
> generated stub does (InOutAxisOperation vs. OutInAxisOperation)
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: AXIS2-482
>          URL: http://issues.apache.org/jira/browse/AXIS2-482
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: client-api
>     Versions: 0.94
>  Environment: Windows XP with J2SE 5
>     Reporter: Raymond Feng
>      Fix For: 0.95

>
> Here's the code I use:
>        AxisServiceBuilder builder = new AxisServiceBuilder();
>        AxisService service = builder.getAxisService( wsdl.openStream() ); // 
> wsdl is the url pointing to the WSDL file
>         _serviceClient = new ServiceClient( configurationContext, service ); 
>        QName operation= new QName( "", "getGreetings" );
>        OperationClient _operationClient = _serviceClient.createClient( 
> operation );
> I got the following exception because the operation is AxisInOutOperation 
> which doesn't implement the createClient().
> Exception in thread "main" java.lang.UnsupportedOperationException: The MEP 
> you are using (http://www.w3.org/2004/08/wsdl/in-out) has not implemented 
> createClient().
>       at 
> org.apache.axis2.description.AxisOperation.createClient(AxisOperation.java:427)
>       at 
> org.apache.axis2.client.ServiceClient.createClient(ServiceClient.java:442)
> Here's the generated stub code: (Note it creates OutInAxisOperation instead).
>     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 ) );
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to