You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "David Crossley (JIRA)" <ji...@apache.org> on 2006/03/01 08:22:40 UTC

[jira] Updated: (COCOON-871) [PATCH] XML posting from SourceWritingTransformer by using an enhanced HTTPClientSource

     [ http://issues.apache.org/jira/browse/COCOON-871?page=all ]

David Crossley updated COCOON-871:
----------------------------------

    Bugzilla Id:   (was: 24402)
     Other Info: [Patch available]
    Description: 
This patch makes it posible to post XML from the SourceWritingTransformer, this 
is usefull for e.g. doing SOAP calls in a pipeline. The main advantage in 
comparison with the XSP implementation of SOAP is that one can create the SOAP 
call based on the result from earlier steps in the pipeline se 
http://webservices.xml.com/pub/a/ws/2003/03/18/cocoon.html for some ideas about 
that (I was not aware about Steve Puntes implementation when I wrote my 
implementation).

An example:
<?xml version="1.0"?>
<page>
  <source:post xmlns:source="http://apache.org/cocoon/source/1.0">
    <source:source>http://services.xmethods.net:9090/soap</source:source>
    <source:header name="Content-Type">text/xml; charset="utf-8"</source:header>
    <source:header name="SOAPAction">""</source:header>
    <source:fragment>
      <SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
			 xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
			 xmlns:xsd="http://www.w3.org/1999/XMLSchema">
	<SOAP-ENV:Body>
	  <ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
		       SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	    <country1 xsi:type="xsd:string">England</country1>
	    <country2 xsi:type="xsd:string">Japan</country2>
	  </ns1:getRate>
	</SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    </source:fragment>
  </source:post>
</page>

I have extended the HTTPClientSource from Avalon Excalibur so that one can post 
XML data (or actually any data) to it. The main functionality is in the 
HTTPClientSource, the SourceWritingTransformer just use it. I am not certain 
that the SourceWritingTransformer is the best place for this functionality, I 
used it as it allready contained functionality for modifyable sources.

To use it Avlon Excalibur source must be patched as well as Cocoon and the 
HTTPClientSource must be used for the http: protocol instead of the standard 
URLSourceFactory.

  was:
This patch makes it posible to post XML from the SourceWritingTransformer, this 
is usefull for e.g. doing SOAP calls in a pipeline. The main advantage in 
comparison with the XSP implementation of SOAP is that one can create the SOAP 
call based on the result from earlier steps in the pipeline se 
http://webservices.xml.com/pub/a/ws/2003/03/18/cocoon.html for some ideas about 
that (I was not aware about Steve Puntes implementation when I wrote my 
implementation).

An example:
<?xml version="1.0"?>
<page>
  <source:post xmlns:source="http://apache.org/cocoon/source/1.0">
    <source:source>http://services.xmethods.net:9090/soap</source:source>
    <source:header name="Content-Type">text/xml; charset="utf-8"</source:header>
    <source:header name="SOAPAction">""</source:header>
    <source:fragment>
      <SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
			 xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
			 xmlns:xsd="http://www.w3.org/1999/XMLSchema">
	<SOAP-ENV:Body>
	  <ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
		       SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	    <country1 xsi:type="xsd:string">England</country1>
	    <country2 xsi:type="xsd:string">Japan</country2>
	  </ns1:getRate>
	</SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    </source:fragment>
  </source:post>
</page>

I have extended the HTTPClientSource from Avalon Excalibur so that one can post 
XML data (or actually any data) to it. The main functionality is in the 
HTTPClientSource, the SourceWritingTransformer just use it. I am not certain 
that the SourceWritingTransformer is the best place for this functionality, I 
used it as it allready contained functionality for modifyable sources.

To use it Avlon Excalibur source must be patched as well as Cocoon and the 
HTTPClientSource must be used for the http: protocol instead of the standard 
URLSourceFactory.


> [PATCH] XML posting from SourceWritingTransformer by using an enhanced HTTPClientSource
> ---------------------------------------------------------------------------------------
>
>          Key: COCOON-871
>          URL: http://issues.apache.org/jira/browse/COCOON-871
>      Project: Cocoon
>         Type: Improvement
>   Components: - Components: Sitemap
>     Versions: 2.1.8
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Daniel Fagerstrom
>     Assignee: Cocoon Developers Team
>     Priority: Minor
>  Attachments: HTTPClientSource.java.patch.2, SourceWritingTransformer.java.patch.2, soap.js, ws-20031106.tgz, ws.tgz
>
> This patch makes it posible to post XML from the SourceWritingTransformer, this 
> is usefull for e.g. doing SOAP calls in a pipeline. The main advantage in 
> comparison with the XSP implementation of SOAP is that one can create the SOAP 
> call based on the result from earlier steps in the pipeline se 
> http://webservices.xml.com/pub/a/ws/2003/03/18/cocoon.html for some ideas about 
> that (I was not aware about Steve Puntes implementation when I wrote my 
> implementation).
> An example:
> <?xml version="1.0"?>
> <page>
>   <source:post xmlns:source="http://apache.org/cocoon/source/1.0">
>     <source:source>http://services.xmethods.net:9090/soap</source:source>
>     <source:header name="Content-Type">text/xml; charset="utf-8"</source:header>
>     <source:header name="SOAPAction">""</source:header>
>     <source:fragment>
>       <SOAP-ENV:Envelope xmlns:SOAP-
> ENV="http://schemas.xmlsoap.org/soap/envelope/"
> 			 xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> 			 xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> 	<SOAP-ENV:Body>
> 	  <ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
> 		       SOAP-
> ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> 	    <country1 xsi:type="xsd:string">England</country1>
> 	    <country2 xsi:type="xsd:string">Japan</country2>
> 	  </ns1:getRate>
> 	</SOAP-ENV:Body>
>       </SOAP-ENV:Envelope>
>     </source:fragment>
>   </source:post>
> </page>
> I have extended the HTTPClientSource from Avalon Excalibur so that one can post 
> XML data (or actually any data) to it. The main functionality is in the 
> HTTPClientSource, the SourceWritingTransformer just use it. I am not certain 
> that the SourceWritingTransformer is the best place for this functionality, I 
> used it as it allready contained functionality for modifyable sources.
> To use it Avlon Excalibur source must be patched as well as Cocoon and the 
> HTTPClientSource must be used for the http: protocol instead of the standard 
> URLSourceFactory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira