axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Dillon (ext. 944)" <Brian.Dil...@fineos.com>
Subject RE: SOAP over JMS Deploying Services
Date Wed, 12 Mar 2003 09:11:27 GMT
Hi,

The print statements don't give me any service name. 

The AxisServer is instantiated using new AxisServer() so it picks up the
server-config.wsdd in the directory it is being run from (this can be seen
to be true when I call deploy to deploy the services).

I am trying to use the RPC style, i.e. I have defined in the
server-config.wsddd ther services as
 <service name="ServiceName" provider="java:RPC">
Is there something else I should be doing ? I know that I could call
setTargetService("ServiceName") on the service side but 
that would still leave me with the problem of how to figure out what the
'ServiceName' is. I understood that the SOAP message should have the service
name, but I can't see it;

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:ServiceMethodName
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://someNamespace">
   <requestContext href="#id0"/>
  </ns1:ServiceMethodName>
  <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://namesspace"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xsi:type="ns2:param
Type">
  </multiRef>
 </soapenv:Body>
 </soapenv:Envelope>

I.e. the extract above from the SOAP message only has the ServiceMethodName
not the ServiceName ? Is there something specific I should be doing with the
org.apache.axis.client.Call object before I invoke the service ?

Thanks,

Brian

-----Original Message-----
From: beoh@wahlao.com [mailto:beoh@wahlao.com]
Sent: 12 March 2003 02:55
To: axis-user@ws.apache.org
Subject: RE: SOAP over JMS Deploying Services


A few questions ...

1. Did you manage to see the target service name to be invoked when you
did a println ?

2. How did you construct AxisServer instance at the JMS server end ?  Did
you construct the AxisServer instance with the server-config.wsdd file ?

3. Are you using RPC or Message style to invoke your service at the JMS
server end ?


