Bad envelope tag?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bad envelope tag?

Helsing, Patrik
Bad envelope tag?

Hi all,

I am having some trouble integrating my XForms application with another web service.
Basically I am just calling a web service (that I have written myself) using a delegator processor.

I receive the call on the server side, set the content type for the response, and then write my XML
to the writer of the response. Like this:

        response.setContentType("application/xml");
        final PrintWriter out = response.getWriter();
        out.println("<evaluation>"); // Write my own XML here
        ...;

But then I get a SAXException "Bad envelope tag" when receiving the response. See below.
Obviously it seems that the delegation processor anticipates a SOAP envelope here.

But how do I continue from here? Do I really need to build a SOAP envelope? How do I do that in the simplest way?
Is there any other way? Can I configure the delegation processor to accept "raw" XML? I am just interested in passing
my XML to the client (ie my XForms app) in the simplest way possible. This is only going to be a simple prototype so
I don't want to go through a lot of hassle to make things production like.

2009-02-17 17:33:54,803 ERROR ProcessorService  - Exception at line 34, column 42 of oxf:/apps/my-sandbox/evaluate.xpl (reading processor output: name='data', id='evaluation')

org.xml.sax.SAXException: Bad envelope tag:  evaluation
        at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:70)
        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:497)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:736)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1755)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
        at orbeon.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1201)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:1902)
        at org.orbeon.oxf.processor.DelegationProcessor$2.endElement(DelegationProcessor.java:242)
        at org.orbeon.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:378)
        at org.orbeon.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:185)
        at org.orbeon.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:333)
        at org.dom4j.io.SAXWriter.endElement(SAXWriter.java:816)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:734)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:202)
        at org.dom4j.io.SAXWriter.parse(SAXWriter.java:603)

Many thanks for any tips on this issue.

Patrik Helsing
Senior Software Engineer
Cardiac Rhythm Management Division
 
St. Jude Medical
Veddestavägen 19
SE-175 84 Järfälla, Sweden
Tel +46 8 474 4560
[hidden email]

 
This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Bad envelope tag?

Steve Bayliss
Message
Hi Patrik
 
How about implementing your service as a REST service?
 
You could then either
 
a) use the oxf:url-generator processor to get the data (passing any data as url parameters); or
b) use the oxf:xforms-submission processor, which means you could POST data to your URL - see http://www.orbeon.com/ops/doc/processors-submission
 
Steve
-----Original Message-----
From: Helsing, Patrik [mailto:[hidden email]]
Sent: 17 February 2009 17:00
To: [hidden email]
Subject: [ops-users] Bad envelope tag?

Hi all,

I am having some trouble integrating my XForms application with another web service.
Basically I am just calling a web service (that I have written myself) using a delegator processor.

I receive the call on the server side, set the content type for the response, and then write my XML
to the writer of the response. Like this:

        response.setContentType("application/xml");
        final PrintWriter out = response.getWriter();
        out.println("<evaluation>"); // Write my own XML here
        ...;

But then I get a SAXException "Bad envelope tag" when receiving the response. See below.
Obviously it seems that the delegation processor anticipates a SOAP envelope here.

But how do I continue from here? Do I really need to build a SOAP envelope? How do I do that in the simplest way?
Is there any other way? Can I configure the delegation processor to accept "raw" XML? I am just interested in passing
my XML to the client (ie my XForms app) in the simplest way possible. This is only going to be a simple prototype so
I don't want to go through a lot of hassle to make things production like.

2009-02-17 17:33:54,803 ERROR ProcessorService  - Exception at line 34, column 42 of oxf:/apps/my-sandbox/evaluate.xpl (reading processor output: name='data', id='evaluation')

org.xml.sax.SAXException: Bad envelope tag:  evaluation
        at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:70)
        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:497)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:736)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1755)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
        at orbeon.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1201)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:1902)
        at org.orbeon.oxf.processor.DelegationProcessor$2.endElement(DelegationProcessor.java:242)
        at org.orbeon.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:378)
        at org.orbeon.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:185)
        at org.orbeon.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:333)
        at org.dom4j.io.SAXWriter.endElement(SAXWriter.java:816)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:734)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:202)
        at org.dom4j.io.SAXWriter.parse(SAXWriter.java:603)

Many thanks for any tips on this issue.

Patrik Helsing
Senior Software Engineer
Cardiac Rhythm Management Division
 
St. Jude Medical
Veddestavägen 19
SE-175 84 Järfälla, Sweden
Tel +46 8 474 4560
[hidden email]

 
This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Bad envelope tag?

Steve Bayliss
In reply to this post by Helsing, Patrik
Message
Hi Patrik
 
How about implementing your service as a REST service?
 
You could then either
 
a) use the oxf:url-generator processor to get the data (passing any data as url parameters); or
b) use the oxf:xforms-submission processor, which means you could POST data to your URL - see http://www.orbeon.com/ops/doc/processors-submission
 
Steve
-----Original Message-----
From: Helsing, Patrik [mailto:[hidden email]]
Sent: 17 February 2009 17:00
To: [hidden email]
Subject: [ops-users] Bad envelope tag?

