You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-user@ws.apache.org by Ruben DF <rd...@yahoo.es> on 2006/05/30 20:16:27 UTC

about ACTION soap header element

Hi, 

I have a wsrf service called "servicewsrf" and a axis
service called "serviceintermediate" which sends a
message SOAP to servicewsrf in order to modify the
value of a resource property. Two services are in the
same computer

Well, when I create the message soap in
serviceintermediate and I send to servicewsrf, I get
this error from server (Seen from tcpmon):

HTTP/1.1 500 Error Interno del Servidor
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Date: Tue, 30 May 2006 17:30:25 GMT
Connection: close

<?xml version="1.0"
encoding="utf-8"?><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>
  <soapenv:Fault>
   <faultcode>soapenv:Client</faultcode>
   <faultstring>A WS-Addressing Action SOAP header
element is required by this endpoint.</faultstring>
   <detail/>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>

The soap message that I send is this:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:fs="http://ws.apache.org/resource/serviciowsrf" 
        
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"
        
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
         
       <soapenv:Header>
       <fs:ResourceIdentifier
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"

       soapenv:mustUnderstand="0"
xmlns:fs="http://ws.apache.org/resource/serviciowsrf">recurso</fs:ResourceIdentifier>
       <wsa:MessageID
soapenv:mustUnderstand="0">uuid:9468d600-ef33-11da-87a8-a285d7b5ba51</wsa:MessageID>
       <wsa:To
soapenv:mustUnderstand="0">http://localhost:8070/wsrf/services/serviciowsrf</wsa:To>
       
       
       <wsa:From
soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
      
       </soapenv:Header>
       
       <soapenv:Body>
       <wsrp:SetResourceProperties
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
       <wsrp:Update>
       <fs:Nombre
xmlns:fs="http://ws.apache.org/resource/serviciowsrf">Pepote</fs:Nombre>
       </wsrp:Update>
       </wsrp:SetResourceProperties>
       </soapenv:Body>
</soapenv:Envelope>

In effet, there is not ACTION element BUT I dont
understand it because when I create the soap message I
include this element (ACTION) in the message. My code
for generate the message soap is:

Name prop = null;
		
		SOAPElement update_element = null;
		SOAPElement prop_element = null;
		SOAPElement element = null;
		
		int res = 0;
		
		try{
			
			  //Create the connection
		      SOAPConnectionFactory scFactory = 
		            SOAPConnectionFactory.newInstance();
		      SOAPConnection con =
scFactory.createConnection();
		      
		      // Create the message
		      MessageFactory factory =
MessageFactory.newInstance();
		      SOAPMessage message = factory.createMessage();

		      // Get message's components
		      SOAPPart soapPart = message.getSOAPPart();
		      SOAPEnvelope envelope =
soapPart.getEnvelope();

		      		      
		      Name envelopeAttributeName =
envelope.createName("xmlns:fs");
		      envelope.addAttribute(envelopeAttributeName,
"http://ws.apache.org/resource/"+servicio);
		      
		      SOAPHeader header = envelope.getHeader();
		      SOAPBody body = envelope.getBody();
		      		      
		      Name headerToElement =
envelope.createName("To", "wsa",
"http://schemas.xmlsoap.org/ws/2004/03/addressing");
		      SOAPHeaderElement to =
header.addHeaderElement(headerToElement);
		     
to.addTextNode("http://localhost:8080/wsrf/services/"+servicio);
		      
		      Name headerActionElement =
envelope.createName("Action", "wsa",
"http://schemas.xmlsoap.org/ws/2004/03/addressing");
		      SOAPHeaderElement action =
header.addHeaderElement(headerActionElement);
		     
action.addTextNode("http://ws.apache.org/resource/"+servicio+"/ServicioWsrfPortType/yourWsdlRequestName");
		      
		      Name headerResourceElement =
envelope.createName("ResourceIdentifier", "fs",
"http://ws.apache.org/resource/"+servicio);
		      SOAPHeaderElement resource =
header.addHeaderElement(headerResourceElement);
		      resource.addTextNode("recurso");
		      
		      Name bodyName =
envelope.createName("SetResourceProperties", "wsrp", 
		    		         
"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
		      SOAPBodyElement gltp =
body.addBodyElement(bodyName);
		      
		      //Add element

		      Name update = envelope.createName("Update",
"wsrp",
"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
		 
		      // Create the property
		      prop = envelope.createName(propiedad, "fs",
"http://ws.apache.org/resource/"+servicio);
		      	      
		      //insert the property

		      update_element = gltp.addChildElement(update);
		      prop_element =
update_element.addChildElement(prop);
		      
		      //insert the value
		      prop_element.addTextNode(valor);
		      
		      //URL Destiny
		      URLEndpoint endpoint = new
URLEndpoint("http://localhost:8070/wsrf/services/"+servicio);
		          
		      System.out.println("MENSAJE "+message);
		      
		      // Send message	      SOAPMessage response =
con.call(message, endpoint);
		      System.out.println(response);
		      
		      // Close the connection
		      con.close();

		      System.out.println("UPDATE: sent message\n");
			
		} catch (Exception ex) {
		      ex.printStackTrace();
		      res=-1;
		}

Furthermore, I know that the code above is correct,
because if I send this meesage soap from a client that
has a method main, this works properly and the message
is sent ok, which is:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:fs="http://ws.apache.org/resource/serviciowsrf" 
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:Header>
<wsa:To
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
	http://localhost:8080/wsrf/services/serviciowsrf
</wsa:To>
<wsa:Action
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">

http://ws.apache.org/resource/serviciowsrf/ServicioWsrfPortType/yourWsdlRequestName
</wsa:Action>
<fs:ResourceIdentifier
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:fs="http://ws.apache.org/resource/serviciowsrf">
	recurso
</fs:ResourceIdentifier>
</soapenv:Header>

<soapenv:Body>
<wsrp:SetResourceProperties
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
<wsrp:Update>
<fs:Nombre
xmlns:fs="http://ws.apache.org/resource/serviciowsrf">
	Pepote
</fs:Nombre>
</wsrp:Update>
</wsrp:SetResourceProperties>
</soapenv:Body>
</soapenv:Envelope>

As we see, in this message we can see the ACTION
element. I see that there are some differences (in
headers only, the bodies are equals) between two
request messages but I dont understand it.Why from
serviceintermediate the message soap has a FROM elment
and a MESSAGEID element and from the client has not
these elements? why from serviceintermediate has not
ACTION element?

why are there differences between two request messages
soap (from a client and from an axis service) if I
generate the message soap with the same code? Perhaps
does Axis modify the message soap when I create it?
any idea?

I use Axis 1.3, tomcat 5.5.17 and wsrf 1.1

Thanks in advance


		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org


Re: about ACTION soap header element

Posted by Ruben DF <rd...@yahoo.es>.
Hi,

Well, the client code is the following:

try{
	ServicioIntermedioServiceLocator sisl = new
ServicioIntermedioServiceLocator();
	   ServicioIntermedio_PortType sip =
sisl.getServicioIntermedio();
	   
	   int result;
	   
           result=sip.setWSRF("MyName");
	   
	   if (result==0)
		   System.out.println("Everything ok");
	   else
		   System.out.println("Error");
		
    } catch (Exception e) {
        System.out.println("Error "+e.toString());
    }

this client calls to an axis service whose code is the
following:

public int setWSRF(java.lang.String varName) throws
java.rmi.RemoteException {
    	
    	final TransactionManagerImpl wstm =
TransactionManagerImpl.getInstance();
    	
    	ResourceOperations opResource = new
ResourceOperations();
    	
    	int result;
    	
    	res=opResource.updateResource("Name", varName,
"servicewsrf");
    	
    	if (result==0){
    		System.out.println("Soap message sent ok");
        }else{
    		System.out.println("Soap message sent wrong");
        }
    	
        return result;
    }

and my code to generate the message soap
(updateResource)is the following:

public int updateResource(String property, String
value, String service){

                Name prop = null;
		
		SOAPElement update_element = null;
		SOAPElement prop_element = null;
		SOAPElement element = null;
		
		int res = 0;
		
		try{
			
			  //Create the connection
		      SOAPConnectionFactory scFactory = 
		            SOAPConnectionFactory.newInstance();
		      SOAPConnection con =
scFactory.createConnection();
		      
		      // Create the message
		      MessageFactory factory =
MessageFactory.newInstance();
		      SOAPMessage message = factory.createMessage();

		      // Get message's components
		      SOAPPart soapPart = message.getSOAPPart();
		      SOAPEnvelope envelope =
soapPart.getEnvelope();

		      		      
		      Name envelopeAttributeName =
envelope.createName("xmlns:fs");
		      envelope.addAttribute(envelopeAttributeName,
"http://ws.apache.org/resource/"+service);
		      
		      SOAPHeader header = envelope.getHeader();
		      SOAPBody body = envelope.getBody();
		      		      
		      Name headerToElement =
envelope.createName("To", "wsa",
"http://schemas.xmlsoap.org/ws/2004/03/addressing");
		      SOAPHeaderElement to =
header.addHeaderElement(headerToElement);
		     
to.addTextNode("http://localhost:8080/wsrf/services/"+service);
		      
		      Name headerActionElement =
envelope.createName("Action", "wsa",
"http://schemas.xmlsoap.org/ws/2004/03/addressing");
		      SOAPHeaderElement action =
header.addHeaderElement(headerActionElement);
		     
action.addTextNode("http://ws.apache.org/resource/"+service+"/ServicioWsrfPortType/yourWsdlRequestName");
		      
		      Name headerResourceElement =
envelope.createName("ResourceIdentifier", "fs",
"http://ws.apache.org/resource/"+service);
		      SOAPHeaderElement resource =
header.addHeaderElement(headerResourceElement);
		      resource.addTextNode("MyResource");
		      
		      Name bodyName =
envelope.createName("SetResourceProperties", "wsrp", 
		    		         
"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
		      SOAPBodyElement gltp =
body.addBodyElement(bodyName);
		      
		      //Add element

		      Name update = envelope.createName("Update",
"wsrp",
"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
		 
		      // Create the property
		      prop = envelope.createName(property, "fs",
"http://ws.apache.org/resource/"+service);
		      	      
		      //insert the property

		      update_element = gltp.addChildElement(update);
		      prop_element =
update_element.addChildElement(prop);
		      
		      //insert the value
		      prop_element.addTextNode(value);
		      
		      //URL Destiny
		      URLEndpoint endpoint = new
URLEndpoint("http://localhost:8070/wsrf/services/"+service);
		          
		      System.out.println("MESSAGE "+message);
		      
		      // Send message	      SOAPMessage response =
con.call(message, endpoint);
		      System.out.println(response);
		      
		      // Close the connection
		      con.close();

		      System.out.println("UPDATE: sent message\n");
			
		} catch (Exception ex) {
		      ex.printStackTrace();
		      res=-1;
		}
}

Well, if this axis service is deployed under axis
VERSION 1.2.1, the message soap generated is ok, which
is the following seen from tcpmon:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:fs="http://ws.apache.org/resource/servicewsrf" 
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:Header>
<wsa:To
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
	http://localhost:8080/wsrf/services/servicewsrf
</wsa:To>
<wsa:Action
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">

http://ws.apache.org/resource/servicewsrf/ServiceWsrfPortType/yourWsdlRequestName
</wsa:Action>
<fs:ResourceIdentifier
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:fs="http://ws.apache.org/resource/servicewsrf">
	MyResource
</fs:ResourceIdentifier>
</soapenv:Header>

<soapenv:Body>
<wsrp:SetResourceProperties
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
<wsrp:Update>
<fs:Name
xmlns:fs="http://ws.apache.org/resource/servicewsrf">
	MyName
</fs:Nombre>
</wsrp:Update>
</wsrp:SetResourceProperties>
</soapenv:Body>
</soapenv:Envelope>

and the response from tcpmon is:

<?xml version="1.0"
encoding="utf-8"?><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:Header>
  <wsa:Action
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">http://schemas.xmlsoap.org/ws/2004/03/addressing/anonymous</wsa:Action>
  <wsa:To
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">http://schemas.xmlsoap.org/ws/2004/03/addressing/anonymous</wsa:To>
 </soapenv:Header>
 <soapenv:Body>
  <wsrf:SetResourcePropertiesResponse
xmlns:wsrf="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"/>
 </soapenv:Body>
</soapenv:Envelope>

BUT, if this axis service is deployed under axis
VERSION 1.3, the message soap generated seen from
tcpmon is:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:fs="http://ws.apache.org/resource/servicewsrf" 
        
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"
        
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
         
       <soapenv:Header>
       <fs:ResourceIdentifier
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"

       soapenv:mustUnderstand="0"
xmlns:fs="http://ws.apache.org/resource/serviciowsrf">MyResource</fs:ResourceIdentifier>
       <wsa:MessageID
soapenv:mustUnderstand="0">uuid:9468d600-ef33-11da-87a8-a285d7b5ba51</wsa:MessageID>
       <wsa:To
soapenv:mustUnderstand="0">http://localhost:8070/wsrf/services/servicewsrf</wsa:To>
       <wsa:From
soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>

       </soapenv:Header>
       
       <soapenv:Body>
       <wsrp:SetResourceProperties
xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
       <wsrp:Update>
<fs:Name
xmlns:fs="http://ws.apache.org/resource/servicewsrf">MyName</fs:Nombre>
       </wsrp:Update>
       </wsrp:SetResourceProperties>
       </soapenv:Body>
</soapenv:Envelope>

and the response from tcpmon is:

<?xml version="1.0"
encoding="utf-8"?><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>
  <soapenv:Fault>
   <faultcode>soapenv:Client</faultcode>
   <faultstring>A WS-Addressing Action SOAP header
element is required by this endpoint.</faultstring>
   <detail/>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>

The question is that I need use axis version 1.3 by
other reasons and does not work properly with this
version. I think that like Wsrf 1.1 uses axis 1.2.1
and I use axis 1.3 to deploy my axis service there is
some kind of incompatibility with the ws-addressing or
something. any idea?

Thanks in advance
Regards

 --- Sal Campana <sc...@apache.org> escribió:

> Ruben DF wrote:
> 
> >Hi,
> >
> >I've tested it changing all references of
> >http://schemas.xmlsoap.org/ws/2004/03/addressing to
> >http://schemas.xmlsoap.org/ws/2004/04/addressing in
> >order to generate the soap message, however I
> follow
> >having the same problem, the ACTION element is
> >required and i it is not generated in the code.
> >
> >I've seen that wsrf 1.1 works with axis 1.2.1
> >internally but I need use axis 1.3 when I sent the
> >message soap to the wsrf service. For that reason
> the
> >message SOAP is not generated properly, since it is
> >included ws-addressing v2004/08, however if I use
> axis
> >1.2.1 the message SOAP is generated ok
> (ws-addressing
> >v2004/03), but, I repeat, i need use axis 1.3...
> >
> >someone knows if wsrf 1.1 works properly with
> >ws-addressing v2004/08? someone has tested it?
> >
> >Thanks in advance,
> >Ruben
> > --- Sal Campana <sc...@apache.org> escribió:
> >
> >  
> >
> >>Ruben DF wrote:
> >>
> >>    
> >>
> >>>thanks for answer to the question, sal campana.
> >>>
> >>>I changed the version of addressing to 2004/08
> but
> >>>      
> >>>
> >>I
> >>    
> >>
> >>>have the same error. Do I only have to change
> this
> >>>line
> >>>http://schemas.xmlsoap.org/ws/2004/03/addressing
> by
> >>>this other
> >>>http://schemas.xmlsoap.org/ws/2004/08/addressing
> >>>      
> >>>
> >>into
> >>    
> >>
> >>>the previous code,haven't I? Do I need some file
> >>>additional or something more?
> >>>
> >>>Thanks
> >>>
> >>>Note: With axis version 1.2.1 works properly
> (since
> >>>      
> >>>
> >>it
> >>    
> >>
> >>>will use 2004/03 addressing version) but I need
> >>>      
> >>>
> >>axis
> >>    
> >>
> >>>1.3.
> >>>
> >>>--- Sal Campana <sc...@apache.org> escribió:
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>Ruben DF wrote:
> >>>>
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>>>Hi, 
> >>>>>
> >>>>>I have a wsrf service called "servicewsrf" and
> a
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>axis
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>>>service called "serviceintermediate" which
> sends
> >>>>>          
> >>>>>
> >>a
> >>    
> >>
> >>>>>message SOAP to servicewsrf in order to modify
> >>>>>          
> >>>>>
> >>the
> >>    
> >>
> >>>>>value of a resource property. Two services are
> in
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>the
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>>>same computer
> >>>>>
> >>>>>Well, when I create the message soap in
> >>>>>serviceintermediate and I send to servicewsrf,
> I
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>get
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>>>this error from server (Seen from tcpmon):
> >>>>>
> >>>>>HTTP/1.1 500 Error Interno del Servidor
> >>>>>Server: Apache-Coyote/1.1
> >>>>>Content-Type: text/xml;charset=utf-8
> >>>>>Date: Tue, 30 May 2006 17:30:25 GMT
> >>>>>Connection: close
> >>>>>
> >>>>><?xml version="1.0"
> >>>>>encoding="utf-8"?><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>
> >>>>><soapenv:Fault>
> >>>>> <faultcode>soapenv:Client</faultcode>
> >>>>> <faultstring>A WS-Addressing Action SOAP
> header
> >>>>>element is required by this
> >>>>>          
> >>>>>
> >>endpoint.</faultstring>
> >>    
> >>
> >>>>> <detail/>
> >>>>></soapenv:Fault>
> >>>>></soapenv:Body>
> >>>>></soapenv:Envelope>
> >>>>>
> >>>>>The soap message that I send is this:
> >>>>>
> >>>>><?xml version="1.0" encoding="UTF-8"?>
> >>>>><soapenv:Envelope
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
>
>>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf"
> >>>      
> >>>
> >>>>   
> 
=== message truncated ===


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.es 

---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org


Re: about ACTION soap header element

Posted by Sal Campana <sc...@apache.org>.
Ruben DF wrote:

>Hi,
>
>I've tested it changing all references of
>http://schemas.xmlsoap.org/ws/2004/03/addressing to
>http://schemas.xmlsoap.org/ws/2004/04/addressing in
>order to generate the soap message, however I follow
>having the same problem, the ACTION element is
>required and i it is not generated in the code.
>
>I've seen that wsrf 1.1 works with axis 1.2.1
>internally but I need use axis 1.3 when I sent the
>message soap to the wsrf service. For that reason the
>message SOAP is not generated properly, since it is
>included ws-addressing v2004/08, however if I use axis
>1.2.1 the message SOAP is generated ok (ws-addressing
>v2004/03), but, I repeat, i need use axis 1.3...
>
>someone knows if wsrf 1.1 works properly with
>ws-addressing v2004/08? someone has tested it?
>
>Thanks in advance,
>Ruben
> --- Sal Campana <sc...@apache.org> escribió:
>
>  
>
>>Ruben DF wrote:
>>
>>    
>>
>>>thanks for answer to the question, sal campana.
>>>
>>>I changed the version of addressing to 2004/08 but
>>>      
>>>
>>I
>>    
>>
>>>have the same error. Do I only have to change this
>>>line
>>>http://schemas.xmlsoap.org/ws/2004/03/addressing by
>>>this other
>>>http://schemas.xmlsoap.org/ws/2004/08/addressing
>>>      
>>>
>>into
>>    
>>
>>>the previous code,haven't I? Do I need some file
>>>additional or something more?
>>>
>>>Thanks
>>>
>>>Note: With axis version 1.2.1 works properly (since
>>>      
>>>
>>it
>>    
>>
>>>will use 2004/03 addressing version) but I need
>>>      
>>>
>>axis
>>    
>>
>>>1.3.
>>>
>>>--- Sal Campana <sc...@apache.org> escribió:
>>>
>>> 
>>>
>>>      
>>>
>>>>Ruben DF wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Hi, 
>>>>>
>>>>>I have a wsrf service called "servicewsrf" and a
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>axis
>>>>   
>>>>
>>>>        
>>>>
>>>>>service called "serviceintermediate" which sends
>>>>>          
>>>>>
>>a
>>    
>>
>>>>>message SOAP to servicewsrf in order to modify
>>>>>          
>>>>>
>>the
>>    
>>
>>>>>value of a resource property. Two services are in
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>the
>>>>   
>>>>
>>>>        
>>>>
>>>>>same computer
>>>>>
>>>>>Well, when I create the message soap in
>>>>>serviceintermediate and I send to servicewsrf, I
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>get
>>>>   
>>>>
>>>>        
>>>>
>>>>>this error from server (Seen from tcpmon):
>>>>>
>>>>>HTTP/1.1 500 Error Interno del Servidor
>>>>>Server: Apache-Coyote/1.1
>>>>>Content-Type: text/xml;charset=utf-8
>>>>>Date: Tue, 30 May 2006 17:30:25 GMT
>>>>>Connection: close
>>>>>
>>>>><?xml version="1.0"
>>>>>encoding="utf-8"?><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>
>>>>><soapenv:Fault>
>>>>> <faultcode>soapenv:Client</faultcode>
>>>>> <faultstring>A WS-Addressing Action SOAP header
>>>>>element is required by this
>>>>>          
>>>>>
>>endpoint.</faultstring>
>>    
>>
>>>>> <detail/>
>>>>></soapenv:Fault>
>>>>></soapenv:Body>
>>>>></soapenv:Envelope>
>>>>>
>>>>>The soap message that I send is this:
>>>>>
>>>>><?xml version="1.0" encoding="UTF-8"?>
>>>>><soapenv:Envelope
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf"
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>      
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>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"
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>      
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>       
>>>>>     <soapenv:Header>
>>>>>     <fs:ResourceIdentifier
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>     soapenv:mustUnderstand="0"
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">recurso</fs:ResourceIdentifier>
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>     <wsa:MessageID
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>soapenv:mustUnderstand="0">uuid:9468d600-ef33-11da-87a8-a285d7b5ba51</wsa:MessageID>
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>     <wsa:To
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>soapenv:mustUnderstand="0">http://localhost:8070/wsrf/services/serviciowsrf</wsa:To>
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>     
>>>>>     
>>>>>     <wsa:From
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>    
>>>>>     </soapenv:Header>
>>>>>     
>>>>>     <soapenv:Body>
>>>>>     <wsrp:SetResourceProperties
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>     <wsrp:Update>
>>>>>     <fs:Nombre
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">Pepote</fs:Nombre>
>>>      
>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>     </wsrp:Update>
>>>>>     </wsrp:SetResourceProperties>
>>>>>     </soapenv:Body>
>>>>></soapenv:Envelope>
>>>>>
>>>>>In effet, there is not ACTION element BUT I dont
>>>>>understand it because when I create the soap
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>message I
>>>>   
>>>>
>>>>        
>>>>
>>>>>include this element (ACTION) in the message. My
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>code
>>>>   
>>>>
>>>>        
>>>>
>>>>>for generate the message soap is:
>>>>>
>>>>>Name prop = null;
>>>>>		
>>>>>		SOAPElement update_element = null;
>>>>>		SOAPElement prop_element = null;
>>>>>		SOAPElement element = null;
>>>>>		
>>>>>          
>>>>>
>=== message truncated ===
>
>
>
>		
>______________________________________________ 
>LLama Gratis a cualquier PC del Mundo. 
>Llamadas a fijos y móviles desde 1 céntimo por minuto. 
>http://es.voice.yahoo.com
>
>  
>
Please provide the wire-level messages both going into Axis and the 
response coming out...

Again, WS-Addressing is provided by wsrf NOT Axis (unless Axis somehow 
added it in 1.3)...please provide the wire-level stuff and I will help 
you out....You can do this usinf TCPMon provided with axis...

-S

---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org


Re: about ACTION soap header element

Posted by Ruben DF <rd...@yahoo.es>.
Hi,

I've tested it changing all references of
http://schemas.xmlsoap.org/ws/2004/03/addressing to
http://schemas.xmlsoap.org/ws/2004/04/addressing in
order to generate the soap message, however I follow
having the same problem, the ACTION element is
required and i it is not generated in the code.

I've seen that wsrf 1.1 works with axis 1.2.1
internally but I need use axis 1.3 when I sent the
message soap to the wsrf service. For that reason the
message SOAP is not generated properly, since it is
included ws-addressing v2004/08, however if I use axis
1.2.1 the message SOAP is generated ok (ws-addressing
v2004/03), but, I repeat, i need use axis 1.3...

someone knows if wsrf 1.1 works properly with
ws-addressing v2004/08? someone has tested it?

Thanks in advance,
Ruben
 --- Sal Campana <sc...@apache.org> escribió:

> Ruben DF wrote:
> 
> >thanks for answer to the question, sal campana.
> >
> >I changed the version of addressing to 2004/08 but
> I
> >have the same error. Do I only have to change this
> >line
> >http://schemas.xmlsoap.org/ws/2004/03/addressing by
> >this other
> >http://schemas.xmlsoap.org/ws/2004/08/addressing
> into
> >the previous code,haven't I? Do I need some file
> >additional or something more?
> >
> >Thanks
> >
> >Note: With axis version 1.2.1 works properly (since
> it
> >will use 2004/03 addressing version) but I need
> axis
> >1.3.
> >
> > --- Sal Campana <sc...@apache.org> escribió:
> >
> >  
> >
> >>Ruben DF wrote:
> >>
> >>    
> >>
> >>>Hi, 
> >>>
> >>>I have a wsrf service called "servicewsrf" and a
> >>>      
> >>>
> >>axis
> >>    
> >>
> >>>service called "serviceintermediate" which sends
> a
> >>>message SOAP to servicewsrf in order to modify
> the
> >>>value of a resource property. Two services are in
> >>>      
> >>>
> >>the
> >>    
> >>
> >>>same computer
> >>>
> >>>Well, when I create the message soap in
> >>>serviceintermediate and I send to servicewsrf, I
> >>>      
> >>>
> >>get
> >>    
> >>
> >>>this error from server (Seen from tcpmon):
> >>>
> >>>HTTP/1.1 500 Error Interno del Servidor
> >>>Server: Apache-Coyote/1.1
> >>>Content-Type: text/xml;charset=utf-8
> >>>Date: Tue, 30 May 2006 17:30:25 GMT
> >>>Connection: close
> >>>
> >>><?xml version="1.0"
> >>>encoding="utf-8"?><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>
> >>> <soapenv:Fault>
> >>>  <faultcode>soapenv:Client</faultcode>
> >>>  <faultstring>A WS-Addressing Action SOAP header
> >>>element is required by this
> endpoint.</faultstring>
> >>>  <detail/>
> >>> </soapenv:Fault>
> >>></soapenv:Body>
> >>></soapenv:Envelope>
> >>>
> >>>The soap message that I send is this:
> >>>
> >>><?xml version="1.0" encoding="UTF-8"?>
> >>><soapenv:Envelope
> >>>      
> >>>
>
>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf"
> >>
> >>    
> >>
> >>>       
> >>>      
> >>>
>
>>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"
> >>    
> >>
> >>>       
> >>>      
> >>>
>
>>xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
> >>    
> >>
> >>>        
> >>>      <soapenv:Header>
> >>>      <fs:ResourceIdentifier
> >>>      
> >>>
>
>>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
> >>    
> >>
> >>>      soapenv:mustUnderstand="0"
> >>>      
> >>>
>
>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">recurso</fs:ResourceIdentifier>
> >>    
> >>
> >>>      <wsa:MessageID
> >>>      
> >>>
>
>>soapenv:mustUnderstand="0">uuid:9468d600-ef33-11da-87a8-a285d7b5ba51</wsa:MessageID>
> >>    
> >>
> >>>      <wsa:To
> >>>      
> >>>
>
>>soapenv:mustUnderstand="0">http://localhost:8070/wsrf/services/serviciowsrf</wsa:To>
> >>    
> >>
> >>>      
> >>>      
> >>>      <wsa:From
> >>>      
> >>>
>
>>soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
> >>    
> >>
> >>>     
> >>>      </soapenv:Header>
> >>>      
> >>>      <soapenv:Body>
> >>>      <wsrp:SetResourceProperties
> >>>      
> >>>
>
>>xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
> >>    
> >>
> >>>      <wsrp:Update>
> >>>      <fs:Nombre
> >>>      
> >>>
>
>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">Pepote</fs:Nombre>
> >>    
> >>
> >>>      </wsrp:Update>
> >>>      </wsrp:SetResourceProperties>
> >>>      </soapenv:Body>
> >>></soapenv:Envelope>
> >>>
> >>>In effet, there is not ACTION element BUT I dont
> >>>understand it because when I create the soap
> >>>      
> >>>
> >>message I
> >>    
> >>
> >>>include this element (ACTION) in the message. My
> >>>      
> >>>
> >>code
> >>    
> >>
> >>>for generate the message soap is:
> >>>
> >>>Name prop = null;
> >>>		
> >>>		SOAPElement update_element = null;
> >>>		SOAPElement prop_element = null;
> >>>		SOAPElement element = null;
> >>>		
> 
=== message truncated ===



		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org


Re: about ACTION soap header element

Posted by Sal Campana <sc...@apache.org>.
Ruben DF wrote:

>thanks for answer to the question, sal campana.
>
>I changed the version of addressing to 2004/08 but I
>have the same error. Do I only have to change this
>line
>http://schemas.xmlsoap.org/ws/2004/03/addressing by
>this other
>http://schemas.xmlsoap.org/ws/2004/08/addressing into
>the previous code,haven't I? Do I need some file
>additional or something more?
>
>Thanks
>
>Note: With axis version 1.2.1 works properly (since it
>will use 2004/03 addressing version) but I need axis
>1.3.
>
> --- Sal Campana <sc...@apache.org> escribió:
>
>  
>
>>Ruben DF wrote:
>>
>>    
>>
>>>Hi, 
>>>
>>>I have a wsrf service called "servicewsrf" and a
>>>      
>>>
>>axis
>>    
>>
>>>service called "serviceintermediate" which sends a
>>>message SOAP to servicewsrf in order to modify the
>>>value of a resource property. Two services are in
>>>      
>>>
>>the
>>    
>>
>>>same computer
>>>
>>>Well, when I create the message soap in
>>>serviceintermediate and I send to servicewsrf, I
>>>      
>>>
>>get
>>    
>>
>>>this error from server (Seen from tcpmon):
>>>
>>>HTTP/1.1 500 Error Interno del Servidor
>>>Server: Apache-Coyote/1.1
>>>Content-Type: text/xml;charset=utf-8
>>>Date: Tue, 30 May 2006 17:30:25 GMT
>>>Connection: close
>>>
>>><?xml version="1.0"
>>>encoding="utf-8"?><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>
>>> <soapenv:Fault>
>>>  <faultcode>soapenv:Client</faultcode>
>>>  <faultstring>A WS-Addressing Action SOAP header
>>>element is required by this endpoint.</faultstring>
>>>  <detail/>
>>> </soapenv:Fault>
>>></soapenv:Body>
>>></soapenv:Envelope>
>>>
>>>The soap message that I send is this:
>>>
>>><?xml version="1.0" encoding="UTF-8"?>
>>><soapenv:Envelope
>>>      
>>>
>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf"
>>
>>    
>>
>>>       
>>>      
>>>
>>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"
>>    
>>
>>>       
>>>      
>>>
>>xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
>>    
>>
>>>        
>>>      <soapenv:Header>
>>>      <fs:ResourceIdentifier
>>>      
>>>
>>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
>>    
>>
>>>      soapenv:mustUnderstand="0"
>>>      
>>>
>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">recurso</fs:ResourceIdentifier>
>>    
>>
>>>      <wsa:MessageID
>>>      
>>>
>>soapenv:mustUnderstand="0">uuid:9468d600-ef33-11da-87a8-a285d7b5ba51</wsa:MessageID>
>>    
>>
>>>      <wsa:To
>>>      
>>>
>>soapenv:mustUnderstand="0">http://localhost:8070/wsrf/services/serviciowsrf</wsa:To>
>>    
>>
>>>      
>>>      
>>>      <wsa:From
>>>      
>>>
>>soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
>>    
>>
>>>     
>>>      </soapenv:Header>
>>>      
>>>      <soapenv:Body>
>>>      <wsrp:SetResourceProperties
>>>      
>>>
>>xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
>>    
>>
>>>      <wsrp:Update>
>>>      <fs:Nombre
>>>      
>>>
>>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">Pepote</fs:Nombre>
>>    
>>
>>>      </wsrp:Update>
>>>      </wsrp:SetResourceProperties>
>>>      </soapenv:Body>
>>></soapenv:Envelope>
>>>
>>>In effet, there is not ACTION element BUT I dont
>>>understand it because when I create the soap
>>>      
>>>
>>message I
>>    
>>
>>>include this element (ACTION) in the message. My
>>>      
>>>
>>code
>>    
>>
>>>for generate the message soap is:
>>>
>>>Name prop = null;
>>>		
>>>		SOAPElement update_element = null;
>>>		SOAPElement prop_element = null;
>>>		SOAPElement element = null;
>>>		
>>>		int res = 0;
>>>		
>>>		try{
>>>			
>>>			  //Create the connection
>>>		      SOAPConnectionFactory scFactory = 
>>>		            SOAPConnectionFactory.newInstance();
>>>		      SOAPConnection con =
>>>scFactory.createConnection();
>>>		      
>>>		      // Create the message
>>>		      MessageFactory factory =
>>>MessageFactory.newInstance();
>>>		      SOAPMessage message =
>>>      
>>>
>>factory.createMessage();
>>    
>>
>>>		      // Get message's components
>>>		      SOAPPart soapPart = message.getSOAPPart();
>>>		      SOAPEnvelope envelope =
>>>soapPart.getEnvelope();
>>>
>>>		      		      
>>>		      Name envelopeAttributeName =
>>>envelope.createName("xmlns:fs");
>>>		     
>>>      
>>>
>>envelope.addAttribute(envelopeAttributeName,
>>    
>>
>>>"http://ws.apache.org/resource/"+servicio);
>>>		      
>>>		      SOAPHeader header = envelope.getHeader();
>>>		      SOAPBody body = envelope.getBody();
>>>		      		      
>>>		      Name headerToElement =
>>>envelope.createName("To", "wsa",
>>>      
>>>
>>"http://schemas.xmlsoap.org/ws/2004/03/addressing");
>>    
>>
>>>		      SOAPHeaderElement to =
>>>header.addHeaderElement(headerToElement);
>>>		     
>>>      
>>>
>>to.addTextNode("http://localhost:8080/wsrf/services/"+servicio);
>>    
>>
>>>		      
>>>		      Name headerActionElement =
>>>envelope.createName("Action", "wsa",
>>>      
>>>
>>"http://schemas.xmlsoap.org/ws/2004/03/addressing");
>>    
>>
>>>		      SOAPHeaderElement action =
>>>header.addHeaderElement(headerActionElement);
>>>		     
>>>      
>>>
>>action.addTextNode("http://ws.apache.org/resource/"+servicio+"/ServicioWsrfPortType/yourWsdlRequestName");
>>    
>>
>>>		      
>>>		      Name headerResourceElement =
>>>envelope.createName("ResourceIdentifier", "fs",
>>>"http://ws.apache.org/resource/"+servicio);
>>>		      SOAPHeaderElement resource =
>>>header.addHeaderElement(headerResourceElement);
>>>		      resource.addTextNode("recurso");
>>>		      
>>>		      Name bodyName =
>>>envelope.createName("SetResourceProperties",
>>>      
>>>
>>"wsrp", 
>>    
>>
>>>		    		         
>>>      
>>>
>>"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
>>    
>>
>>>		      SOAPBodyElement gltp =
>>>body.addBodyElement(bodyName);
>>>		      
>>>		      //Add element
>>>
>>>		      Name update = envelope.createName("Update",
>>>"wsrp",
>>>      
>>>
>>"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
>>    
>>
>>>		 
>>>		      // Create the property
>>>		      prop = envelope.createName(propiedad, "fs",
>>>"http://ws.apache.org/resource/"+servicio);
>>>		      	      
>>>		      //insert the property
>>>
>>>		      update_element =
>>>      
>>>
>>gltp.addChildElement(update);
>>    
>>
>>>		      prop_element =
>>>update_element.addChildElement(prop);
>>>		      
>>>		      //insert the value
>>>		      prop_element.addTextNode(valor);
>>>		      
>>>		      //URL Destiny
>>>		      URLEndpoint endpoint = new
>>>      
>>>
>>URLEndpoint("http://localhost:8070/wsrf/services/"+servicio);
>>    
>>
>>>		          
>>>		      System.out.println("MENSAJE "+message);
>>>		      
>>>		      // Send message	      SOAPMessage response
>>>      
>>>
>>=
>>    
>>
>>>con.call(message, endpoint);
>>>		      System.out.println(response);
>>>		      
>>>		      // Close the connection
>>>		      con.close();
>>>
>>>		      System.out.println("UPDATE: sent
>>>      
>>>
>>message\n");
>>    
>>
>>>			
>>>		} catch (Exception ex) {
>>>		      ex.printStackTrace();
>>>		      res=-1;
>>>		}
>>>
>>>Furthermore, I know that the code above is correct,
>>>because if I send this meesage soap from a client
>>>      
>>>
>>that
>>
>>    
>>
>=== message truncated ===
>
>
>
>		
>______________________________________________ 
>LLama Gratis a cualquier PC del Mundo. 
>Llamadas a fijos y móviles desde 1 céntimo por minuto. 
>http://es.voice.yahoo.com
>
>  
>
Ruben,

Maybe I am getting confused....

The version of Axis should not matter...Axis doesn't care about 
WSA:Action...It would, maybe, care about SOAP:Action....

So as I see it you need to change all references of :

http://schemas.xmlsoap.org/ws/2004/03/addressing

to 

http://schemas.xmlsoap.org/ws/2004/08/addressing

Try to verify that it is correct on the wire...You could use TCPMon for that....

Again, that is our message so its WSRF which is complaining about the header...not Axis...The Axis version should not matter...If it seems like that is the case then you may be having another issue, please review the logs carefully...

-S





---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org


Re: about ACTION soap header element

Posted by Ruben DF <rd...@yahoo.es>.
thanks for answer to the question, sal campana.

I changed the version of addressing to 2004/08 but I
have the same error. Do I only have to change this
line
http://schemas.xmlsoap.org/ws/2004/03/addressing by
this other
http://schemas.xmlsoap.org/ws/2004/08/addressing into
the previous code,haven't I? Do I need some file
additional or something more?

Thanks

Note: With axis version 1.2.1 works properly (since it
will use 2004/03 addressing version) but I need axis
1.3.

 --- Sal Campana <sc...@apache.org> escribió:

> Ruben DF wrote:
> 
> >Hi, 
> >
> >I have a wsrf service called "servicewsrf" and a
> axis
> >service called "serviceintermediate" which sends a
> >message SOAP to servicewsrf in order to modify the
> >value of a resource property. Two services are in
> the
> >same computer
> >
> >Well, when I create the message soap in
> >serviceintermediate and I send to servicewsrf, I
> get
> >this error from server (Seen from tcpmon):
> >
> >HTTP/1.1 500 Error Interno del Servidor
> >Server: Apache-Coyote/1.1
> >Content-Type: text/xml;charset=utf-8
> >Date: Tue, 30 May 2006 17:30:25 GMT
> >Connection: close
> >
> ><?xml version="1.0"
> >encoding="utf-8"?><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>
> >  <soapenv:Fault>
> >   <faultcode>soapenv:Client</faultcode>
> >   <faultstring>A WS-Addressing Action SOAP header
> >element is required by this endpoint.</faultstring>
> >   <detail/>
> >  </soapenv:Fault>
> > </soapenv:Body>
> ></soapenv:Envelope>
> >
> >The soap message that I send is this:
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><soapenv:Envelope
>
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf"
> 
> >        
>
>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"
> >        
>
>xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
> >         
> >       <soapenv:Header>
> >       <fs:ResourceIdentifier
>
>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
> >
> >       soapenv:mustUnderstand="0"
>
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">recurso</fs:ResourceIdentifier>
> >       <wsa:MessageID
>
>soapenv:mustUnderstand="0">uuid:9468d600-ef33-11da-87a8-a285d7b5ba51</wsa:MessageID>
> >       <wsa:To
>
>soapenv:mustUnderstand="0">http://localhost:8070/wsrf/services/serviciowsrf</wsa:To>
> >       
> >       
> >       <wsa:From
>
>soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
> >      
> >       </soapenv:Header>
> >       
> >       <soapenv:Body>
> >       <wsrp:SetResourceProperties
>
>xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
> >       <wsrp:Update>
> >       <fs:Nombre
>
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">Pepote</fs:Nombre>
> >       </wsrp:Update>
> >       </wsrp:SetResourceProperties>
> >       </soapenv:Body>
> ></soapenv:Envelope>
> >
> >In effet, there is not ACTION element BUT I dont
> >understand it because when I create the soap
> message I
> >include this element (ACTION) in the message. My
> code
> >for generate the message soap is:
> >
> >Name prop = null;
> >		
> >		SOAPElement update_element = null;
> >		SOAPElement prop_element = null;
> >		SOAPElement element = null;
> >		
> >		int res = 0;
> >		
> >		try{
> >			
> >			  //Create the connection
> >		      SOAPConnectionFactory scFactory = 
> >		            SOAPConnectionFactory.newInstance();
> >		      SOAPConnection con =
> >scFactory.createConnection();
> >		      
> >		      // Create the message
> >		      MessageFactory factory =
> >MessageFactory.newInstance();
> >		      SOAPMessage message =
> factory.createMessage();
> >
> >		      // Get message's components
> >		      SOAPPart soapPart = message.getSOAPPart();
> >		      SOAPEnvelope envelope =
> >soapPart.getEnvelope();
> >
> >		      		      
> >		      Name envelopeAttributeName =
> >envelope.createName("xmlns:fs");
> >		     
> envelope.addAttribute(envelopeAttributeName,
> >"http://ws.apache.org/resource/"+servicio);
> >		      
> >		      SOAPHeader header = envelope.getHeader();
> >		      SOAPBody body = envelope.getBody();
> >		      		      
> >		      Name headerToElement =
> >envelope.createName("To", "wsa",
>
>"http://schemas.xmlsoap.org/ws/2004/03/addressing");
> >		      SOAPHeaderElement to =
> >header.addHeaderElement(headerToElement);
> >		     
>
>to.addTextNode("http://localhost:8080/wsrf/services/"+servicio);
> >		      
> >		      Name headerActionElement =
> >envelope.createName("Action", "wsa",
>
>"http://schemas.xmlsoap.org/ws/2004/03/addressing");
> >		      SOAPHeaderElement action =
> >header.addHeaderElement(headerActionElement);
> >		     
>
>action.addTextNode("http://ws.apache.org/resource/"+servicio+"/ServicioWsrfPortType/yourWsdlRequestName");
> >		      
> >		      Name headerResourceElement =
> >envelope.createName("ResourceIdentifier", "fs",
> >"http://ws.apache.org/resource/"+servicio);
> >		      SOAPHeaderElement resource =
> >header.addHeaderElement(headerResourceElement);
> >		      resource.addTextNode("recurso");
> >		      
> >		      Name bodyName =
> >envelope.createName("SetResourceProperties",
> "wsrp", 
> >		    		         
>
>"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
> >		      SOAPBodyElement gltp =
> >body.addBodyElement(bodyName);
> >		      
> >		      //Add element
> >
> >		      Name update = envelope.createName("Update",
> >"wsrp",
>
>"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
> >		 
> >		      // Create the property
> >		      prop = envelope.createName(propiedad, "fs",
> >"http://ws.apache.org/resource/"+servicio);
> >		      	      
> >		      //insert the property
> >
> >		      update_element =
> gltp.addChildElement(update);
> >		      prop_element =
> >update_element.addChildElement(prop);
> >		      
> >		      //insert the value
> >		      prop_element.addTextNode(valor);
> >		      
> >		      //URL Destiny
> >		      URLEndpoint endpoint = new
>
>URLEndpoint("http://localhost:8070/wsrf/services/"+servicio);
> >		          
> >		      System.out.println("MENSAJE "+message);
> >		      
> >		      // Send message	      SOAPMessage response
> =
> >con.call(message, endpoint);
> >		      System.out.println(response);
> >		      
> >		      // Close the connection
> >		      con.close();
> >
> >		      System.out.println("UPDATE: sent
> message\n");
> >			
> >		} catch (Exception ex) {
> >		      ex.printStackTrace();
> >		      res=-1;
> >		}
> >
> >Furthermore, I know that the code above is correct,
> >because if I send this meesage soap from a client
> that
> 
=== message truncated ===



		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org


Re: about ACTION soap header element

Posted by Sal Campana <sc...@apache.org>.
Ruben DF wrote:

>Hi, 
>
>I have a wsrf service called "servicewsrf" and a axis
>service called "serviceintermediate" which sends a
>message SOAP to servicewsrf in order to modify the
>value of a resource property. Two services are in the
>same computer
>
>Well, when I create the message soap in
>serviceintermediate and I send to servicewsrf, I get
>this error from server (Seen from tcpmon):
>
>HTTP/1.1 500 Error Interno del Servidor
>Server: Apache-Coyote/1.1
>Content-Type: text/xml;charset=utf-8
>Date: Tue, 30 May 2006 17:30:25 GMT
>Connection: close
>
><?xml version="1.0"
>encoding="utf-8"?><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>
>  <soapenv:Fault>
>   <faultcode>soapenv:Client</faultcode>
>   <faultstring>A WS-Addressing Action SOAP header
>element is required by this endpoint.</faultstring>
>   <detail/>
>  </soapenv:Fault>
> </soapenv:Body>
></soapenv:Envelope>
>
>The soap message that I send is this:
>
><?xml version="1.0" encoding="UTF-8"?>
><soapenv:Envelope
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf" 
>        
>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"
>        
>xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
>         
>       <soapenv:Header>
>       <fs:ResourceIdentifier
>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
>
>       soapenv:mustUnderstand="0"
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">recurso</fs:ResourceIdentifier>
>       <wsa:MessageID
>soapenv:mustUnderstand="0">uuid:9468d600-ef33-11da-87a8-a285d7b5ba51</wsa:MessageID>
>       <wsa:To
>soapenv:mustUnderstand="0">http://localhost:8070/wsrf/services/serviciowsrf</wsa:To>
>       
>       
>       <wsa:From
>soapenv:mustUnderstand="0"><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
>      
>       </soapenv:Header>
>       
>       <soapenv:Body>
>       <wsrp:SetResourceProperties
>xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
>       <wsrp:Update>
>       <fs:Nombre
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">Pepote</fs:Nombre>
>       </wsrp:Update>
>       </wsrp:SetResourceProperties>
>       </soapenv:Body>
></soapenv:Envelope>
>
>In effet, there is not ACTION element BUT I dont
>understand it because when I create the soap message I
>include this element (ACTION) in the message. My code
>for generate the message soap is:
>
>Name prop = null;
>		
>		SOAPElement update_element = null;
>		SOAPElement prop_element = null;
>		SOAPElement element = null;
>		
>		int res = 0;
>		
>		try{
>			
>			  //Create the connection
>		      SOAPConnectionFactory scFactory = 
>		            SOAPConnectionFactory.newInstance();
>		      SOAPConnection con =
>scFactory.createConnection();
>		      
>		      // Create the message
>		      MessageFactory factory =
>MessageFactory.newInstance();
>		      SOAPMessage message = factory.createMessage();
>
>		      // Get message's components
>		      SOAPPart soapPart = message.getSOAPPart();
>		      SOAPEnvelope envelope =
>soapPart.getEnvelope();
>
>		      		      
>		      Name envelopeAttributeName =
>envelope.createName("xmlns:fs");
>		      envelope.addAttribute(envelopeAttributeName,
>"http://ws.apache.org/resource/"+servicio);
>		      
>		      SOAPHeader header = envelope.getHeader();
>		      SOAPBody body = envelope.getBody();
>		      		      
>		      Name headerToElement =
>envelope.createName("To", "wsa",
>"http://schemas.xmlsoap.org/ws/2004/03/addressing");
>		      SOAPHeaderElement to =
>header.addHeaderElement(headerToElement);
>		     
>to.addTextNode("http://localhost:8080/wsrf/services/"+servicio);
>		      
>		      Name headerActionElement =
>envelope.createName("Action", "wsa",
>"http://schemas.xmlsoap.org/ws/2004/03/addressing");
>		      SOAPHeaderElement action =
>header.addHeaderElement(headerActionElement);
>		     
>action.addTextNode("http://ws.apache.org/resource/"+servicio+"/ServicioWsrfPortType/yourWsdlRequestName");
>		      
>		      Name headerResourceElement =
>envelope.createName("ResourceIdentifier", "fs",
>"http://ws.apache.org/resource/"+servicio);
>		      SOAPHeaderElement resource =
>header.addHeaderElement(headerResourceElement);
>		      resource.addTextNode("recurso");
>		      
>		      Name bodyName =
>envelope.createName("SetResourceProperties", "wsrp", 
>		    		         
>"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
>		      SOAPBodyElement gltp =
>body.addBodyElement(bodyName);
>		      
>		      //Add element
>
>		      Name update = envelope.createName("Update",
>"wsrp",
>"http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd");
>		 
>		      // Create the property
>		      prop = envelope.createName(propiedad, "fs",
>"http://ws.apache.org/resource/"+servicio);
>		      	      
>		      //insert the property
>
>		      update_element = gltp.addChildElement(update);
>		      prop_element =
>update_element.addChildElement(prop);
>		      
>		      //insert the value
>		      prop_element.addTextNode(valor);
>		      
>		      //URL Destiny
>		      URLEndpoint endpoint = new
>URLEndpoint("http://localhost:8070/wsrf/services/"+servicio);
>		          
>		      System.out.println("MENSAJE "+message);
>		      
>		      // Send message	      SOAPMessage response =
>con.call(message, endpoint);
>		      System.out.println(response);
>		      
>		      // Close the connection
>		      con.close();
>
>		      System.out.println("UPDATE: sent message\n");
>			
>		} catch (Exception ex) {
>		      ex.printStackTrace();
>		      res=-1;
>		}
>
>Furthermore, I know that the code above is correct,
>because if I send this meesage soap from a client that
>has a method main, this works properly and the message
>is sent ok, which is:
>
><?xml version="1.0" encoding="UTF-8"?>
><soapenv:Envelope
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf" 
>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:Header>
><wsa:To
>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
>soapenv:mustUnderstand="0"
>xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
>	http://localhost:8080/wsrf/services/serviciowsrf
></wsa:To>
><wsa:Action
>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
>soapenv:mustUnderstand="0"
>xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
>
>http://ws.apache.org/resource/serviciowsrf/ServicioWsrfPortType/yourWsdlRequestName
></wsa:Action>
><fs:ResourceIdentifier
>soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
>soapenv:mustUnderstand="0"
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">
>	recurso
></fs:ResourceIdentifier>
></soapenv:Header>
>
><soapenv:Body>
><wsrp:SetResourceProperties
>xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">
><wsrp:Update>
><fs:Nombre
>xmlns:fs="http://ws.apache.org/resource/serviciowsrf">
>	Pepote
></fs:Nombre>
></wsrp:Update>
></wsrp:SetResourceProperties>
></soapenv:Body>
></soapenv:Envelope>
>
>As we see, in this message we can see the ACTION
>element. I see that there are some differences (in
>headers only, the bodies are equals) between two
>request messages but I dont understand it.Why from
>serviceintermediate the message soap has a FROM elment
>and a MESSAGEID element and from the client has not
>these elements? why from serviceintermediate has not
>ACTION element?
>
>why are there differences between two request messages
>soap (from a client and from an axis service) if I
>generate the message soap with the same code? Perhaps
>does Axis modify the message soap when I create it?
>any idea?
>
>I use Axis 1.3, tomcat 5.5.17 and wsrf 1.1
>
>Thanks in advance
>
>
>		
>______________________________________________ 
>LLama Gratis a cualquier PC del Mundo. 
>Llamadas a fijos y móviles desde 1 céntimo por minuto. 
>http://es.voice.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: wsrf-user-help@ws.apache.org
>
>
>  
>
Its the version of Addressing which is incompatible...That is based on 
the namespace you have provided....

You need to use the 2004/08 version of Addressing...This is because the 
WSDM family of specs requires it....

---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org