> Hi,
>
> I have managed to get a SOAP message from the client to the server,
> however I get
>
> AxisFault
> faultCode: {http://xml.apache.org/axis/}Server.NoService
> faultString: The AXIS engine could not find a target service to invoke!
> targetService is null
> faultActor: null
> faultDetail:
>
> On the server side. The ProvessRequest Method looks lik;
>
>
> 	// This method is invoked when ever a new message arrives in the
> Response QUEUE.
> 	public void processRequest() {
>
> 		System.out.println("process event Executed");
> 		MessageContext msgContext = null;
> 		org.apache.axis.Message responseMsg = null;
> 		try {
> 			System.out.println(jmsMessage.getText());
> 			Queue replyQueue = (Queue)
> jmsMessage.getJMSReplyTo();
> 			sender = session.createSender(replyQueue);
>
> 			// Create a MessageContext and associate with the
> engine
> 			msgContext = new MessageContext(axisServer);
>
> 			// Wrap the incoming TextMessage into Axis Message
> 			org.apache.axis.Message soapMessage =
> 				new
> org.apache.axis.Message(jmsMessage.getText());
>
> 			System.out.println("JMS-SOAP Request:");
> 			System.out.println(jmsMessage.getText() + "\n");
>
> 			// Set the request message in MessageContext
> 			msgContext.setRequestMessage(soapMessage);
>            System.out.println(" Target Service
> "+msgContext.getTargetService());
>
> 			// Invoke
> 			axisServer.invoke(msgContext);
> 			......
>
> The SOAP Message that arrives looks ok (pasted below) to me, is there
> something else that I need to do on the service/server
> side. How does the MessageContext know when to process the SOAP message
> to get the target service.
>
> Any ideas would be creatly appreciated
>
> Thanks,
>
> Brian.
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3
> .org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
>  <ns1:FnNoParm
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns1="http://
> www.fineos.com/XMLSchema/ta">
>   <requestContext href="#id0"/>
>  </ns1:FnNoParm>
>  <multiRef id="id0" soapenc:root="0"
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns2="http://www.fineos.com/XMLSchema/ta"
>
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xsi:type="ns2:Requ
e
> stContext"><RequestContext
>
xmlns="http://www.fineos.com/XMLSchema/ta"><userDetails><name>Test</name><o
i
> d>PE:01000:0000000042</oid></userDetails><applicationDetails><name>Garage
> Client
> 3Tier(JMS)
</name><host>192.168.125.55</host></applicationDetails></RequestCo
> ntext></multiRef>
> </soapenv:Body>
> </soapenv:Envelope>
>
> -----Original Message-----
> Wrom: ZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRW
> Sent: 10 March 2003 03:21
> To: axis-user@ws.apache.org
> Subject: RE: SOAP over JMS Deploying Services
>
>
> Hi Brian,
>
> This is the code that i used at the JMS client side,
>
> Call call  = (org.apache.axis.client.Call) service.createCall();
>
> call.setProperty(JMSConstants.DESTINATION, "queue/AXIS");
> call.setProperty(JMSConstants.WAIT_FOR_RESPONSE, Boolean.FALSE);
> call.setTransport(transport);
>
> Instead of setting target end point on HTTP protocol, use setProperty()
> to set the queue name that your client will send the message to.
>
>> Oliver,
>>
>> When invoking a http service the client creates and endPoint and using
>> this sets the TargetEndpoint on the client.Call object. The endpoint I
>> was using previously was;
>> <http:// :8080/axis/services/serviceName>
>> http://localhost:8080/axis/services/serviceName
>>
>> Obviously this won't work with JMS. What format should the endPoint be
>> for JMS, or should I be creatingthe client.Call object competely
>> differently ?
>>
>>
>> Thanks,
>>
>>
>> Brian
>>
>>
>> -----Original Message-----
>> Wrom: TQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJ
>> Sent: 06 March 2003 09:01
>> To: axis-user@ws.apache.org
>> Subject: AW: SOAP over JMS Deploying Services
>>
>>
>> Hi Brian,
>> it depends if you use document style services or rpc style.
>> For document style services is no common way to specify the service to
>> which axis should dispatch the message. The doc says that a handler
>> (transport specific like the urlmapper for http) has to call the
>> setTargetService method on the messageContext object.
>> For JMS there are two ways:
>> we use a soap header to specifiy the service and a tansport specific
>> handler which extracts the servicename from the header and calls the
>> setTargetService method.
>> The second one is to use jms specific header fields.
>>
>> But both ways are not standards ! The soap spec say it's up to the
>> application.
>>
>> For rpc its straight forward (the namespace of the first body element
>> specifies the service). Have a look into the URLMapper.
>>
>> Regards
>>
>> Oliver
>>
>>
>> ____________________________________________________________________
>>
>> Oliver Adler, Senior Consultant
>> SYRACOM Systems AG - "The IT-Architects"
>>
>> Otto-von-Guericke-Ring 15
>> D-65205 Wiesbaden
>>
>> Tel +49 6122-9176-0
>> Fax +49 6122-9176-11
>> Mobil +49 175-1853998
>>
>> E-Mail: Oliver.Adler@SYRACOM.de
>> <www.SYRACOM.de>
>>
>> Ein Unternehmen der SYRACOM Gruppe - "The Business- & IT-Architects"
>>
>> ____________________________________________________________________
>>
>> -----Urspr√ľngliche Nachricht-----
>> Von: Brian Dillon (ext. 944) [mailto:Brian.Dillon@fineos.com]
>> Gesendet: Do 06.03.2003 9.43 Uhr
>> An: 'axis-user@ws.apache.org'
>> Cc:
>> Betreff: SOAP over JMS Deploying Services
>>
>>
>> Hi,
>>
>> In order to get a SOAP service working with JMS I need to create a JMS
>> listener which initialises an AxisServer and then calls invoke witht
>> the JMS message wrapped in an Axis message. Is this correct ? How do I
>> then deploy a SOAP service so that this AxisServer knows where to
>> route the message to ? With HTTP soap services I call
>> "axis.AdminClient deploy ..." and the server-config.wsdd is updated
>> (via the axis
>> servlet). Is there an equivalent for deploying SOAP servies over JMS ?
>>
>> Thanks,
>>
>> Brian
>>
>>
>>
>>
>>
**************************************************************************
>> The information contained in this e-mail is confidential,
>> may be privileged and is intended only for the use of the
>> recipient named above. If you are not the intended
>> recipient or a representative of the intended recipient,
>> you have received this e-mail in error and must not copy,
>> use or disclose the contents of this email to anybody
>> else. If you have received this e-mail in error, please
>> notify the sender immediately by return e-mail and
>> permanently delete the copy you received. This email has
>> been swept for computer viruses. However, you should
>> carry out your own virus checks.
>>
>>
>> Registered in Ireland, No. 205721. http://www.FINEOS.com
>>
**************************************************************************



Mime
View raw message