Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: renamed iona->mycompany

...

Code Block
titleExample4:Interface with the @WebService Annotation
package com.ionamycompany.demo;

import javax.jws.*;

@WebService(name="quoteUpdater",
            targetNamespace="http://cxf.apache.org",
            wsdlLocation="http://somewhere.com/quoteExampleService?wsdl")
public interface QuoteReporter
{
  public Quote getQuote(@WebParam(name="ticker") String ticker);
}

...

Code Block
titleExample7:SEI with Annotated Methods
package org.apache.cxf;

import javax.jws.*;
import javax.xml.ws.*;

@WebService(name="quoteReporter")
public interface QuoteReporter
{
  @WebMethod(operationName="getStockQuote")
  @RequestWrapper(targetNamespace="http://demo.ionamycompany.com/types",
                  className="java.lang.String")
  @ResponseWrapper(targetNamespace="http://demo.ionamycompany.com/types",
                   className="org.eric.demo.Quote")
  public Quote getQuote(String ticker);
}

...

Code Block
titleExample8:Fully Annotated SEI
package org.apache.cxf;

import javax.jws.*;
import javax.xml.ws.*;
import javax.jws.soap.*;
import javax.jws.soap.SOAPBinding.*;
import javax.jws.WebParam.*;

@WebService(name="quoteReporter")
@SOAPBinding(style=Style.RPC, use=Use.LITERAL)
public interface QuoteReporter
{
  @WebMethod(operationName="getStockQuote")
  @RequestWrapper(targetNamespace="http://demo.ionamycompany.com/types",
                  className="java.lang.String")
  @ResponseWrapper(targetNamespace="http://demo.ionamycompany.com/types",
                   className="org.eric.demo.Quote")
  @WebResult(targetNamespace="http://demo.ionamycompany.com/types",
             name="updatedQuote")
  public Quote getQuote(
                        @WebParam(targetNamespace="http://demo.ionamycompany.com/types",
                                  name="stockTicker",
                                  mode=Mode.IN)
                        String ticker
  );
}

...