Hi all,

I am having some trouble integrating my XForms application with another web service.
Basically I am just calling a web service (that I have written myself) using a delegator processor.

I receive the call on the server side, set the content type for the response, and then write my XML
to the writer of the response. Like this:

        response.setContentType("application/xml");
        final PrintWriter out = response.getWriter();
        out.println("<evaluation>"); // Write my own XML here
        ...;

But then I get a SAXException "Bad envelope tag" when receiving the response. See below.
Obviously it seems that the delegation processor anticipates a SOAP envelope here.

But how do I continue from here? Do I really need to build a SOAP envelope? How do I do that in the simplest way?
Is there any other way? Can I configure the delegation processor to accept "raw" XML? I am just interested in passing
my XML to the client (ie my XForms app) in the simplest way possible. This is only going to be a simple prototype so
I don't want to go through a lot of hassle to make things production like.

2009-02-17 17:33:54,803 ERROR ProcessorService  - Exception at line 34, column 42 of oxf:/apps/my-sandbox/evaluate.xpl (reading processor output: name='data', id='evaluation')

org.xml.sax.SAXException: Bad envelope tag:  evaluation
        at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:70)
        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:497)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:736)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1755)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
        at orbeon.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1201)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:1902)
        at org.orbeon.oxf.processor.DelegationProcessor$2.endElement(DelegationProcessor.java:242)
        at org.orbeon.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:378)
        at org.orbeon.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:185)
        at org.orbeon.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:333)
        at org.dom4j.io.SAXWriter.endElement(SAXWriter.java:816)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:734)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:202)
        at org.dom4j.io.SAXWriter.parse(SAXWriter.java:603)

Many thanks for any tips on this issue.

Patrik Helsing
Senior Software Engineer
Cardiac Rhythm Management Division
 
St. Jude Medical
Veddestavägen 19
SE-175 84 Järfälla, Sweden
Tel +46 8 474 4560
[hidden email]

 
This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: RE: Bad envelope tag?

Helsing, Patrik
In reply to this post by Steve Bayliss
Message
Thank you very much, Steve. That made the trick! :-)

Patrik Helsing
Tel +46 8 474 4560
[hidden email]



From: Steve Bayliss [mailto:[hidden email]]
Sent: den 17 februari 2009 18:34
To: [hidden email]
Subject: [ops-users] RE: Bad envelope tag?

Hi Patrik
 
How about implementing your service as a REST service?
 
You could then either
 
a) use the oxf:url-generator processor to get the data (passing any data as url parameters); or
b) use the oxf:xforms-submission processor, which means you could POST data to your URL - see http://www.orbeon.com/ops/doc/processors-submission
 
Steve
-----Original Message-----
From: Helsing, Patrik [mailto:[hidden email]]
Sent: 17 February 2009 17:00
To: [hidden email]
Subject: [ops-users] Bad envelope tag?

Hi all,

I am having some trouble integrating my XForms application with another web service.
Basically I am just calling a web service (that I have written myself) using a delegator processor.

I receive the call on the server side, set the content type for the response, and then write my XML
to the writer of the response. Like this:

        response.setContentType("application/xml");
        final PrintWriter out = response.getWriter();
        out.println("<evaluation>"); // Write my own XML here
        ...;

But then I get a SAXException "Bad envelope tag" when receiving the response. See below.
Obviously it seems that the delegation processor anticipates a SOAP envelope here.

But how do I continue from here? Do I really need to build a SOAP envelope? How do I do that in the simplest way?
Is there any other way? Can I configure the delegation processor to accept "raw" XML? I am just interested in passing
my XML to the client (ie my XForms app) in the simplest way possible. This is only going to be a simple prototype so
I don't want to go through a lot of hassle to make things production like.

2009-02-17 17:33:54,803 ERROR ProcessorService  - Exception at line 34, column 42 of oxf:/apps/my-sandbox/evaluate.xpl (reading processor output: name='data', id='evaluation')

org.xml.sax.SAXException: Bad envelope tag:  evaluation
        at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:70)
        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:497)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
        at orbeon.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:736)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1755)

        at orbeon.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
        at orbeon.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
        at orbeon.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
        at orbeon.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1201)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:1902)
        at org.orbeon.oxf.processor.DelegationProcessor$2.endElement(DelegationProcessor.java:242)
        at org.orbeon.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:378)
        at org.orbeon.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:185)
        at org.orbeon.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:333)
        at org.dom4j.io.SAXWriter.endElement(SAXWriter.java:816)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:734)
        at org.dom4j.io.SAXWriter.writeContent(SAXWriter.java:619)
        at org.dom4j.io.SAXWriter.write(SAXWriter.java:202)
        at org.dom4j.io.SAXWriter.parse(SAXWriter.java:603)

Many thanks for any tips on this issue.

Patrik Helsing
Senior Software Engineer
Cardiac Rhythm Management Division
 
St. Jude Medical
Veddestavägen 19
SE-175 84 Järfälla, Sweden
Tel +46 8 474 4560
[hidden email]

 
This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.
 
This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws