Petals-SE-JSR181

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (1)

View Page History
}
}{code}

The main annotations you may use are :
* The *@WebService* annotation is mandatory and is used by the Axis2 engine to build the service. You can specialize the service name, target namespace and more with the annotation parameter.
* The *@WebMethod* annotation is used to delare the that the method will be see as a JBI operation. You can specialize the operation name and more with the annotation parameters.

More information is available on the Apache Axis2 page : [http://ws.apache.org/axis2/|http://ws.apache.org/axis2/] .

Before sending the JBI message to the Axis2 service, the JBI Service Engine will check if :
* If the requested operation exists. If not, an error will be returned in the JBI message exchange.
* The JBI Message Exchange Pattern (MEP) is compatible with the target operation. For example, in the previous code snippet, an InOut MEP is not compatible with the 'voidvoid' operation and an error will be returned in the JBI message exchange.

With the previous code samples, you can now call the _{http://petals.ow2.org/helloworld}HelloworldService_ and operation _sayHello_ with an InOut MEP with a JBI message payload like :
{code:lang=xml}<sayHello>
<param0>Hey!!!</param0>
</sayHello>
{code}
and you will get a response like :
{code:lang=xml}<dlwmin:sayHelloResponse
xmlns:dlwmin="http://petals.ow2.org"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<return>You say me Hey!!!</return>
</dlwmin:sayHelloResponse>
{code}