Return-Path: Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 71122 invoked from network); 3 Jun 2002 08:25:45 -0000 Received: from unknown (HELO mail.smarttrust.com) (213.212.5.232) by daedalus.apache.org with SMTP; 3 Jun 2002 08:25:45 -0000 Received: from sek43.smarttrust.com ([172.16.0.43]) by mail.smarttrust.com with Microsoft SMTPSVC(5.0.2195.2966); Mon, 3 Jun 2002 10:25:56 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C20AD8.48570C0A" Subject: one-way notification in Axis? Date: Mon, 3 Jun 2002 10:25:56 +0200 Message-ID: <9FDB8384D47CEB40A28B49463F23B7EF1995A1@sek43.smarttrust.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: one-way notification in Axis? Thread-Index: AcIK2EgFlrmBCxcmR3GatYpWtT5JRQ== From: =?iso-8859-1?Q?Jesper_S=F6derlund?= To: X-OriginalArrivalTime: 03 Jun 2002 08:25:56.0568 (UTC) FILETIME=[4884ED80:01C20AD8] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C20AD8.48570C0A Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I tried to use invokeOneWay to send a callback notification to a client = without expecting any reply but Axis replies with: "SaxException: The = document's root element could not be found" . =20 This comes from the HTTP-reply message doesn't contain any message at = all since it's a pure "notification" and not a "SolicitResponse" style = of interaction. I guess that axis is looking for a SOAP-envelop. Is = there a way around this limitation and make it a "pure" notification. =20 The code I'm using to invoke the callback notification looks like this: =20 Service service =3D new Service(); Call call =3D (Call) service.createCall(); =20 call.setTargetEndpointAddress( myCallback.getUrl() ); call.setOperationName( new QName("testnamespace", = "Notification") ); call.addParameter( "result", XMLType.XSD_STRING, = ParameterMode.IN); call.addParameter("transactionId", XMLType.XSD_STRING, = ParameterMode.IN); call.setReturnType( XMLType.AXIS_VOID ); =20 call.invokeOneWay(new Object[] { "success", = myCallback.getTransactionId()} ); =20 The "log" from tcpmon looks like the following: Request: POST /myservice/callbacklistener HTTP/1.0 Content-Length: 681 Host: localhost Content-Type: text/xml; charset=3Dutf-8 SOAPAction: "" =20 " = xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/ = " = xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema = " = xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance = " = xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encoding/ = "> "> org.apache.axis.message.RPCParam@fefe3f org.apache.axis.message.RPCParam@e61a35 =20 Response: HTTP/1.1 200 OK Content-Length: 0 Date: Mon, 03 Jun 2002 08:03:17 GMT Server: Apache Tomcat/4.0.2 (HTTP/1.1 Connector) =20 (invoking the service with "invoke(new Object[] {"astring", "2destring"} = );" got rid of the object references, so that also seems to be a "bug" = in invokeOneWay, otherwise the same problems. =20 It would be great if someone had any insight into this. =20 /Jesper ------_=_NextPart_001_01C20AD8.48570C0A Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
I = tried to use=20 invokeOneWay to send a callback notification to a client without = expecting any=20 reply but Axis replies with: "SaxException: The document's root element = could=20 not be found" .
 
This = comes from the=20 HTTP-reply message doesn't contain any message at all since it's a pure=20 "notification" and not a "SolicitResponse" style of interaction. I guess = that=20 axis is looking for a SOAP-envelop. Is there a way around this = limitation and=20 make it a "pure" notification.
 
The = code I'm using=20 to invoke the callback notification looks like this:
 
        Service  = service =3D=20 new Service();
       =20 Call     call    =3D (Call)=20 service.createCall();
 
        = call.setTargetEndpointAddress(=20 myCallback.getUrl() );
       =20 call.setOperationName( new QName("testnamespace", "Notification")=20 );
        call.addParameter( = "result",=20 XMLType.XSD_STRING,=20 ParameterMode.IN);
       =20 call.addParameter("transactionId", XMLType.XSD_STRING,=20 ParameterMode.IN);
       =20 call.setReturnType( XMLType.AXIS_VOID );
 
        = call.invokeOneWay(new Object[]=20 { "success", myCallback.getTransactionId()} );
 
The = "log" from=20 tcpmon looks like the following:
Request:
POST=20 /myservice/callbacklistener HTTP/1.0
Content-Length: 681
Host:=20 localhost
Content-Type: text/xml; charset=3Dutf-8
SOAPAction:=20 ""
 
<?xml=20 version=3D"1.0" encoding=3D"UTF-8"?>
<SOAP-ENV:Envelope=20 SOAP-ENV:encodingStyle=3D"
http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body>
 =20 <ns1:Notification xmlns:ns1=3D"testnamespace">
   <result=20 xsi:type=3D"xsd:string">org.apache.axis.message.RPCParam@fefe3f</re= sult>
  =20 <transactionId=20 xsi:type=3D"xsd:string">org.apache.axis.message.RPCParam@e61a35</tr= ansactionId>
 =20 </ns1:Notification>
 </SOAP-ENV:Body>
</SOAP-EN= V:Envelope>
 
Response:
HTTP/1.1 200=20 OK
Content-Length: 0
Date: Mon,=20 03 Jun 2002 08:03:17 GMT
Server:=20 Apache Tomcat/4.0.2 (HTTP/1.1 Connector)
 
(invoking the=20 service with "invoke(new Object[] {"astring", "2destring"} );" got rid = of the=20 object references, so that also seems to be a "bug" in invokeOneWay, = otherwise=20 the same problems.
 
It = would be great if=20 someone had any insight into this.
 
/Jesper
=00 ------_=_NextPart_001_01C20AD8.48570C0A--