axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Feng (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-482) AxisServiceBuilder API produces different operation description from what the generated stub does (InOutAxisOperation vs. OutInAxisOperation)
Date Fri, 03 Mar 2006 16:44:42 GMT
    [ http://issues.apache.org/jira/browse/AXIS2-482?page=comments#action_12368745 ] 

Raymond Feng commented on AXIS2-482:
------------------------------------

OK, so it's by design. I'll try your solution. Thanks.

> 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

>
> 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


Mime
View raw message