You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by The Hoa Nguyen <ng...@yahoo.com> on 2005/08/09 12:10:49 UTC
how to implement an Axis Message-Style service that has multiple operations
Hi all,
If anyone know how to implement an Axis Message-Style service that has multiple operations, please share me your experience.
E.g, the sample Message-style service from the Axis pack, has the following WSDD:
<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
<!-- note that either style="message" OR provider="java:MSG" both work -->
<service name="MessageService" style="message">
<parameter name="className" value="samples.message.MessageService" />
<parameter name="allowedMethods" value="echoElements" />
</service>
<service name="MessageService2" style="message">
<parameter name="className" value="samples.message.MessageService" />
<parameter name="allowedMethods" value="process" />
</service>
</deployment>
With this WSDD, I need two wsdl files to publish the service, because the soap locations are different:
http://localhost:8080/axis/services/MessageService
http://localhost:8080/axis/services/MessageService2
I have tried to change the interface to:
<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
<!-- note that either style="message" OR provider="java:MSG" both work -->
<service name="MessageService" style="message">
<parameter name="className" value="samples.message.MessageService" />
<parameter name="allowedMethods" value="echoElements, process" />
</service>
</deployment>
With that, I can use one wsdl file to publish the service, but then I have problem with the Axis service. From the client, I tried many solution to invoke the service's operation, but always received exception from the Axis server:
.....
[java] AxisFault
[java] faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
[java] faultSubcode:
[java] faultString: Couldn't find an appropriate operation for XML QName {urn:foo}e1
[java] faultActor:
[java] faultNode:
[java] faultDetail:
[java] {http://xml.apache.org/axis/}hostname:h-pctnn
Exception:
......
If somebody know how to solve the problem, please help me.
Thank you very much!
The Hoa
---------------------------------
Start your day with Yahoo! - make it your home page
Re: how to implement an Axis Message-Style service that has multiple operations
Posted by The Hoa Nguyen <ng...@yahoo.com>.
Thanks Anne,
But I wonder why the Axis does not leverage other attributes, such as soapAction to map to the service's operation, especially for the Message-style services. This allows us to freely choose xml message types for our service, instead of having to apply the fixed xml message with root element: <an xmlns:method name>.
I may post a request to the axis developer mailing list, for the feature.
But if somebody has post the similar request, please let me know.
Thanks,
The Hoa
Anne Thomas Manes <at...@gmail.com> wrote:
You also need to provide descriptions to map the message
QNames to the appropriate method name.
Anne
On 8/9/05, The Hoa Nguyen wrote:
>
> Hi all,
>
> If anyone know how to implement an Axis Message-Style service that has
> multiple operations, please share me your experience.
>
> E.g, the sample Message-style service from the Axis pack, has the following
> WSDD:
>
> > xmlns="http://xml.apache.org/axis/wsdd/"
>
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
>
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
>
>
>
>
>
>
>
>
>
>
>
> With this WSDD, I need two wsdl files to publish the service, because the
> soap locations are different:
> http://localhost:8080/axis/services/MessageService
> http://localhost:8080/axis/services/MessageService2
>
> I have tried to change the interface to:
>
> > xmlns="http://xml.apache.org/axis/wsdd/"
>
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
>
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
>
>
>
>
>
>
>
> With that, I can use one wsdl file to publish the service, but then I have
> problem with the Axis service. From the client, I tried many solution to
> invoke the service's operation, but always received exception from the Axis
> server:
> .....
> [java] AxisFault
> [java] faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> [java] faultSubcode:
> [java] faultString: Couldn't find an appropriate operation for XML
> QName {urn:foo}e1
> [java] faultActor:
> [java] faultNode:
> [java] faultDetail:
> [java]
> {http://xml.apache.org/axis/}hostname:h-pctnn
>
> Exception:
> ......
>
> If somebody know how to solve the problem, please help me.
>
>
> Thank you very much!
> The Hoa
>
> ________________________________
> Start your day with Yahoo! - make it your home page
>
>
---------------------------------
Start your day with Yahoo! - make it your home page
Re: how to implement an Axis Message-Style service that has multiple operations
Posted by Anne Thomas Manes <at...@gmail.com>.
You also need to provide <operation> descriptions to map the message
QNames to the appropriate method name.
Anne
On 8/9/05, The Hoa Nguyen <ng...@yahoo.com> wrote:
>
> Hi all,
>
> If anyone know how to implement an Axis Message-Style service that has
> multiple operations, please share me your experience.
>
> E.g, the sample Message-style service from the Axis pack, has the following
> WSDD:
>
> <deployment name="test"
> xmlns="http://xml.apache.org/axis/wsdd/"
>
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
>
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
> <!-- note that either style="message" OR provider="java:MSG" both work -->
> <service name="MessageService" style="message">
> <parameter name="className" value="samples.message.MessageService" />
> <parameter name="allowedMethods" value="echoElements" />
> </service>
> <service name="MessageService2" style="message">
> <parameter name="className" value="samples.message.MessageService" />
> <parameter name="allowedMethods" value="process" />
> </service>
> </deployment>
>
> With this WSDD, I need two wsdl files to publish the service, because the
> soap locations are different:
> http://localhost:8080/axis/services/MessageService
> http://localhost:8080/axis/services/MessageService2
>
> I have tried to change the interface to:
>
> <deployment name="test"
> xmlns="http://xml.apache.org/axis/wsdd/"
>
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
>
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
> <!-- note that either style="message" OR provider="java:MSG" both work -->
> <service name="MessageService" style="message">
> <parameter name="className" value="samples.message.MessageService" />
> <parameter name="allowedMethods" value="echoElements, process" />
> </service>
> </deployment>
>
> With that, I can use one wsdl file to publish the service, but then I have
> problem with the Axis service. From the client, I tried many solution to
> invoke the service's operation, but always received exception from the Axis
> server:
> .....
> [java] AxisFault
> [java] faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> [java] faultSubcode:
> [java] faultString: Couldn't find an appropriate operation for XML
> QName {urn:foo}e1
> [java] faultActor:
> [java] faultNode:
> [java] faultDetail:
> [java]
> {http://xml.apache.org/axis/}hostname:h-pctnn
>
> Exception:
> ......
>
> If somebody know how to solve the problem, please help me.
>
>
> Thank you very much!
> The Hoa
>
> ________________________________
> Start your day with Yahoo! - make it your home page
>
>