You don't need to use RMI or JMS (if you did your web service wouldn't
comply with the WS-I).

You need to look up the 'Basic Callback' pattern by the WS-I.  

Effectively, this is how it works. 

You have a Requester and a Provider (both are Document style Web
Services).  The first step is to build a normal web service..  

The second step is where the fun starts. I will assume you have step 1
complete.

On the Provider (i.e the server end) there will be 2 WSDL's,  WSDL 1
will represent the normal service above and will be complete, WSDL 2
will represent the Callback Service of the Client and won't be complete
(it will be missing the service element which you don't need as you will
be passing across the URL in the initial normal service invocation).
This means the incomplete Client side WSDL is located on the
provider/server side.

Next you need to create the client stubs from WSDL 2 using wsdl2java.

Now you need to make the skeletons.  This is done by making a new WSDL
on the client side, which I'll call WSDL 2_Impl, importing the details
of WSDL 2 and filling in the gaps.

WSDL 2_Impl fills in the missing element (<wsdl:service>) and imports
WSDL 2 <wsdl:import> making a complete WSDL for the requester/client to
build skeletons from.

WSDL 2_Impl example.

<wsdl:definitions
  targetNamespace="http://www.xx.com/wsdl/purchaseOrder";
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
  xmlns:impl="http://www.ltree.com/wsdl/po";>

 <wsdl:import namespace="http://www.xx.com/wsdl/po";
              location="PoHandlerCallbackService.wsdl"/>

 <wsdl:service name="PoHandlerCallbackService">
    <wsdl:port binding="impl:PoHandlerCallbackServiceSoapBinding"
               name="PoHandlerCallbackPort">
      <wsdlsoap:address
 
location="http://localhost:8080/poCallbackImpl/services/PoHandlerCallbac
kService"/>
    </wsdl:port>
 </wsdl:service>
</wsdl:definitions>  


This quite difficult to explain, but I hope it made some sense. Again
check out Basic Callback pattern from the WS-I.

James


-----Original Message-----
From: Douglas Kunzman [mailto:[EMAIL PROTECTED] 
Sent: 20 January 2005 15:25
To: [EMAIL PROTECTED]
Subject: callbacks or server programming with apache axis - java version

Hi,

I am using Axis version 1.2 Java and I would like my client to be able
to
receive as well as send Soap messages.  I have the send down pretty well
and
it seems to be working fine, but I am little confused on how to do a
callback, or make it receive soap messages.  I have looked at the
TestAsyncCall.java and am a little confused on what is going on in the
application.  Can someone offer some insight. What is the easiest way to
program this.

One issue is that I am using Gsoap as my server so I cannot use RMI/JMS?
You insights would be greatly appreciated.

Thanks,

Douglas Kunzman
Sensor Systems
Work 703-437-7651 x693
Mobile 571-228-1048



----------------------------------------------------------------------------------------------
Meeting Customer Needs Exactly
 
Whether you are a Managing Agent, Lloyd's Broker or London market insurer or 
reinsurer, our Insurance Professional Services teams can meet the challenges 
that unforeseen resourcing or business requirements can present.
 
By drawing on our full range of services, short-term business problems can be 
solved quickly, project-based staffing requirements can be met efficiently and 
longer-term strategic business initiatives can be resourced effectively.
 
To find out how we can help your business, visit www.xchanging.com/xips or 
contact Paul Gilbert on 0207 972 0011.

----------------------------------------------------------------------------------------------



-----------------------------------------------------
THE INFORMATION IN THIS E-MAIL AND IN ANY ATTACHMENTS IS CONFIDENTIAL

AND MAY BE PRIVILEGED OR OTHERWISE PROTECTED FROM DISCLOSURE. 
IF YOU ARE NOT THE INTENDED RECIPIENT AND HAVE RECEIVED IT IN ERROR YOU ARE ON 
NOTICE OF ITS STATUS. 
PLEASE NOTIFY THE SENDER IMMEDIATELY BY RETURN EMAIL AND THEN DELETE THIS EMAIL 
AND ANY ATTACHMENT FROM YOUR SYSTEM. 
YOU MUST NOT RETAIN, COPY OR USE THIS E-MAIL OR ANY ATTACHMENT FOR ANY PURPOSE, 
NOR DISCLOSE ALL OR ANY PART OF ITS CONTENTS TO ANY OTHER PERSON: 

TO DO SO COULD BE A BREACH OF CONFIDENCE

EMAIL MAY BE SUSCEPTIBLE TO DATA CORRUPTION, INTERCEPTION AND UNAUTHORISED 
AMENDMENT, 
AND WE DO NOT ACCEPT LIABILITY FOR ANY SUCH CORRUPTION, INTERCEPTION OR 
AMENDMENT OR THE CONSEQUENCES THEREOF. 

WE MAY MONITOR THE CONTENT OF EMAILS SENT AND RECEIVED VIA OUR NETWORK FOR 
VIRUSES OR UNAUTHORISED USE AND FOR OTHER LAWFUL BUSINESS PURPOSES. 
WE DO NOT ACCEPT RESPONSIBILITY FOR ANY LOSS OR DAMAGE ARISING FROM A VIRUS IN 
ANY EMAIL OR ATTACHMENT.

-----------------------------------------------
[EMAIL PROTECTED]

Reply via email to