|
From: David G. <dg...@co...> - 2003-08-10 00:53:38
|
Hello to the great and powerful list, I am writing a soap document to a web service and getting a response. I want to accept the response and add it as an attribute to the original document. What is the best way to do this? I can create a new stage based on the SoapWriter, but if Babeldoc already has some mechanism to do this, I'd rather use it. Thanks, David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
|
From: Bruce M. <br...@mc...> - 2003-08-10 04:49:18
|
This would probably be a good job for the Scripting stage... Write some nice javascript that saves the document (prior to sending it) and then placing the response as attribute on the document and restoring the original content. No need to write a new pipeline stage. The Scripting stage is really *VERY* powerful and the interpreted Javascript runs very quickly... Its worth investigating. regards, Bruce. On Saturday 09 August 2003 09:04 pm, David Glick wrote: > Hello to the great and powerful list, > > I am writing a soap document to a web service and getting a response. I > want to accept the response and add it as an attribute to the original > document. What is the best way to do this? I can create a new stage based > on the SoapWriter, but if Babeldoc already has some mechanism to do this, > I'd rather use it. > > > Thanks, > > David |
|
From: David G. <dg...@co...> - 2003-08-10 20:50:34
|
Hi Bruce, Taking your advice, I'm now a Scripting expert (yeah, right!) (say, this *is* pretty powerful stuff!). However, I'm still unclear how to organize a pipeline as follows: |== SoapWriter ========| document == ??? stage === Scripting ===> |== NullStage (I think!) ==| I'm not sure how to split the document, and then remerge it into the Scripting stage. I've looked at the router and the callStage stages, but neither seem to have the desired effect of preserving the original document while providing a response document that I can process simultaneously. I've also considered invoking the CallStagePipelineStage directly in the Scripting stage, but I'm not sure if, once we get to that level of complexity, it might not be smarter to just create a new Pipeline stage anyway. Also, I'm unclear how to merge both documents in the same stage. Any advice is greatly appreciated. Thanks, David P.S. Another possibility that just occurred to me is to add an option to the SoapWriter class so that, if set, the returned document looks like: <SoapWriter> <SoapRequest> [[original document submitted to writer]] </SoapRequest> <SoapResponse> [[response from web service]] </SoapResponse> </SoapWriter> Is this a better way to go? On Saturday 09 August 2003 9:49 pm, Bruce McDonald wrote: > This would probably be a good job for the Scripting stage... Write some > nice javascript that saves the document (prior to sending it) and then > placing the response as attribute on the document and restoring the > original content. No need to write a new pipeline stage. > > The Scripting stage is really *VERY* powerful and the interpreted > Javascript runs very quickly... Its worth investigating. > > regards, > Bruce. > > On Saturday 09 August 2003 09:04 pm, David Glick wrote: > > Hello to the great and powerful list, > > > > I am writing a soap document to a web service and getting a response. I > > want to accept the response and add it as an attribute to the original > > document. What is the best way to do this? I can create a new stage > > based on the SoapWriter, but if Babeldoc already has some mechanism to do > > this, I'd rather use it. > > > > > > Thanks, > > > > David -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |
|
From: Bruce M. <br...@mc...> - 2003-08-11 04:24:11
|
David,
Just a quick note - Merging documents from two pipelines (or sub-piplines) is
a difficult problem - What I was think about is:
--->Store Doc on Attr--->XMit Doc(capture response to Doc)
contd. ---->Place on new attr & restore old doc from attr.
?
regards,
Bruce.
On Sunday 10 August 2003 05:01 pm, David Glick wrote:
> Hi Bruce,
>
> Taking your advice, I'm now a Scripting expert (yeah, right!) (say, this
> *is* pretty powerful stuff!). However, I'm still unclear how to organize a
>
> pipeline as follows:
> |== SoapWriter ========|
>
> document == ??? stage === Scripting ===>
>
> |== NullStage (I think!) ==|
>
> I'm not sure how to split the document, and then remerge it into the
> Scripting stage.
>
> I've looked at the router and the callStage stages, but neither seem to
> have the desired effect of preserving the original document while providing
> a response document that I can process simultaneously. I've also
> considered invoking the CallStagePipelineStage directly in the Scripting
> stage, but I'm not sure if, once we get to that level of complexity, it
> might not be smarter to just create a new Pipeline stage anyway.
>
> Also, I'm unclear how to merge both documents in the same stage.
>
> Any advice is greatly appreciated.
>
>
> Thanks,
>
> David
>
> P.S. Another possibility that just occurred to me is to add an option to
> the SoapWriter class so that, if set, the returned document looks like:
>
> <SoapWriter>
> <SoapRequest>
> [[original document submitted to writer]]
> </SoapRequest>
> <SoapResponse>
> [[response from web service]]
> </SoapResponse>
> </SoapWriter>
>
> Is this a better way to go?
>
> On Saturday 09 August 2003 9:49 pm, Bruce McDonald wrote:
> > This would probably be a good job for the Scripting stage... Write some
> > nice javascript that saves the document (prior to sending it) and then
> > placing the response as attribute on the document and restoring the
> > original content. No need to write a new pipeline stage.
> >
> > The Scripting stage is really *VERY* powerful and the interpreted
> > Javascript runs very quickly... Its worth investigating.
> >
> > regards,
> > Bruce.
> >
> > On Saturday 09 August 2003 09:04 pm, David Glick wrote:
> > > Hello to the great and powerful list,
> > >
> > > I am writing a soap document to a web service and getting a response.
> > > I want to accept the response and add it as an attribute to the
> > > original document. What is the best way to do this? I can create a new
> > > stage based on the SoapWriter, but if Babeldoc already has some
> > > mechanism to do this, I'd rather use it.
> > >
> > >
> > > Thanks,
> > >
> > > David
|
|
From: David G. <dg...@co...> - 2003-08-11 04:50:36
|
Thanks, Bruce. I've actually implemented the exact opposite, in that I'm taking the soap response and creating an attribute to store it against the original document. I'm not sure if this means that great minds think alike since the solution I arrived at was similar to your suggestion, or else I developed something completely reversed from what your great mind developed, and that makes me...? :-) Things are moving forward swimmingly, except that I've just found out that my soap post is required to authenticate. I'm trying to figure out how to do this now. Thanks again, David On Sunday 10 August 2003 9:24 pm, Bruce McDonald wrote: > David, > > Just a quick note - Merging documents from two pipelines (or sub-piplines) > is a difficult problem - What I was think about is: > > --->Store Doc on Attr--->XMit Doc(capture response to Doc) > > contd. ---->Place on new attr & restore old doc from attr. > > ? > > regards, > Bruce. > > On Sunday 10 August 2003 05:01 pm, David Glick wrote: > > Hi Bruce, > > > > Taking your advice, I'm now a Scripting expert (yeah, right!) (say, this > > *is* pretty powerful stuff!). However, I'm still unclear how to organize > > a > > > > pipeline as follows: > > |== SoapWriter ========| > > > > document == ??? stage === Scripting ===> > > > > |== NullStage (I think!) ==| > > > > I'm not sure how to split the document, and then remerge it into the > > Scripting stage. > > > > I've looked at the router and the callStage stages, but neither seem to > > have the desired effect of preserving the original document while > > providing a response document that I can process simultaneously. I've > > also considered invoking the CallStagePipelineStage directly in the > > Scripting stage, but I'm not sure if, once we get to that level of > > complexity, it might not be smarter to just create a new Pipeline stage > > anyway. > > > > Also, I'm unclear how to merge both documents in the same stage. > > > > Any advice is greatly appreciated. > > > > > > Thanks, > > > > David > > > > P.S. Another possibility that just occurred to me is to add an option to > > the SoapWriter class so that, if set, the returned document looks like: > > > > <SoapWriter> > > <SoapRequest> > > [[original document submitted to writer]] > > </SoapRequest> > > <SoapResponse> > > [[response from web service]] > > </SoapResponse> > > </SoapWriter> > > > > Is this a better way to go? > > > > On Saturday 09 August 2003 9:49 pm, Bruce McDonald wrote: > > > This would probably be a good job for the Scripting stage... Write some > > > nice javascript that saves the document (prior to sending it) and then > > > placing the response as attribute on the document and restoring the > > > original content. No need to write a new pipeline stage. > > > > > > The Scripting stage is really *VERY* powerful and the interpreted > > > Javascript runs very quickly... Its worth investigating. > > > > > > regards, > > > Bruce. > > > > > > On Saturday 09 August 2003 09:04 pm, David Glick wrote: > > > > Hello to the great and powerful list, > > > > > > > > I am writing a soap document to a web service and getting a response. > > > > I want to accept the response and add it as an attribute to the > > > > original document. What is the best way to do this? I can create a > > > > new stage based on the SoapWriter, but if Babeldoc already has some > > > > mechanism to do this, I'd rather use it. > > > > > > > > > > > > Thanks, > > > > > > > > David > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Babeldoc-devel mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |